USB: HID: fix E0/E1 keys not sending "pressed down" event, like arrow keys etc.

RAWKEYBOARD::Flags actually _is_ a bitmap for a change
This commit is contained in:
jackun 2020-12-06 14:14:41 +02:00
parent 91d4c4aa37
commit ade01ecb86
1 changed files with 1 additions and 5 deletions

View File

@ -140,11 +140,7 @@ namespace usb_hid
{
if (hs->kind != HID_KEYBOARD || !hs->kbd.eh_entry)
return;
static uint32_t nr = 0;
nr++;
if (nr > 10)
nr = 0;
if (KEYBOARD_OVERRUN_MAKE_CODE == k.MakeCode)
return;
@ -165,7 +161,7 @@ namespace usb_hid
InputEvent ev{};
ev.type = INPUT_EVENT_KIND_KEY;
ev.u.key.down = !k.Flags;
ev.u.key.down = !(k.Flags & RI_KEY_BREAK);
ev.u.key.key.type = KEY_VALUE_KIND_QCODE;
ev.u.key.key.u.qcode = qcode;