You can use xbindkeys
for this. You would need to write an .xbindkeysrc
and start xbindkeys with your X Session (You could use either .xinitrc
, .xsession
or your the appropriate option in your DM/WM if it has one). The you will need something to send keys to X Programs. I used xte
from the xautomation
package but you can also use something like xmacro
(example here).
In your .xbindkeysrc
you write something like this:
"xte 'keyup Control_L' 'keyup Control_R' 'key Up' 'key Up' 'key Up' 'key Up' 'key Up'"
Control + Up
same thing for Control + Down
(the linebreak in the example is needed). This will release the control keys (important if you don't want to end up with infinite up) and then press up 5 times.