I am on a fresh install of Xubuntu 16.04.

I would like to be able to press something like Ctrl+H and have it do Ctrl+Alt+1 and then Ctrl+Alt+2. Is there anyway to do this?

Or instead of kicking it off with Ctrl+H I could use one of the numerous programmable keys on my keyboard.


Checkout xdotool. You can create a bash script that uses xdotool to trigger your Ctrl+Alt+1, sleep for a second, then use xdotool again to trigger Ctrl+Alt+2. For example:

xdotool key "ctrl+alt+1"
sleep 1
xdotool key "ctrl+alt+2"

Make that bash script executable with

chmod +x <path to bash script>

Then add ctrl+h to the xfce4 keyboard shortcuts with your bash script as the target. You can use the command:


to open the xfce4 settings editor. Good Luck!

| improve this answer | |
  • Do you know if this works within remote viewers like Citrix? When I am in Citrix full screen I have to press CTRL+F2 to tell Citrix to send the next keys to the host OS and then CTRL+M to minimize. Was hoping to replace that with one shortcut... – IMTheNachoMan Sep 23 '16 at 4:05

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.