From: John Zaitseff <J.Zaitseff@zap.org.au>
The following patch to Linux kernel 2.6.23 enables most of the
extra keys found on the Microsoft Natural Ergonomic 4000 USB
keyboard. I had to add one keycode to include/linux/input.h; feel
free to reallocate the ID assigned to it (KEY_SPELL).
Main changes:
* Enabled the use of the extra "(" and ")" in the top right-hand
part of the keyboard, above the keypad
* Enable the My Favorites key in the centre of the keyboard (mapped
to KEY_FAVORITES)
* Map the F1-F12 keys to appropriate keys when the F Lock is off
(this is quite easy as the keyboard already generates different
USB key events)
Changes still to be made:
* Map the five buttons above My Favorites to KEY_FN_F1 to KEY_FN_F5
I am not sure how to do this last change correctly: the keyboard
returns a usage->hid of (HID_UP_MSVENDOR | 0xff05) whenever any of
the five keys are pressed or let go (as well as at certain other
times, when the value is 0):
value = 0x00 ---> none of the five keys are pressed
value = 0x01 ---> key 1 is pressed
value = 0x02 ---> key 2 is pressed
value = 0x04 ---> key 3 is pressed
value = 0x08 ---> key 4 is pressed
value = 0x10 ---> key 5 is pressed
Note that although this looks like a bitfield, multiple keys CANNOT
in effect be pressed simultaneously: only one of these six values
is ever returned (as tested).
In any case, this will be for a second patch, once the one in this
e-mail is applied.
Please apply if at all possible! Please CC me on any discussion,
as I am not subscribed to the mailing lists.
Signed-off-by: John Zaitseff <J.Zaitseff@zap.org.au>
---
drivers/hid/hid-debug.c | 4 +++-
drivers/hid/hid-input.c | 4 +++-
drivers/hid/usbhid/usbkbd.c | 2 +-
include/linux/input.h | 1 +
4 files changed, 8 insertions(+), 3 deletions(-)
diff -ruNp linux-2.6.23.orig/drivers/hid/hid-debug.c linux-2.6.23/drivers/hid/hid-debug.c
--- linux...