Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Putting the following into a .xbindkeysrc makes my keyboard irresponsive after reboot, with only control keys responding:

"{ echo KeyStrPress Alt_L; echo KeyStr F1; echo KeyStrRelease Alt_L; } | xmacroplay :0"

I know the xmacroplay works because I've executed it at the command line, and also, executing xbindkeys to map, for example, F2, without rebooting, works as expected. So, first, I have a problem after rebooting, because of that I had to remove the .xbindkeysrc file.

I was in the hard process of trying to create the simple mapping of Right Alt to Left Alt + F1 in the system. I was going to use xbindkeys to map F13 to Alt + F1 and xmodmap to map Right Alt to F13...

How do I map Right Alt to Left Alt + F1 so that I get hide/unhiding of the Launcher with a single key?

share|improve this question
up vote 1 down vote accepted

First of all, by default, Left Alt + F1 shortcut is not for hide/unhide the Launcher. This shortcut is used to give keyboard-focus to the Launcher. This means: gives keyboard-focus to the Launcher so it can be navigated with the cursor-keys. If you don't trust me, run the following command in terminal:

gsettings get org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ keyboard-focus

Now, to change Left Alt + F1 shortcut with another one, you can use the following command:

gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ keyboard-focus 'new_shortcut'

For example, to change it to Right Alt + F1, use:

gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ keyboard-focus '<Mod5>F1'

This works for mykeyboard (I mean "<Mod5>" for Right Alt key). I'm not sure for other keyboards as far as I can't test at the moment.

See also:

share|improve this answer
thanks, with your help, I was able to keyboard-focus by <Mod3> solely, which I've set as <Alt_R> through xmodmap. But, this setting works for unhiding the Launcher with keyboard focus, which is nice, but the old <Alt>F1 also hided the Launcher, and still does it, my <Mod3> setting doesn't hide the Launcher, just unhides. So <Alt>F1 doesn't unhide the Launcher anymore, now <Mod3> does it, but <Alt>F1 does hide it, and <Mod3> doesn't. Any help to make <Mod3> also hide it? – pepper_chico Aug 27 '13 at 13:13
Well, Esc is working for the unhide (by removing the focus), as I'm used to it, right now I'm almost fine with this, but I'd like to know whether I could get <Mod3> for hide and unhide of the Launcher. – pepper_chico Aug 27 '13 at 13:22
I've put Super_R at Mod3 instead of Alt_R and now, the right Super is both hiding as unhiding the Launcher, I'll accept the answer but how I finished this mapping may be worth information in the answer itself. I have removed Super_R from Mod4, clear Mod3 and added Super_R to Mod3 at my .Xmodmap. I've added xmodmap .Xmodmap to session applications, and used the gsettings trick to map Mod3 to keyboard-focus. The End. – pepper_chico Aug 27 '13 at 13:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.