[SLOF] [PATCH v2 2/2] Fix special keys on USB
Thomas Huth
thuth at redhat.com
Wed Oct 7 17:59:23 AEDT 2015
On 06/10/15 18:32, Dinar valeev wrote:
> 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 | 16 +++++++---------
> 1 file changed, 7 insertions(+), 9 deletions(-)
>
> diff --git a/lib/libusb/usb-hid.c b/lib/libusb/usb-hid.c
> index 5d1a4d4..ae64960 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(0x4f);
> + 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(0x4f);
> + write_key(0x46);
> break;
Looks fine to me now!
Reviewed-by: Thomas Huth <thuth at redhat.com>
More information about the SLOF
mailing list