--- hid-input.c.2.6.24-rc6 2008-02-12 10:19:55.000000000 -0200 +++ hid-input.c 2008-02-12 11:26:34.000000000 -0200 @@ -802,6 +802,7 @@ case HID_UP_LOGIVENDOR: set_bit(EV_REP, input->evbit); switch(usage->hid & HID_USAGE) { + case 0x000: map_key_clear(KEY_TV); /* Reported on Logitech Ultra X Media Remote */ case 0x004: map_key_clear(KEY_AGAIN); break; case 0x00d: map_key_clear(KEY_HOME); break; @@ -1039,6 +1040,28 @@ return; } + /* "Sleep" key */ + if (hid->vendor == 0x0c16 && hid->product == 0x0002 && + (usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK && + (usage->hid & 0xf0) == 0x80 && + (usage->hid & 0xf) == 0x2) { + input_event(input, usage->type, usage->code, 1); + input_sync(input); + input_event(input, usage->type, usage->code, 0); + input_sync(input); + return; + } + /* "TV" key */ + if (hid->vendor == 0x0c16 && hid->product == 0x0002 && + (usage->hid & HID_USAGE_PAGE) == HID_UP_LOGIVENDOR && + (usage->hid & HID_USAGE) == 0x0000) { + input_event(input, usage->type, usage->code, 1); + input_sync(input); + input_event(input, usage->type, usage->code, 0); + input_sync(input); + return; + } + /* Handling MS keyboards special buttons */ if (IS_MS_KB(hid) && usage->hid == (HID_UP_MSVENDOR | 0xff05)) { int key = 0;