Question conerning evdev keycode definition & mapping
peter.hutterer at who-t.net
Wed Jan 21 04:56:08 PST 2009
On Tue, Jan 20, 2009 at 09:54:45PM -0800, Henry Zhao wrote:
> I just installed ubunto 8.10 on Tishiba R600. Running "xmodmap -pk"
> I found some keycodes that are mapped to XF* keysyms are also used
> in some keyboards in some circumstances. For example,
> 150 is mapped to XF86Sleep. But:
> * It is used in xkb/keycodes/fujitsu
> * It is used in xkb/keycodes/digital/lk
> * It is used in xkb/keycodes/xfree86 (<I16> = 150; alias <COPY> = <I16>;)
the only one that matter these days (on linux) is keycodes/evdev.
> Will that cause a conflict ? Besides, I believe keycode 150 is geneated
> by a scan code from kernel driver in response to ACPI (Fn + F3) stroke,
> that mean the same scan code can be generated in multiple ways in above
> example ?
xkb has a double mapping, from keycode to xkb identifier (e.g. AE01) to
keysym. So 150 is only mapped to XF86Sleep in a certain RMLVO, 150 by itself
> Also, in "xmodmap -pk", each keycode is mapped to 6 keysyms, but in
> xkb/symbols/*, they are not mapped to that many (XF86Sleep is mapped up
> to 2 keysyms in xkb/symbols/inet). Why is the difference and what causes
> keycode to map to 6 keysyms ?
IIRC xmodmap -pk gives you the core mapping, which is derived from the xkb
mapping but not exactly the same. Core mappings are fixed, each key has the
same number of shift levels. Xkb is more flexible here, hence fewer shift
levels on keys that really only need 2.
More information about the xorg