From: Matteo Bruni <mbruni@codeweavers.com> --- dlls/winewayland.drv/wayland_keyboard.c | 2 +- include/Makefile.in | 1 + include/wine/evdev-keycodes.h | 106 ++++++++++++++++++++++++ 3 files changed, 108 insertions(+), 1 deletion(-) create mode 100644 include/wine/evdev-keycodes.h diff --git a/dlls/winewayland.drv/wayland_keyboard.c b/dlls/winewayland.drv/wayland_keyboard.c index 0a6eea2fa73..707f2cf0d61 100644 --- a/dlls/winewayland.drv/wayland_keyboard.c +++ b/dlls/winewayland.drv/wayland_keyboard.c @@ -26,7 +26,6 @@ #include "config.h" #include <stdlib.h> -#include <linux/input.h> #undef SW_MAX /* Also defined in winuser.rh */ #include <sys/mman.h> #include <unistd.h> @@ -34,6 +33,7 @@ #include "waylanddrv.h" #include "wine/debug.h" #include "wine/server.h" +#include "wine/evdev-keycodes.h" WINE_DEFAULT_DEBUG_CHANNEL(keyboard); WINE_DECLARE_DEBUG_CHANNEL(key); diff --git a/include/Makefile.in b/include/Makefile.in index 47df75fb59e..926acb307b2 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -1116,6 +1116,7 @@ SOURCES = \ wine/debug.h \ wine/dplaysp.h \ wine/epm.idl \ + wine/evdev-keycodes.h \ wine/exception.h \ wine/fil_data.idl \ wine/gdi_driver.h \ diff --git a/include/wine/evdev-keycodes.h b/include/wine/evdev-keycodes.h new file mode 100644 index 00000000000..785b55a231c --- /dev/null +++ b/include/wine/evdev-keycodes.h @@ -0,0 +1,106 @@ +/* + * evdev keycodes + * + * Copyright 2026 Matteo Bruni + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +#ifndef __WINE_EVDEV_KEYCODES__ +#define __WINE_EVDEV_KEYCODES__ + +#define KEY_NUMLOCK 69 + +#define KEY_KPDOT 83 + +#define KEY_102ND 86 +#define KEY_F11 87 +#define KEY_F12 88 +#define KEY_KPENTER 96 +#define KEY_RIGHTCTRL 97 +#define KEY_KPSLASH 98 +#define KEY_SYSRQ 99 +#define KEY_RIGHTALT 100 +#define KEY_LINEFEED 101 +#define KEY_HOME 102 +#define KEY_UP 103 +#define KEY_PAGEUP 104 +#define KEY_LEFT 105 +#define KEY_RIGHT 106 +#define KEY_END 107 +#define KEY_DOWN 108 +#define KEY_PAGEDOWN 109 +#define KEY_INSERT 110 +#define KEY_DELETE 111 +#define KEY_MUTE 113 +#define KEY_VOLUMEDOWN 114 +#define KEY_VOLUMEUP 115 +#define KEY_POWER 116 +#define KEY_KPPLUSMINUS 118 +#define KEY_PAUSE 119 +#define KEY_SCALE 120 + +#define KEY_LEFTMETA 125 +#define KEY_RIGHTMETA 126 +#define KEY_COMPOSE 127 +#define KEY_STOP 128 + +#define KEY_OPEN 134 + +#define KEY_FIND 136 + +#define KEY_HELP 138 +#define KEY_MENU 139 + +#define KEY_SLEEP 142 + +#define KEY_PROG1 148 +#define KEY_PROG2 149 + +#define KEY_MAIL 155 +#define KEY_BOOKMARKS 156 +#define KEY_COMPUTER 157 +#define KEY_BACK 158 +#define KEY_FORWARD 159 + +#define KEY_NEXTSONG 163 +#define KEY_PLAYPAUSE 164 +#define KEY_PREVIOUSSONG 165 +#define KEY_STOPCD 166 + +#define KEY_HOMEPAGE 172 +#define KEY_REFRESH 173 +#define KEY_EXIT 174 + +#define KEY_F13 183 +#define KEY_F14 184 +#define KEY_F15 185 +#define KEY_F16 186 +#define KEY_F17 187 +#define KEY_F18 188 +#define KEY_F19 189 +#define KEY_F20 190 +#define KEY_F21 191 +#define KEY_F22 192 +#define KEY_F23 193 +#define KEY_F24 194 + +#define KEY_PRINT 210 + +#define KEY_CANCEL 223 + +#define KEY_MEDIA 226 + +#endif -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/10963