> If you're using it on a wintel arch machine, have you managed to get the
> numeric keypad's = key or the power key to work? Doesn't here and I've
> tried more than one model of keyboard on more than one machine, no luck
> even with showkey. MacOS likes the keys just fine, naturally.
I just borrowed a Mac keyboard and looked.
The Numpad = key gave scancode 5c, the power key gave e05e.
The command getkeycodes showed that the former was assigned to
keycode 127, while the latter was not assigned.
The command "setkeycodes e05e 25", where 25 is the keycode
for the letter p, made the power key produce the letter p.
You see that you can do with a USB keyboard what you can do
with an ordinary keyboard: use setkeycodes to assign a keycode
to scancode combinations that didnt have one yet, use loadkeys
to assign a function to a keycode.
To understand the details of the code, trace the steps:
(i) The USB code can be found e.g. on
We find that Power is 102 and that Keypad-= is 103.
(ii) In usbkbd.c:usb_kbd_keycode these keycodes are converted
to 116 and 117, and then input_event is called.
(iii) In keybdev.c:x86_keycodes these codes are converted
to 350 and 92. The former is 256+94 and becomes e05e, the latter 5c.
This is fed further to the usual keyboard processing.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/