Multimedia keyboard howto
So thanks to Crispin
and the people commenting on his blog I at least figured out how
one creates new keyboard profiles for X11.
Step 1: Get the numerical code for the key using the ‘xev’ tool shipping with X
Step 2: Figure out the X11 code by looking up those numbers in /usr/share/X11/xkb/keycodes/xfree86
Step 3: Add a section to /usr/share/X11/xkb/symbols/inet with those codes linking them to relevant XFree86 codes. (make a backup copy first) For my laptop that ended up with:
// Laptop/notebook Dell Inspiron 8xxx
partial alphanumeric_keys
xkb_symbols "inspiron" {
key <I22> { [ XF86AudioPlay, XF86AudioPause ] };
key <I10> { [ XF86AudioPrev ] };
key <I19> { [ XF86AudioNext ] };
key <I24> { [ XF86AudioStop ] };
key <I30> { [ XF86AudioRaiseVolume ] };
key <I2E> { [ XF86AudioLowerVolume ] };
key <I20> { [ XF86AudioMute ] };
};
Step 4: Then make a unified patch by doing:
diff -u inet inet.backup > inet.patch
Step 5: And finally submit
a bug into the freedesktop bugzilla
January 25th, 2006 at 3:43 am
I have one key that even xev doesn’t respond to. Is it hopeless? Or does this mean that I need to dig around in obscure configuration files (which is pretty much the same thing)?
January 25th, 2006 at 7:48 am
No idea Ken, I guess if Xev doesn’t respond to it simply isn’t registered being pressed at all.
January 26th, 2006 at 7:26 am
If xev doesn’t show the keypresses at all, maybe the kernel is missing information about the keys (as on my laptop)
I hope that helpstake a look at the kernel messages and man google for setkeycodes.
January 27th, 2006 at 5:44 am
I had the very same problem, some keys are not recognized by xev. Check the comments on this blog for a solution:
Whenever you hit a key and see nothing in xev a message is logged to /var/log/messages, using info from the log you will have to map the keycode using setkeycodes. Mariushttp://linuxgangster.org/modules.php?name=Content&file=viewarticle&id=17