Linux keyboard support, Logitech Access Keyboard, Multimedia keys



Hello NG!

I got such a wireless keyboard and found some
keys not working. Now I'm trying to sort out
the issues and got some questions. Mainly
these are linux kernel and X questions :)

About the keyboard: It has 10 extra keys
with just one mapping. Also, the 12 F-keys
have a second mapping. An additional key
("F Lock") does not produce any scancode
and is used to switch between scancode mappings
for the 12 F-keys.

There are two kind of problems:
First, two of the ten extra keys are
"Messenger/SMS" and "Webcam". These produce
scancodes which are known to the kernel
and should be "e0 11" (M/SMS) and "e0 12" (Webcam)
according to this source:
http://www.johanneshuebner.com/ge/linux.shtml#tastatur
However, they don't work as keys! "xev" gives
the following output:

Key "Webcam"
------------
ButtonPress event, serial 31, synthetic NO, window 0x4200001,
root 0x40, subw 0x0, time 13699309, (40,101), root:(1057,498),
state 0x10, button 4, same_screen YES

ButtonRelease event, serial 31, synthetic NO, window 0x4200001,
root 0x40, subw 0x0, time 13699309, (40,101), root:(1057,498),
state 0x810, button 4, same_screen YES

Key "Messenger/SMS"
-------------------
ButtonPress event, serial 31, synthetic NO, window 0x4200001,
root 0x40, subw 0x0, time 13700288, (40,101), root:(1057,498),
state 0x10, button 5, same_screen YES

ButtonRelease event, serial 31, synthetic NO, window 0x4200001,
root 0x40, subw 0x0, time 13700288, (40,101), root:(1057,498),
state 0x1010, button 5, same_screen YES

I am not sure, but this looks like these are
interpreted as mouse events! This confuses me.
Previously I thought keyboard scancodes are
translated into keycodes and not intermixed
with mouse events.

Question 1: Is there any way this is mixed
in the kernel?

Inspecting
/usr/src/linux/drivers/input/keyboard/atkbd.c
tells me it should perform the mapping from
scancodes to keycodes. But comments and identifiers
name keycodes only.

Question 2: Is there another important kernel file
for this issue which I missed?

If the kernel does does not mix keyboard
and mouse events, I'd expect X11 to do this.

The second problem is about the twelve F keys
which have a second mapping. These produce scancodes
which are not known by the kernel. atkbd.c prints
a warning to the kernel log.

Question 3: Is it correct that there are not
enough keycodes for all scancodes? Since scancodes
can be multiple bytes long the 256 (or 512?)
keycodes are probably not enough.

Question 4: What is the usual way of dealing
with this situation? If Q3 can be answered
with "yes", then a variable mapping should be loaded
for the non-standard keys. This mapping
should support the installed keyboard scancodes.
If Q3 can be answered with "no", then who
assigns the static mapping between the
scancode and keycode tables? That is, who
to send the scancode table?

Hopefully somebody can enlighten and/or correct me :)

RU,
Andreas

.



Relevant Pages

  • Re: Linux keyboard support, Logitech Access Keyboard, Multimedia keys
    ... The keyboard has 10 extra keys with just one mapping. ... scancodes for their special meaning. ... Which kernel version are you using? ...
    (comp.os.linux.hardware)
  • Scancodes, console keycodes and X
    ... I have a Logitech Cordless MX Duo keyboard whose extra keys I want to ... So I guess this means that the kernel doesn't know what console keycode ... it should generate for these keyboard scancodes. ...
    (comp.os.linux.x)
  • Re: 2.6.0_test6: CONFIG_I8K produces wrong/no keycodes for special buttons
    ... The multimedia buttons generate the following raw scancodes which can be ... Since the raw scancodes are generate by the keyboard like any other key ... they should be handled by the 2.6.0 kernel as in 2.4.x. ... Under X-window these 4 keys generate the following keycodes which can be ...
    (Linux-Kernel)
  • Re: KHotKeys
    ... > map F14 with a script: ... > Keyboard Shortcut: F14 ... F keys the system won't see them since it is probable set up ... And one can add other keys to the mapping, save it, ...
    (comp.windows.x.kde)
  • Re: xmodmap help required
    ... > keyboard the way I would like. ... some of these keys are not even recognized at all by X. ... when compiling the X server you are out of luck. ... They have tools to discover the scancodes emitted by each key ...
    (comp.unix.bsd.freebsd.misc)