]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
HID: Refactor MS Presenter 8K key mapping
authorJan Kiszka <jan.kiszka@siemens.com>
Mon, 14 Jan 2008 12:08:27 +0000 (13:08 +0100)
committerJiri Kosina <jkosina@suse.cz>
Mon, 28 Jan 2008 13:51:23 +0000 (14:51 +0100)
Following the suggestion of Jonas, this patch maps the special keys of
the MS Presenter 8000 to targets that should allow for better re-mapping
according to individual use cases (i.e. I avoided hard-wiring to
standard keys). This time I also included the last missing key event
(switching back from presentation mode).

The optimal Xmodmap customization for using the Presenter with
OpenOffice now looks like this for me:

keycode 175 = Escape
keycode 179 = F5
keysym XF86Forward = Right
keysym XF86Back = Left

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-input-quirks.c

index 9c4baf32dcfaf5699b3e5cf57e1959a4e7059893..a870ba58faa380db42319d68774eac73e0cad7f6 100644 (file)
@@ -145,10 +145,11 @@ static int quirk_microsoft_presenter_8k(struct hid_usage *usage, struct input_de
 
        set_bit(EV_REP, input->evbit);
        switch(usage->hid & HID_USAGE) {
-               case 0xfd08: map_key_clear(KEY_RIGHT);          break;
-               case 0xfd09: map_key_clear(KEY_LEFT);           break;
-               case 0xfd0b: map_key_clear(KEY_PAUSE);          break;
-               case 0xfd0f: map_key_clear(KEY_F5);             break;
+               case 0xfd08: map_key_clear(KEY_FORWARD);        break;
+               case 0xfd09: map_key_clear(KEY_BACK);           break;
+               case 0xfd0b: map_key_clear(KEY_PLAYPAUSE);      break;
+               case 0xfd0e: map_key_clear(KEY_CLOSE);          break;
+               case 0xfd0f: map_key_clear(KEY_PLAY);           break;
                default:
                        return 0;
        }