This xte command, when I run it in a terminal, triggers Expo mode:
xte 'keydown Super_L' 'key S' 'keyup Super_L'
However, when I put this in my .xbindkeysrc file:
"xte 'keydown Super_L' 'key S' 'keyup Super_L'"
b:11
Nothing happens when I click the button. The following binding makes the letter X appear in my console when I press button 11:
"xte 'key X'"
b:11
So why doesn't the Expo binding work?
This is the verbose output of xbindkeys -n -v when clicking button 11:
Button press !
e.xbutton.button=11
e.xbutton.state=16
"xte 'keydown Super_L' 'key W' 'keyup Super_L'"
m:0x0 + b:11 (mouse)
got screen 0 for window 2bb
Start program with fork+exec call
Button release !
e.xbutton.button=11
e.xbutton.state=16
And nothing happens. Does this have anything to do with the way xbindkeys executes the command? (fork+exec call)
Attempt number two.
expo.sh:
#!/usr/bin/env bash
export DISPLAY=:0
xte 'keydown Super_L' 'key S' 'keyup Super_L'
Executing this script from the command line activates Expo. Binding it in xbindkeys:
"sh ~/expo.sh"
b:11
Clicking mouse button 11:
Button press !
e.xbutton.button=11
e.xbutton.state=16
"sh ~/expo.sh"
m:0x0 + b:11 (mouse)
got screen 0 for window 2bb
Start program with fork+exec call
Nothing happens!