[SLOF] [PATCH v2 2/2] Fix special keys on USB

Dinar valeev k0da at opensuse.org
Thu Sep 10 20:55:19 AEST 2015


From: Dinar Valeev <dvaleev at suse.com>

This patch fixing HOME, INS, END and DEL keys in Grub, when USB
keyboard is used. Those keys are useful in faster grub interaction in
automated tests.

Signed-off-by: Dinar Valeev <dvaleev at suse.com>
---
 lib/libusb/usb-hid.c | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git a/lib/libusb/usb-hid.c b/lib/libusb/usb-hid.c
index 5d1a4d4..a7fb0f5 100644
--- a/lib/libusb/usb-hid.c
+++ b/lib/libusb/usb-hid.c
@@ -310,36 +310,34 @@ static void check_key_code(uint8_t *buf)
 				case 0x49:
 					write_key(0x1b);	       /* INS */
 					write_key(0x5b);
-					write_key(0x31);
+					write_key(0x32);
 					write_key(0x7e);
 					break;
 
 				case 0x4a:
 					write_key(0x1b);	      /* HOME */
 					write_key(0x5b);
-					write_key(0x32);
-					write_key(0x7e);
+					write_key(0x48);
 					break;
 
 				case 0x4b:
 					write_key(0x1b);	      /* PgUp */
 					write_key(0x5b);
-					write_key(0x33);
+					write_key(0x35);
 					write_key(0x7e);
 					break;
 
 				case 0x4c:
 					write_key(0x1b);	       /* DEL */
 					write_key(0x5b);
-					write_key(0x34);
+					write_key(0x33);
 					write_key(0x7e);
 					break;
 
 				case 0x4d:
 					write_key(0x1b);	       /* END */
 					write_key(0x5b);
-					write_key(0x35);
-					write_key(0x7e);
+					write_key(0x46);
 					break;
 
 				case 0x4e:
-- 
2.1.4



More information about the SLOF mailing list