ignatenkobrain / rpms / kernel

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