Input: HID - add more consumer usages
Extend mapping of the consumer usage page in hid-input.c to handle more cases appearing on new USB keyboards. Signed-off-by: Vojtech Pavlik <vojtech@suse.cz> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
This commit is contained in:
committed by
Dmitry Torokhov
parent
0aebfdac04
commit
8a409b0118
@ -78,8 +78,8 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
|
||||
{
|
||||
struct input_dev *input = &hidinput->input;
|
||||
struct hid_device *device = hidinput->input.private;
|
||||
int max, code;
|
||||
unsigned long *bit;
|
||||
int max = 0, code;
|
||||
unsigned long *bit = NULL;
|
||||
|
||||
field->hidinput = hidinput;
|
||||
|
||||
@ -248,7 +248,10 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
|
||||
case 0x034: map_key_clear(KEY_SLEEP); break;
|
||||
case 0x036: map_key_clear(BTN_MISC); break;
|
||||
case 0x08a: map_key_clear(KEY_WWW); break;
|
||||
case 0x08d: map_key_clear(KEY_PROGRAM); break;
|
||||
case 0x095: map_key_clear(KEY_HELP); break;
|
||||
case 0x09c: map_key_clear(KEY_CHANNELUP); break;
|
||||
case 0x09d: map_key_clear(KEY_CHANNELDOWN); break;
|
||||
case 0x0b0: map_key_clear(KEY_PLAY); break;
|
||||
case 0x0b1: map_key_clear(KEY_PAUSE); break;
|
||||
case 0x0b2: map_key_clear(KEY_RECORD); break;
|
||||
@ -268,6 +271,11 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
|
||||
case 0x18a: map_key_clear(KEY_MAIL); break;
|
||||
case 0x192: map_key_clear(KEY_CALC); break;
|
||||
case 0x194: map_key_clear(KEY_FILE); break;
|
||||
case 0x1a7: map_key_clear(KEY_DOCUMENTS); break;
|
||||
case 0x201: map_key_clear(KEY_NEW); break;
|
||||
case 0x207: map_key_clear(KEY_SAVE); break;
|
||||
case 0x208: map_key_clear(KEY_PRINT); break;
|
||||
case 0x209: map_key_clear(KEY_PROPS); break;
|
||||
case 0x21a: map_key_clear(KEY_UNDO); break;
|
||||
case 0x21b: map_key_clear(KEY_COPY); break;
|
||||
case 0x21c: map_key_clear(KEY_CUT); break;
|
||||
@ -280,7 +288,11 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
|
||||
case 0x227: map_key_clear(KEY_REFRESH); break;
|
||||
case 0x22a: map_key_clear(KEY_BOOKMARKS); break;
|
||||
case 0x238: map_rel(REL_HWHEEL); break;
|
||||
default: goto unknown;
|
||||
case 0x279: map_key_clear(KEY_REDO); break;
|
||||
case 0x289: map_key_clear(KEY_REPLY); break;
|
||||
case 0x28b: map_key_clear(KEY_FORWARDMAIL); break;
|
||||
case 0x28c: map_key_clear(KEY_SEND); break;
|
||||
default: goto ignore;
|
||||
}
|
||||
break;
|
||||
|
||||
@ -306,6 +318,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel
|
||||
|
||||
case HID_UP_MSVENDOR:
|
||||
case HID_UP_LOGIVENDOR:
|
||||
case HID_UP_LOGIVENDOR2:
|
||||
|
||||
goto ignore;
|
||||
|
||||
|
Reference in New Issue
Block a user