Skip to content

Commit 6363d20

Browse files
dtorJiri Kosina
authored andcommitted
HID: magicmouse: do not set up autorepeat
Neither the trackpad, nor the mouse want input core to generate autorepeat events for their buttons, so let's reset the bit (as hid-input sets it for these devices based on the usage vendor code). Cc: [email protected] Reported-by: Yariv <[email protected]> Tested-by: Yariv <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
1 parent aa3c439 commit 6363d20

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

drivers/hid/hid-magicmouse.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -535,6 +535,12 @@ static int magicmouse_setup_input(struct input_dev *input, struct hid_device *hd
535535
__set_bit(MSC_RAW, input->mscbit);
536536
}
537537

538+
/*
539+
* hid-input may mark device as using autorepeat, but neither
540+
* the trackpad, nor the mouse actually want it.
541+
*/
542+
__clear_bit(EV_REP, input->evbit);
543+
538544
return 0;
539545
}
540546

0 commit comments

Comments
 (0)