hihp
May 1st, 2008, 11:10 AM
Hi,
I am pretty much new to using Linux in general or Ubuntu in specific (I am running Mythbuntu 7.10).
When on the desktop (if I understand that correctly, my Mythbuntu is running xfce4), I would like to be able to open the Applications menu using the Windows key. I already did a lot of search and am principally aware how it should work:
The two windows keys seem to produce the keycodes 115 and 116 (confirmed using xev). Therefore, the two calls of xmodmap:
xmodmap -e "keycode 115 = F13"
xmodmap -e "keycode 116 = F13"
assing the virtual key code (or whatever it's called under Linux) of "F13" to this.
If I call up Applications -> Settings -> Keyboard, make my own shortcut profile and have a command xfce4-popup-menu assigned the shortcut F13, everything works fine. This latter step I actually only had to do once, it sticks, as one would expect.
What does not stick is the mapping of the Windows keys, so I understand I need to run a bash script every time I start a session with this user. For that purpose, I wrote a script
#!/bin/bash
xmodmap -e "keycode 115 = F13"
xmodmap -e "keycode 116 = F13"
which I also made executeable. However, when I run it, the assignment does not happen.
What am I doing wrong?
(I already figured out that I can later use Applications -> Settings -> Sessions to have this script run on startup; the problem is that it does not do what I want.)
That is not all, however: if I use the aforementioned xmodmap calls, the Windows keys get assigned F13, but using them to call up the Applications menu only works if I open up Applications -> Settings -> Keyboard and close it again. I assume the reason is that the xfce shortcut manager needs to have his config made current or whatever.
So.. is my approach completely wrong or what should I do to get this working?
I am pretty much new to using Linux in general or Ubuntu in specific (I am running Mythbuntu 7.10).
When on the desktop (if I understand that correctly, my Mythbuntu is running xfce4), I would like to be able to open the Applications menu using the Windows key. I already did a lot of search and am principally aware how it should work:
The two windows keys seem to produce the keycodes 115 and 116 (confirmed using xev). Therefore, the two calls of xmodmap:
xmodmap -e "keycode 115 = F13"
xmodmap -e "keycode 116 = F13"
assing the virtual key code (or whatever it's called under Linux) of "F13" to this.
If I call up Applications -> Settings -> Keyboard, make my own shortcut profile and have a command xfce4-popup-menu assigned the shortcut F13, everything works fine. This latter step I actually only had to do once, it sticks, as one would expect.
What does not stick is the mapping of the Windows keys, so I understand I need to run a bash script every time I start a session with this user. For that purpose, I wrote a script
#!/bin/bash
xmodmap -e "keycode 115 = F13"
xmodmap -e "keycode 116 = F13"
which I also made executeable. However, when I run it, the assignment does not happen.
What am I doing wrong?
(I already figured out that I can later use Applications -> Settings -> Sessions to have this script run on startup; the problem is that it does not do what I want.)
That is not all, however: if I use the aforementioned xmodmap calls, the Windows keys get assigned F13, but using them to call up the Applications menu only works if I open up Applications -> Settings -> Keyboard and close it again. I assume the reason is that the xfce shortcut manager needs to have his config made current or whatever.
So.. is my approach completely wrong or what should I do to get this working?