Permalink
Browse files

Use ke->scancode[0] instead of ke->keycode. Thanks to xuzhen++

  • Loading branch information...
tadzik committed May 21, 2011
1 parent 7c88b5b commit 6d3c66c63cd5264ce60c26e0335d7bfb01a0645c
Showing with 2 additions and 2 deletions.
  1. +2 −2 lenovo-sl-laptop.c
View
@@ -1089,13 +1089,13 @@ static int hkey_inputdev_setkeycode(struct input_dev *dev, int scancode,
for (key = ec_keymap; key->type != KE_END; key++)
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
- if (ke->keycode == key->scancode) {
+ if (ke->scancode[0] == key->scancode) {
#else
if (scancode == key->scancode) {
#endif
clear_bit(key->keycode, dev->keybit);
#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,39)
- key->keycode = ke->keycode;
+ key->keycode = ke->scancode[0];

This comment has been minimized.

Show comment Hide comment
@xuzhen

xuzhen May 21, 2011

Oh no! here ke->keycode is correct.

@xuzhen

xuzhen May 21, 2011

Oh no! here ke->keycode is correct.

This comment has been minimized.

Show comment Hide comment
@tadzik

tadzik May 21, 2011

Owner

Aw, snap. Could you fork the repo and send me a pull request, or send a complete patch? I see you have some more ideas, and I feel in this code like a blind man in the fog.

@tadzik

tadzik May 21, 2011

Owner

Aw, snap. Could you fork the repo and send me a pull request, or send a complete patch? I see you have some more ideas, and I feel in this code like a blind man in the fog.

This comment has been minimized.

Show comment Hide comment
@xuzhen

xuzhen May 21, 2011

I post my lenovo-sl-laptop.c at http://pastebay.com/123981

@xuzhen

xuzhen May 21, 2011

I post my lenovo-sl-laptop.c at http://pastebay.com/123981

#else
key->keycode = keycode;
#endif

0 comments on commit 6d3c66c

Please sign in to comment.