Skip to content

Commit

Permalink
HID: update key codes for Apple aluminium
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
  • Loading branch information
Michael Hanselmann authored and Jiri Kosina committed Mar 18, 2008
1 parent dfd347f commit 0714664
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions drivers/hid/hid-input.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,16 @@ struct hidinput_key_translation {

static struct hidinput_key_translation apple_fn_keys[] = {
{ KEY_BACKSPACE, KEY_DELETE },
{ KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY },
{ KEY_F2, KEY_BRIGHTNESSUP, APPLE_FLAG_FKEY },
{ KEY_F3, KEY_CYCLEWINDOWS, APPLE_FLAG_FKEY }, /* Exposé */
{ KEY_F4, KEY_FN_F4, APPLE_FLAG_FKEY }, /* Dashboard */
{ KEY_F5, KEY_FN_F5 },
{ KEY_F6, KEY_FN_F6 },
{ KEY_F7, KEY_BACK, APPLE_FLAG_FKEY },
{ KEY_F8, KEY_PLAYPAUSE, APPLE_FLAG_FKEY },
{ KEY_F9, KEY_FORWARD, APPLE_FLAG_FKEY },
{ KEY_F10, KEY_MUTE, APPLE_FLAG_FKEY },
{ KEY_F11, KEY_VOLUMEDOWN, APPLE_FLAG_FKEY },
{ KEY_F12, KEY_VOLUMEUP, APPLE_FLAG_FKEY },
{ KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY },
{ KEY_F2, KEY_BRIGHTNESSUP, APPLE_FLAG_FKEY },
{ KEY_F3, KEY_FN_F5, APPLE_FLAG_FKEY }, /* Exposé */
{ KEY_F4, KEY_FN_F4, APPLE_FLAG_FKEY }, /* Dashboard */
{ KEY_F7, KEY_PREVIOUSSONG, APPLE_FLAG_FKEY },
{ KEY_F8, KEY_PLAYPAUSE, APPLE_FLAG_FKEY },
{ KEY_F9, KEY_NEXTSONG, APPLE_FLAG_FKEY },
{ KEY_F10, KEY_MUTE, APPLE_FLAG_FKEY },
{ KEY_F11, KEY_VOLUMEDOWN, APPLE_FLAG_FKEY },
{ KEY_F12, KEY_VOLUMEUP, APPLE_FLAG_FKEY },
{ KEY_UP, KEY_PAGEUP },
{ KEY_DOWN, KEY_PAGEDOWN },
{ KEY_LEFT, KEY_HOME },
Expand Down

0 comments on commit 0714664

Please sign in to comment.