Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=cb1d93c98c49e268918e35e45e5c407fc4dc4e9f
Commit:     cb1d93c98c49e268918e35e45e5c407fc4dc4e9f
Parent:     7dcca30a32aadb0520417521b0c44f42d09fe05c
Author:     Jiri Kosina <[EMAIL PROTECTED]>
AuthorDate: Mon May 14 10:20:29 2007 +0200
Committer:  Jiri Kosina <[EMAIL PROTECTED]>
CommitDate: Mon Jul 9 14:13:28 2007 +0200

    HID: input mapping for Chicony KU-0418 tactical pad
    
    Chicony KU-0418 (aka Saitek PZ08AU gaming keyboard) has a separate
    "tactical pad" with 11 non-functional buttons - they generate usage
    codes from 0xff00 (MSVENDOR) usage page. Special case handling for
    this keyboard added, so no later clash with MSVENDOR mappings is going
    to occur.
    
    Pointed out in bugzilla #7352
    
    Signed-off-by: Jiri Kosina <[EMAIL PROTECTED]>
---
 drivers/hid/hid-input.c |   23 ++++++++++++++++++++++-
 1 files changed, 22 insertions(+), 1 deletions(-)

diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 7f81789..ce6d764 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -688,7 +688,28 @@ static void hidinput_configure_usage(struct hid_input 
*hidinput, struct hid_fiel
                        break;
 
                case HID_UP_MSVENDOR:
-                       goto ignore;
+
+                       /* special case - Chicony Chicony KU-0418 tactical pad 
*/
+                       if (device->vendor == 0x04f2 && device->product == 
0x0418) {
+                               set_bit(EV_REP, input->evbit);
+                               switch(usage->hid & HID_USAGE) {
+                                       case 0xff01: map_key_clear(BTN_1);      
        break;
+                                       case 0xff02: map_key_clear(BTN_2);      
        break;
+                                       case 0xff03: map_key_clear(BTN_3);      
        break;
+                                       case 0xff04: map_key_clear(BTN_4);      
        break;
+                                       case 0xff05: map_key_clear(BTN_5);      
        break;
+                                       case 0xff06: map_key_clear(BTN_6);      
        break;
+                                       case 0xff07: map_key_clear(BTN_7);      
        break;
+                                       case 0xff08: map_key_clear(BTN_8);      
        break;
+                                       case 0xff09: map_key_clear(BTN_9);      
        break;
+                                       case 0xff0a: map_key_clear(BTN_A);      
        break;
+                                       case 0xff0b: map_key_clear(BTN_B);      
        break;
+                                       default:    goto ignore;
+                               }
+                       } else {
+                               goto ignore;
+                       }
+                       break;
 
                case HID_UP_CUSTOM: /* Reported on Logitech and Powerbook USB 
keyboards */
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to