The scroll wheel on my mouse is broken (though middle-click still works, apparently) and I would like to bind two of my keyboard keys (yes, I have spare keys for this) in such a way as to emulate mouse scroll up and mouse scroll down by sending the requisite actions to X. How do I go about doing this? The keycodes I intend to use are f13 and f18 (for the F13 and F18 keys), respectively. I'm using i3 as my window manager.


Figured it out. I installed the xdotools package and added the following to my ~/.config/i3/config:

bindsym F13 xdotools click 4
bindsym F18 xdotools click 5

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.