Sergio Zanchetta [2010-03-24 15:07 -0000]:
> scan codes are reported this way: 0xXX (e.g. 0xB2)
>
> keymaps in
> /usr/include/linux/input.h
> are reported in (seems to be) decimal format. (e.g. #define KEY_WWW 150 /* AL Internet Browser */)
>
> They seem to be unrelated, what's the link between them?
Indeed they have nothing to do with each other. scan codes are
hardware dependent and just enumerate the hardware keys. key codes
define a semantics for a particular key and provide an identifier for
them. The kernel and udev has to keep mappings from scan codes to key
codes on a per-machine basis.
--
Martin Pitt | http://www.piware.de
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)
Sergio Zanchetta [2010-03-24 15:07 -0000]: linux/input. h
> scan codes are reported this way: 0xXX (e.g. 0xB2)
>
> keymaps in
> /usr/include/
> are reported in (seems to be) decimal format. (e.g. #define KEY_WWW 150 /* AL Internet Browser */)
>
> They seem to be unrelated, what's the link between them?
Indeed they have nothing to do with each other. scan codes are www.piware. de
hardware dependent and just enumerate the hardware keys. key codes
define a semantics for a particular key and provide an identifier for
them. The kernel and udev has to keep mappings from scan codes to key
codes on a per-machine basis.
--
Martin Pitt | http://
Ubuntu Developer (www.ubuntu.com) | Debian Developer (www.debian.org)