Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: update key codes for Apple aluminium

F5 and F6 have no second function printed on them. Thus their definitions have
been removed from the table.

KEY_CYCLEWINDOWS doesn't name the function of Mac OS X' Expose properly and
because we couldn't find a better key code, we decided to use KEY_FN_F4
instead.

We also changed KEY_BACK and KEY_FORWARD, which apply to browser functions, to
KEY_PREVIOUSSONG and KEY_NEXTSONG, since the keys are intended to control a
music player.

Signed-off-by: Michael Hanselmann <linux-kernel@hansmi.ch>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Michael Hanselmann and committed by
Jiri Kosina
07146648 dfd347f0

+10 -12
+10 -12
drivers/hid/hid-input.c
··· 98 98 99 99 static struct hidinput_key_translation apple_fn_keys[] = { 100 100 { KEY_BACKSPACE, KEY_DELETE }, 101 - { KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY }, 102 - { KEY_F2, KEY_BRIGHTNESSUP, APPLE_FLAG_FKEY }, 103 - { KEY_F3, KEY_CYCLEWINDOWS, APPLE_FLAG_FKEY }, /* Exposé */ 104 - { KEY_F4, KEY_FN_F4, APPLE_FLAG_FKEY }, /* Dashboard */ 105 - { KEY_F5, KEY_FN_F5 }, 106 - { KEY_F6, KEY_FN_F6 }, 107 - { KEY_F7, KEY_BACK, APPLE_FLAG_FKEY }, 108 - { KEY_F8, KEY_PLAYPAUSE, APPLE_FLAG_FKEY }, 109 - { KEY_F9, KEY_FORWARD, APPLE_FLAG_FKEY }, 110 - { KEY_F10, KEY_MUTE, APPLE_FLAG_FKEY }, 111 - { KEY_F11, KEY_VOLUMEDOWN, APPLE_FLAG_FKEY }, 112 - { KEY_F12, KEY_VOLUMEUP, APPLE_FLAG_FKEY }, 101 + { KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY }, 102 + { KEY_F2, KEY_BRIGHTNESSUP, APPLE_FLAG_FKEY }, 103 + { KEY_F3, KEY_FN_F5, APPLE_FLAG_FKEY }, /* Expos� */ 104 + { KEY_F4, KEY_FN_F4, APPLE_FLAG_FKEY }, /* Dashboard */ 105 + { KEY_F7, KEY_PREVIOUSSONG, APPLE_FLAG_FKEY }, 106 + { KEY_F8, KEY_PLAYPAUSE, APPLE_FLAG_FKEY }, 107 + { KEY_F9, KEY_NEXTSONG, APPLE_FLAG_FKEY }, 108 + { KEY_F10, KEY_MUTE, APPLE_FLAG_FKEY }, 109 + { KEY_F11, KEY_VOLUMEDOWN, APPLE_FLAG_FKEY }, 110 + { KEY_F12, KEY_VOLUMEUP, APPLE_FLAG_FKEY }, 113 111 { KEY_UP, KEY_PAGEUP }, 114 112 { KEY_DOWN, KEY_PAGEDOWN }, 115 113 { KEY_LEFT, KEY_HOME },