aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid/hid-input.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r--drivers/hid/hid-input.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 5325d98b4328..5a38fb27d69f 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -97,6 +97,7 @@ struct hidinput_key_translation {
97#define APPLE_FLAG_FKEY 0x01 97#define APPLE_FLAG_FKEY 0x01
98 98
99static struct hidinput_key_translation apple_fn_keys[] = { 99static struct hidinput_key_translation apple_fn_keys[] = {
100 { KEY_BACKSPACE, KEY_DELETE },
100 { KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY }, 101 { KEY_F1, KEY_BRIGHTNESSDOWN, APPLE_FLAG_FKEY },
101 { KEY_F2, KEY_BRIGHTNESSUP, APPLE_FLAG_FKEY }, 102 { KEY_F2, KEY_BRIGHTNESSUP, APPLE_FLAG_FKEY },
102 { KEY_F3, KEY_CYCLEWINDOWS, APPLE_FLAG_FKEY }, /* Exposé */ 103 { KEY_F3, KEY_CYCLEWINDOWS, APPLE_FLAG_FKEY }, /* Exposé */
@@ -109,6 +110,10 @@ static struct hidinput_key_translation apple_fn_keys[] = {
109 { KEY_F10, KEY_MUTE, APPLE_FLAG_FKEY }, 110 { KEY_F10, KEY_MUTE, APPLE_FLAG_FKEY },
110 { KEY_F11, KEY_VOLUMEDOWN, APPLE_FLAG_FKEY }, 111 { KEY_F11, KEY_VOLUMEDOWN, APPLE_FLAG_FKEY },
111 { KEY_F12, KEY_VOLUMEUP, APPLE_FLAG_FKEY }, 112 { KEY_F12, KEY_VOLUMEUP, APPLE_FLAG_FKEY },
113 { KEY_UP, KEY_PAGEUP },
114 { KEY_DOWN, KEY_PAGEDOWN },
115 { KEY_LEFT, KEY_HOME },
116 { KEY_RIGHT, KEY_END },
112 { } 117 { }
113}; 118};
114 119
@@ -854,7 +859,8 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
854 return; 859 return;
855 860
856 /* handle input events for quirky devices */ 861 /* handle input events for quirky devices */
857 hidinput_event_quirks(hid, field, usage, value); 862 if (hidinput_event_quirks(hid, field, usage, value))
863 return;
858 864
859 if (usage->hat_min < usage->hat_max || usage->hat_dir) { 865 if (usage->hat_min < usage->hat_max || usage->hat_dir) {
860 int hat_dir = usage->hat_dir; 866 int hat_dir = usage->hat_dir;