mirror of
https://github.com/libsdl-org/SDL.git
synced 2026-05-09 01:14:24 +02:00
Removed raw key events
They weren't adding any value over the existing keyboard events
This commit is contained in:
@@ -373,10 +373,8 @@ void SDL_EVDEV_Poll(void)
|
||||
Uint64 timestamp = SDL_EVDEV_GetEventTimestamp(event);
|
||||
scancode = SDL_EVDEV_translate_keycode(event->code);
|
||||
if (event->value == 0) {
|
||||
SDL_SendRawKeyboardKey(timestamp, (SDL_KeyboardID)item->fd, event->code, scancode, false);
|
||||
SDL_SendKeyboardKey(timestamp, (SDL_KeyboardID)item->fd, event->code, scancode, false);
|
||||
} else if (event->value == 1 || event->value == 2 /* key repeated */) {
|
||||
SDL_SendRawKeyboardKey(timestamp, (SDL_KeyboardID)item->fd, event->code, scancode, true);
|
||||
SDL_SendKeyboardKey(timestamp, (SDL_KeyboardID)item->fd, event->code, scancode, true);
|
||||
}
|
||||
SDL_EVDEV_kbd_keycode(_this->kbd, event->code, event->value);
|
||||
|
||||
@@ -573,12 +573,10 @@ static void Translate_to_keycode(SDL_WSCONS_input_data *input, int type, keysym_
|
||||
}
|
||||
for (i = 0; i < SDL_arraysize(conversion_table); i++) {
|
||||
if (conversion_table[i].sourcekey == group[0]) {
|
||||
SDL_SendRawKeyboardKey(timestamp, input->keyboardID, group[0], conversion_table[i].targetKey, (type == WSCONS_EVENT_KEY_DOWN));
|
||||
SDL_SendKeyboardKey(timestamp, input->keyboardID, group[0], conversion_table[i].targetKey, (type == WSCONS_EVENT_KEY_DOWN));
|
||||
return;
|
||||
}
|
||||
}
|
||||
SDL_SendRawKeyboardKey(timestamp, input->keyboardID, group[0], SDL_SCANCODE_UNKNOWN, (type == WSCONS_EVENT_KEY_DOWN));
|
||||
SDL_SendKeyboardKey(timestamp, input->keyboardID, group[0], SDL_SCANCODE_UNKNOWN, (type == WSCONS_EVENT_KEY_DOWN));
|
||||
}
|
||||
|
||||
@@ -820,7 +818,6 @@ static void updateKeyboard(SDL_WSCONS_input_data *input)
|
||||
} break;
|
||||
case WSCONS_EVENT_ALL_KEYS_UP:
|
||||
for (i = 0; i < SDL_SCANCODE_COUNT; i++) {
|
||||
SDL_SendRawKeyboardKey(timestamp, input->keyboardID, 0, (SDL_Scancode)i, false);
|
||||
SDL_SendKeyboardKey(timestamp, input->keyboardID, 0, (SDL_Scancode)i, false);
|
||||
}
|
||||
break;
|
||||
@@ -829,7 +826,6 @@ static void updateKeyboard(SDL_WSCONS_input_data *input)
|
||||
}
|
||||
|
||||
if (input->type == WSKBD_TYPE_USB && events[i].value <= 0xE7) {
|
||||
SDL_SendRawKeyboardKey(timestamp, input->keyboardID, 0, (SDL_Scancode)events[i].value, (type == WSCONS_EVENT_KEY_DOWN));
|
||||
SDL_SendKeyboardKey(timestamp, input->keyboardID, 0, (SDL_Scancode)events[i].value, (type == WSCONS_EVENT_KEY_DOWN));
|
||||
} else {
|
||||
Translate_to_keycode(input, type, events[i].value, timestamp);
|
||||
|
||||
Reference in New Issue
Block a user