1

I have Razer Deathadder Elite gaming mouse. I wanted to remap its two side buttons so that I would be able to switch between workspaces. I have seen this: Remapping mouse buttons to keyboard keys, but could not figure out how to map the buttons to key combinations (i.e. Ctrl+Alt+Up and Ctrl+Alt+Down).

Update

Looked at this: How to bind mouse buttons to keys? Tried adding the code below to .xbindkeysrc:

# Ctrl+Alt+Down press
"xte 'keydown Control_L' 'key Alt_L' 'key Down'"
    b:8

Ctrl+Alt+Down release

"xte 'keyup Control_L' 'keyup Alt_L' 'keyup Down'" b:8 + Release

Ctrl+Alt+Up press

"xte 'keydown Control_L' 'key Alt_L' 'key Up'" b:9

Ctrl+Alt+Up release

"xte 'keyup Control_L' 'keyup Alt_L' 'keyup Up'" b:9 + Release

Still cannot get it to work.

1 Answers1

0

I had the same exact question for nearly the same exact purpose recently; figured it out:

# Ctrl + Alt + Down on Mouse8
"xte 'keydown Control_L' 'keydown Alt_L' 'key Down' 'keyup Alt_L' 'keyup Control_L'"
    b:8

Ctrl + Alt + Up on Mouse9

"xte 'keydown Control_L' 'keydown Alt_L' 'key Up' 'keyup Alt_L' 'keyup Control_L'" b:9

I still couldn't figure out (just like you) why I couldn't "keyup" the three keys on a button release, but holding down the two modifiers, keying the arrow, then releasing the two modifiers worked out much better.

Just a note in your question, you were not holding down the Alt and Down/Up keys like you seemed to try (you used "key" instead of "keydown" on the press calls). Even then, the single-line press-release was the only way I got it to work.

AlwaysTalkingAboutMyDog
  • 3,783
  • 2
  • 25
  • 38