fix both dpad up in mouse mode and lctrl

This commit is contained in:
Denis 2023-12-19 21:23:01 +01:00
parent 18c1e27c3a
commit 793f9e7e56
No known key found for this signature in database
GPG key ID: DD9B63F805CF5C03

View file

@ -436,7 +436,7 @@ int virt_kbd_send(virt_kbd_t *const kbd, keyboard_status_t *const status, struct
}
if (status->lctrl != kbd->prev_lctrl) {
tmp_ev.code = KEYBOARD_KEY_LCRTL;
tmp_ev.code = KEY_LEFTCTRL;
tmp_ev.value = kbd->prev_lctrl = status->lctrl;
if (write(kbd->fd, &tmp_ev, sizeof(tmp_ev)) != sizeof(struct input_event)) {
res = errno < 0 ? errno : -1 * errno;
@ -445,7 +445,7 @@ int virt_kbd_send(virt_kbd_t *const kbd, keyboard_status_t *const status, struct
}
if (status->up != kbd->prev_up) {
tmp_ev.code = KEY_LEFTCTRL;
tmp_ev.code = KEY_UP;
tmp_ev.value = kbd->prev_up = status->up;
if (write(kbd->fd, &tmp_ev, sizeof(tmp_ev)) != sizeof(struct input_event)) {
res = errno < 0 ? errno : -1 * errno;