2

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"
  Release+F13

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?

1 Answer 1

1

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: https://superuser.com/questions/53092/gnome-map-altgr-key-to-alt

3
  • 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?
    – oblitum
    Aug 27, 2013 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.
    – oblitum
    Aug 27, 2013 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.
    – oblitum
    Aug 27, 2013 at 13:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .