From fa7392cd7002e6ef209918fffc9f19458b22c152 Mon Sep 17 00:00:00 2001 From: Ningyuan Li Date: Thu, 26 Oct 2023 10:33:28 +0900 Subject: [PATCH] added name for webOS scancodes --- src/video/wayland/SDL_waylandkeyboard.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/video/wayland/SDL_waylandkeyboard.c b/src/video/wayland/SDL_waylandkeyboard.c index d8cf07579b114..96a419528cd1f 100644 --- a/src/video/wayland/SDL_waylandkeyboard.c +++ b/src/video/wayland/SDL_waylandkeyboard.c @@ -38,6 +38,19 @@ int Wayland_InitKeyboard(_THIS) #endif SDL_SetScancodeName(SDL_SCANCODE_APPLICATION, "Menu"); +#ifdef SDL_VIDEO_DRIVER_WAYLAND_WEBOS + SDL_SetScancodeName(SDL_SCANCODE_WEBOS_CH_UP, "ChannelUp"); + SDL_SetScancodeName(SDL_SCANCODE_WEBOS_CH_DOWN, "ChannelDown"); + SDL_SetScancodeName(SDL_SCANCODE_WEBOS_BACK, "Back"); + SDL_SetScancodeName(SDL_SCANCODE_WEBOS_CURSOR_SHOW, "CursorShow"); + SDL_SetScancodeName(SDL_SCANCODE_WEBOS_CURSOR_HIDE, "CursorHide"); + SDL_SetScancodeName(SDL_SCANCODE_WEBOS_RED, "Red"); + SDL_SetScancodeName(SDL_SCANCODE_WEBOS_GREEN, "Green"); + SDL_SetScancodeName(SDL_SCANCODE_WEBOS_YELLOW, "Yellow"); + SDL_SetScancodeName(SDL_SCANCODE_WEBOS_BLUE, "Blue"); + SDL_SetScancodeName(SDL_SCANCODE_WEBOS_EXIT, "Exit"); +#endif + return 0; }