2

I'm attempting to horizontal scroll with shift+scroll wheel. I've tried using imwheel, using the following in ~/.imwheelrc

".*"
Shift_L, Up, Left
Shift_L, Down, Right

I then run imwheel -b 45. This makes shift+scroll wheel work as expected.

However, it prevents some other default events, like ctrl+scroll wheel and super+scroll wheel from being passed. Instead, these appear to be interpreted as a normal (unmodified) scroll.

I tried putting things like Control_L, Up, Control_L|Up in ~/.imwheelrc, but this didn't work.

2
Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L,   Up,   Shift_L|Button4
Shift_L,   Down, Shift_L|Button5

in your .imwheelrc should do the trick. Be sure to restart imwheel for the changes to take effect. Note that starting imwheel multiple times leads to undefined behavior.

EDIT

As per feedback from the OP, the key is to map to Button4/Button5 instead of Up/Down. Hence the following worked in ~/.imwheelrc, followed by running imwheel -b 45. (For the sake of completeness I also accounted for Alt, Hyper, Meta and the right-hand-side keys.)

".*"
Shift_L, Up, Left
Shift_L, Down, Right
Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Super_L, Up, Super_L|Button4
Super_L, Down, Super_L|Button5
Alt_L, Up, Alt_L|Button4
Alt_L, Down, Alt_L|Button5
Hyper_L, Up, Hyper_L|Button4
Hyper_L, Down, Hyper_L|Button5
Meta_L, Up, Meta_L|Button4
Meta_L, Down, Meta_L|Button5
Shift_R, Up, Left
Shift_R, Down, Right
Control_R, Up,   Control_R|Button4
Control_R, Down, Control_R|Button5
Super_R, Up, Super_R|Button4
Super_R, Down, Super_R|Button5
Alt_R, Up, Alt_R|Button4
Alt_R, Down, Alt_R|Button5
Hyper_R, Up, Hyper_R|Button4
Hyper_R, Down, Hyper_R|Button5
Meta_R, Up, Meta_R|Button4
Meta_R, Down, Meta_R|Button5
  • This didn't seem to work, and in fact is worse than before. Specifically, both Ctrl+scroll-wheel and Shift+scroll-wheel appear to send vanilla scroll-wheel events. However, I took some inspiration from your answer, and mapped to Button4/Button5 instead of Up/Down, which worked. I'll add an edit to your answer and accept it. – Sparhawk Apr 29 '16 at 6:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.