I want to map, remap or create a shortcut that:
F1 : Right click
F2 : Left click
F3 : Scroll Down
F4 : Scroll Up
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
xdotool, and I made the best use of them.
xmodmap is better for left and right click. Shortcut using
xdotool is better for scroll down and up.
I will show all steps to let the user decide which keys and buttons they want to remap.
xev you discover:
F1 : keycode 67
F2 : keycode 68
F3 : keycode 69
F4 : keycode 70
Left click: Pointer_Button1
Right click: Pointer_Button3
Scroll Down: Pointer_Button5
Scroll Up: Pointer_Button6
xmodmap to really remap keys (better than shortcuts, because it allows drag and drop)
xmodmap -e "keycode 67 = Pointer_Button3" xmodmap -e "keycode 68 = Pointer_Button1 Pointer_Button1"
This solution derived partially from here.
keyboard > shortcuts > "+" > ...
Scroll down and shortcut F3
xdotool click 5
Scroll up and shortcut F4
xdotool click 4