I've set up the Super key to open the main menu. It works.
gconftool-2 --set /apps/metacity/global_keybindings/panel_main_menu --type string "Super_L"
,
I have a shell script super.sh
which injects a Super keypress into X. It works; the menu appears.
#!/bin/bash
echo "KeyStrPress Super_L KeyStrRelease Super_L"| xmacroplay -d 1 :0.0 &> /dev/null
.
I use xbindkeys
to associate Alt+F1 with super.sh
. It should work, but it doesn't!
However, when I associate Alt+F1 with nautilus
, or make nautilus
the only active command in the script, then Alt+F1 successfully launches nautilus
… so I am a bit puzzled about what's happening to the script.
Any ideas, anybody?
If there is a another way, I'd like to know about it,
and I'd still like to resolve this macro-generated key-press issue.
Best Answer
I seem to have hit upon a solution with a caveat however. Details below.
gconftool-2
to set/apps/metacity/global_keybindings/panel_main_menu
toSuper_L
(as you have mentioned in your question.sudo aptitude install xvkbd
ccsm
(System -> Preferences -> Compizconfig settings manager) to create a new command bound toAlt+F1
. AgainstCommands -> Commands -> Command 4
enterxvkbd -text "\[Super_L]"
and againstCommands -> Keybindings -> Run Command 4
select F1 as keybinding.This should work. It is almost completely copied from this ubuntuforums post.
Caution
When I tried this in my system, I found 1 very strange issue. The sytem started behaving as if the Alt key was permanently held (e.g., I could just press to switch between windows). I am not sure this is because I had earlier invoked xvkbd to simulate some Alt key presses. If you face this problem, the only option I found to make the system usable again was to follow below steps.
Drop to a terminal by pressing Ctrl+Alt+F1
Login with your user name & password
Force logout and restart of X by running below command.
If the problem persists after login also, then you can use the following command to reset the mapping of Super_L to panel_main_menu (back to defauly Alt+F1) gconftool --unset /apps/metacity/global_keybindings/panel_main_menu