Virtual keyboard: set EV_SYN and EV_MSC event bits

This commit is contained in:
dec05eba
2024-12-26 15:28:52 +01:00
parent e5b745d696
commit 62fe500637

View File

@@ -270,6 +270,8 @@ static int setup_virtual_keyboard_input(const char *name) {
} }
bool success = true; bool success = true;
success &= (ioctl(fd, UI_SET_EVBIT, EV_SYN) != -1);
success &= (ioctl(fd, UI_SET_EVBIT, EV_MSC) != -1);
success &= (ioctl(fd, UI_SET_EVBIT, EV_KEY) != -1); success &= (ioctl(fd, UI_SET_EVBIT, EV_KEY) != -1);
for(int i = 1; i < KEY_MAX; ++i) { for(int i = 1; i < KEY_MAX; ++i) {
success &= (ioctl(fd, UI_SET_KEYBIT, i) != -1); success &= (ioctl(fd, UI_SET_KEYBIT, i) != -1);