Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- drivers/hid/hid-input.c.original 2014-09-05 21:51:41.421798237 +0300
- +++ drivers/hid/hid-input.c 2014-09-05 22:03:30.573774280 +0300
- @@ -1063,6 +1063,20 @@ void hidinput_hid_event(struct hid_devic
- return;
- }
- + /*
- + * Some keyboards will report both HID keys 0x31 (\ and |) and
- + * 0x32 (Non-US # and ~) which are both mapped to
- + * KEY_BACKSLASH. This will cause spurious events causing
- + * repeated backslash key presses. Handle this by tracking the
- + * active HID code and ignoring the other one.
- + */
- + if (usage->type == EV_KEY && usage->code == KEY_BACKSLASH) {
- + if (value)
- + field->hidinput->backslash_usage = usage->hid;
- + else if (field->hidinput->backslash_usage != usage->hid)
- + return;
- + }
- +
- /* report the usage code as scancode if the key status has changed */
- if (usage->type == EV_KEY && !!test_bit(usage->code, input->key) != value)
- input_event(input, EV_MSC, MSC_SCAN, usage->hid);
- --- include/linux/hid.h.original 2014-09-05 21:52:03.615797487 +0300
- +++ include/linux/hid.h 2014-09-05 22:03:30.573774280 +0300
- @@ -432,6 +432,7 @@ struct hid_input {
- struct list_head list;
- struct hid_report *report;
- struct input_dev *input;
- + unsigned backslash_usage;
- };
- enum hid_type {
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement