[PATCH] Fix function keys sequence on USB

Thomas Huth thuth at redhat.com
Wed Sep 2 00:13:14 AEST 2015


 Hi!

May I ask what's the status of this patch? As far as I can see, it has
not been included in the repository yet?

On 29/05/15 15:30, Dinar valeev wrote:
> From: Dinar Valeev <dvaleev at suse.com>
> 
> Original issue is home and end keys are not functional in grub2.
> Later I've found other inconsistencies in f1-f12 keys.
> 
> "Correct sequence" was crabbed by pressing key on cat running in
> xterm.
> 
> Tested with Home, End, F2, Del and F10 keys in grub2
> 
> Signed-off-by: Dinar Valeev <dvaleev at suse.com>
> ---
>  lib/libusb/usb-hid.c | 40 +++++++++++++++++-----------------------
>  1 file changed, 17 insertions(+), 23 deletions(-)
> 
> diff --git a/lib/libusb/usb-hid.c b/lib/libusb/usb-hid.c
> index f0cab8a..ccd5ba9 100644
> --- a/lib/libusb/usb-hid.c
> +++ b/lib/libusb/usb-hid.c
...
> @@ -278,7 +274,7 @@ static void check_key_code(uint8_t *buf)
>  				case 0x45:
>  					write_key(0x1b);	       /* F12 */
>  					write_key(0x5b);
> -					write_key(0x31);
> +					write_key(0x32);
>  					write_key(0x34);
>  					write_key(0x7e);
>  					break;

... I'm especially interested in this hunk here. One of our testers ran
into the problem that you can not enter the boot menu when using USB
keyboard (and starting QEMU with "-boot menu=on"), and I think this is
related to this hunk.

Looking at "f12-pressed?" in slof/fs/start-up.fs you can also easily see
that the menu code expects a "32" instead of "31" here, and Dinar's
patch fixes this issue!

 Thomas



More information about the Linuxppc-dev mailing list