2

I've looked at this post, but it's not quite what I was looking for.

Command for forcing a pointer ungrab (captured mouse release)

I want to fake the "Easy-Shift" functionality of my "Roccat XTD" on a "Bazalias X1" transformer mouse using xbindkeys.

Basically, I created two profiles that I want to swap depending on whether I pressed or released the mouse button.

The problem is that once any button is pressed, the click event jams, so no other click events go through.

Is there a way I could do this work flow:

  1. Mouse m:8 (finger down)
  2. Load ~/.xbindkeys_config/speed_c/Profile2
  3. Force Release m:8 (still holding the button)
  4. Perform any clicks using Profile2
  5. Mouse m:8 + release (finger up)
  6. Load ~/.xbindkeys_config/speed_c/Profile1
jao
  • 121

2 Answers2

0

For now, I settled with "on click", switch profiles. Here are my profile files.

Profile1

#Switch Profile
"killall xbindkeys; xbindkeys -f ~/.xbindkeys_config/speed_c/Profile2"
b:8

#
# End of xbindkeys configuration

Profile 2

#M Volume Up
"amixer -q set Master 2dB+ unmute"
b:4

#M Volume Down
"amixer -q set Master 2dB- unmute"
b:5

#M Copy
"xte 'keydown Control_L' 'key c' 'keyup Control_L'"
b:1

#M Paste
"xte 'keydown Control_L' 'key v' 'keyup Control_L'"
b:3

#M Undo
"xte 'keydown Control_L' 'key z' 'keyup Control_L'"
b:9

#Switch Profile-Copy
"killall xbindkeys; xbindkeys -f ~/.xbindkeys_config/speed_c/Profile1"
b:8

#
# End of xbindkeys configuration
jao
  • 121
0

I think newer xbindkeys (1.8.3 or so) can reload its configuration on changes. If replacing the configuration file is possible, it might provide better performance than restarting xbindkeys each time.

Thomas Dickey
  • 76,765