Enable modifiers via xmodmap
I recently got a Logitech G11-keyboard for my Ubuntu 9.10 64-bit box. My question is xmodmap related and not restricted to this particular keyboard, nor to the distro I am using. The keyboard has a.o. 18 G-keys. These have been successfully defined in /usr/share/X11/XKeysymDB as per https://help.ubuntu.com/community/LogitechG15 and I have a ~/.Xmodmap file that matches keycodes to the names in XKeysymDB.
My .Xmodmap definitions are rather simple, e.g. 'keycode 175 = G1'. So I do not define any value for modifier combinations, nor do I know how to do this.
And here's my real question. How should I define these keys so that the Crl-, Alt-, Meta-, Super- etc modifiers work with these keys?
With the current setup, the modifier versions of these keys do only work for the second keypress, e.g. the first Ctrl-G17 is perceived as a G17 keypress, and the second and remaining Ctrl-G17 presses are correctly received as a Ctrl-G17.
I would be happy to read an explanation of this behaviour, and even more so, about how to properly define them so that the base key as well as the modifier versions would be available.
If the odds are a million to one against something occurring, chances are 50-50 it will.
http://vanhoecke.org ... and go2 places!
Had to search for this keyboard to see what it does. Basically, it has 18 macro programmable keys. The specs say it requires winblows but it should work under linux. I tried xmodmap but didn't get it to work consistently. Instead I use xbindkeys (http://www.nongnu.org/xbindkeys/xbindkeys.html) which is fairly easy to set up. One requirement is that the keys return an explicit keycode for each key combination. Use "xev" in a terminal to see if your keyboard qualifies.
You also might be interested in this article of LinuxPro magazine (Dec 09) issue 109. It is about using acpid hotkeys but I haven't tried it since xbindkeys work fine for me. Some of the key definitions in my distro (openSUSE 11.2) didn't work. I've got a Dell studio 1745 laptop which was made for winblows:(
Here is a fragment of my .xbindkeysrc file
Tom (retired penguin)
As I said b4, the combined XKeysymDB en ~/.Xmodmap work well for me. Tje 18 G-keys as well as the 3 M-keys and the MR key work fine for me. I just do not know why the first keypress of one of these keys together with a modifier key is detected as the unmodified key, while the same modified key pressed immediately thereafter is detected as the modified key. And of course, I'd like to fix it so that one single modified keypress is detected as such.
|All times are GMT -5. The time now is 06:32 AM.|