diff options
author | Diego 'Flameeyes' Petteno <flameeyes@gmail.com> | 2008-05-05 10:20:50 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2008-05-20 10:44:43 -0400 |
commit | 6e7045990f35ef9250804b3fd85e855b8c2aaeb6 (patch) | |
tree | 4742656cd49a86e204ad521178462f695a5aa3cf /drivers/hid/hid-input.c | |
parent | b8291ad07a7f3b5b990900f0001198ac23ba893e (diff) |
HID: split Numlock emulation quirk from HID_QUIRK_APPLE_HAS_FN.
Since 2.6.25 the HID_QUIRK_APPLE_HAS_FN quirk is enabled even for
non-laptop Apple keyboards of the Aluminium series. The USB version of
these don't need Numlock emulation, like the laptop (and Aluminium
Wireless) do, as they have a proper keypad.
This patch splits the Numlock emulation for Apple keyboards in a
different quirk flag, so that it can be enabled for all the keyboards
but the Aluminium USB ones.
If the Numlock emulation is enabled for Aluminium USB keyboards, the
JKL and UIO keys become the numeric pad, and the rest of the keyboard
is disabled, included the key used to disable Numlock.
Additionally, these keyboard should not have a Numlock at all, as the
Numlock key is instead replaced by the 'Clear' key as usual for Apple
USB keyboards.
Signed-off-by: Diego 'Flameeyes' Petteno <flameeyes@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r-- | drivers/hid/hid-input.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index c3eb3f13e2ca..452b94dd7401 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -218,8 +218,9 @@ int hidinput_apple_event(struct hid_device *hid, struct input_dev *input, | |||
218 | } | 218 | } |
219 | } | 219 | } |
220 | 220 | ||
221 | if (test_bit(usage->code, hid->pb_pressed_numlock) || | 221 | if (hid->quirks & HID_QUIRK_APPLE_NUMLOCK_EMULATION && ( |
222 | test_bit(LED_NUML, input->led)) { | 222 | test_bit(usage->code, hid->pb_pressed_numlock) || |
223 | test_bit(LED_NUML, input->led))) { | ||
223 | trans = find_translation(powerbook_numlock_keys, usage->code); | 224 | trans = find_translation(powerbook_numlock_keys, usage->code); |
224 | 225 | ||
225 | if (trans) { | 226 | if (trans) { |