jingni / rpms / kernel

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