HID: apple: Fix stuck function keys when using FN
authorJoao Moreno <mail@joaomoreno.com>
Tue, 3 Sep 2019 14:46:32 +0000 (16:46 +0200)
committerBenjamin Tissoires <benjamin.tissoires@redhat.com>
Wed, 4 Sep 2019 07:22:55 +0000 (09:22 +0200)
commitaec256d0ecd561036f188dbc8fa7924c47a9edfd
tree86e15f586ab4b68409fb238f6fece689b8e4b8e6
parent15d90b242290f228166ea79ee1cc2db6b31a2143
HID: apple: Fix stuck function keys when using FN

This fixes an issue in which key down events for function keys would be
repeatedly emitted even after the user has raised the physical key. For
example, the driver fails to emit the F5 key up event when going through
the following steps:
- fnmode=1: hold FN, hold F5, release FN, release F5
- fnmode=2: hold F5, hold FN, release F5, release FN

The repeated F5 key down events can be easily verified using xev.

Signed-off-by: Joao Moreno <mail@joaomoreno.com>
Co-developed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
drivers/hid/hid-apple.c