xkb: problem in key-mapping for the acpi video event keycodes

Daniel Stone daniel at fooishbar.org
Fri Jan 4 00:07:14 PST 2008


On Fri, Jan 04, 2008 at 03:33:48PM +0800, Hong Liu wrote:
> There are two parts involved.
> 1. kernel(Linux) part (driver/char/keyboard.c)
> This file implements an input handler (kbd_handler) used to receive key
> events from the kernel input layer. So when acpi video driver sends
> KEY_SWITCHVIDEOMODE(227) to the input layer, kbd_event() will be called
> for this event.
> kbd_event -> emulate_raw (with keycode == 227)
>         use x86_keycodes[] to map keycode 227 -> 342
>         **I am still not sure about the meaning of this mapping**
> 
>         and then it will put "0xe0 0x56(342 & 0x7f)" to the input queue
>         of the associated tty device. (for X server, usually it
> 	is /dev/tty7)
> 
> 2. X server keyboard driver (xf86-input-keyboard)
> This keyboard driver will listen to the /dev/tty7 file for keyboard
> input from kernel. Once there is new data coming, it will call this
> keyboard's PostEvent function to post the event to X server.

You really should use the evdev driver instead.

Cheers,
Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg/attachments/20080104/749b4a58/attachment.pgp>


More information about the xorg mailing list