X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/c4510182f3c02e390184bee518940e325f064b20..4b6190b935dd75d8ddd514a05c7c7343e32c0cdc:/lunaix-os/kernel/peripheral/ps2kbd.c?ds=sidebyside diff --git a/lunaix-os/kernel/peripheral/ps2kbd.c b/lunaix-os/kernel/peripheral/ps2kbd.c index 04debc8..6f17176 100644 --- a/lunaix-os/kernel/peripheral/ps2kbd.c +++ b/lunaix-os/kernel/peripheral/ps2kbd.c @@ -274,11 +274,11 @@ kbd_buffer_key_event(kbd_keycode_t key, uint8_t scancode, kbd_kstate_t state) key = key & (0xffdf | -('a' > key || key > 'z' || !(state & KBD_KEY_FCAPSLKED))); - struct input_evt_pkt ipkt = { - .pkt_type = (state & KBD_KEY_FPRESSED) ? PKT_PRESS : PKT_RELEASE, - .scan_code = scancode, - .sys_code = key, - }; + struct input_evt_pkt ipkt = { .pkt_type = (state & KBD_KEY_FPRESSED) + ? PKT_PRESS + : PKT_RELEASE, + .scan_code = scancode, + .sys_code = (state << 16) | key }; input_fire_event(kbd_idev, &ipkt);