X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/c4510182f3c02e390184bee518940e325f064b20..fa57b4a05aa12d594f40e0894e0ac6f810a7095c:/lunaix-os/kernel/peripheral/ps2kbd.c 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);