linuxtorvalds / rpms / kernel

Forked from rpms/kernel 2 years ago
Clone
b37f23
CentOS-7 patch: Allow non-LogiTech remote to work with a generic wireless
b37f23
keyboard reciever that sends LogiTech scancodes.
b37f23
b37f23
CentOSplus bug: 0005780
b37f23
Submitted by: Alex Timm <alextimm@msn.com>
b37f23
b37f23
LIRCD and devinput driver connected to the HOLTEK USB Keyboard remote reciever,
b37f23
connected on /dev/input/eventx, was not reading the scancodes that should be
b37f23
found in drivers/hid/lg.c.  The following patch adds the scan codes to
b37f23
hid-input.c as they were in centos/centosplus 5.
b37f23
b37f23
Applied by: Akemi Yagi <toracat@centos.org>
b37f23
b37f23
--- a/drivers/hid/hid-input.c   2009-12-02 21:51:21.000000000 -0600
b37f23
+++ b/drivers/hid/hid-input.c   2012-06-20 15:20:04.000000000 -0500
b37f23
@@ -886,7 +886,28 @@ static void hidinput_configure_usage(str
b37f23
 		goto ignore;
b37f23
 
b37f23
 	case HID_UP_LOGIVENDOR:
b37f23
-		goto ignore;
b37f23
+		set_bit(EV_REP, input->evbit);
b37f23
+		switch(usage->hid & HID_USAGE) {
b37f23
+		case 0x004: map_key_clear(KEY_AGAIN);           break;
b37f23
+		case 0x00d: map_key_clear(KEY_HOME);            break;
b37f23
+		case 0x024: map_key_clear(KEY_SHUFFLE);         break;
b37f23
+		case 0x025: map_key_clear(KEY_TV);              break;
b37f23
+		case 0x026: map_key_clear(KEY_MENU);            break;
b37f23
+		case 0x031: map_key_clear(KEY_AUDIO);           break;
b37f23
+		case 0x032: map_key_clear(KEY_TEXT);            break;
b37f23
+		case 0x033: map_key_clear(KEY_LAST);            break;
b37f23
+		case 0x047: map_key_clear(KEY_MP3);             break;
b37f23
+		case 0x048: map_key_clear(KEY_DVD);             break;
b37f23
+		case 0x049: map_key_clear(KEY_MEDIA);           break;
b37f23
+		case 0x04a: map_key_clear(KEY_VIDEO);           break;
b37f23
+		case 0x04b: map_key_clear(KEY_ANGLE);           break;
b37f23
+		case 0x04c: map_key_clear(KEY_LANGUAGE);        break;
b37f23
+		case 0x04d: map_key_clear(KEY_SUBTITLE);        break;
b37f23
+		case 0x051: map_key_clear(KEY_RED);             break;
b37f23
+		case 0x052: map_key_clear(KEY_CLOSE);           break;
b37f23
+		default:    goto ignore;
b37f23
+		}
b37f23
+		break;
b37f23
 
b37f23
 	case HID_UP_PID:
b37f23
 		switch (usage->hid & HID_USAGE) {