This is actually quite easy using the xbindkeys
and the xdotool
packages. xdotool lets you emulate key presses, and xbindkeys lets you add custom shortcuts.
All the following steps are run in a terminal.
First we will kill the process
killall xbindkeys
Now we put our custom shortcuts in the ~/.xbindkeysrc file
gedit ~/.xbindkeysrc
and we put in the following lines
"xdotool keyup Next && xdotool key ctrl+alt+Down"
Next
"xdotool keyup Prior && xdotool key ctrl+alt+Up"
Prior
save and close, and start xbindkeys again by running
xbindkeys
It should now work like you wanted, enjoy!
Explanation:
Now what does it actually do? Say, you press Page Up, your computer recognizes this as the Prior key (you can check this using xev | grep key and pressing keys). Now before we simulate other keypresses, we should emulate a key release first, that's what the xdotool keyup Prior is for. If it is released successfully then we send the Ctrl+Alt+Up combination and this is what xdotool key ctrl+alt+Up is for.