From b9327e6b286295e6ef304ef14dcf1f408a4fadb2 Mon Sep 17 00:00:00 2001 From: Martin Rys Date: Tue, 3 Sep 2024 14:35:26 +0200 Subject: [PATCH] Swap Compose and Kana values to conform to USB HID spec Should fix https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/issues/204 Current state conflicts with XKB which defines them correctly. NUM and CAPS are still incorrectly swapped, but it's equally wrong on XKB's side and everywhere else, so it's just cosmetic and a breaking change just to satisfy USB HID ordering is not worth it, since the keys work fine this way anyway. Part-of: --- src/evdev.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/evdev.c b/src/evdev.c index ab4d7d6..6d7d377 100644 --- a/src/evdev.c +++ b/src/evdev.c @@ -75,8 +75,8 @@ #define CAPSFLAG 1 #define NUMFLAG 2 #define SCROLLFLAG 4 -#define MODEFLAG 8 -#define COMPOSEFLAG 16 +#define COMPOSEFLAG 8 +#define MODEFLAG 16 #ifndef ABS_MT_SLOT #define ABS_MT_SLOT 0x2f @@ -1117,8 +1117,8 @@ EvdevKbdCtrl(DeviceIntPtr device, KeybdCtrl *ctrl) { CAPSFLAG, LED_CAPSL }, { NUMFLAG, LED_NUML }, { SCROLLFLAG, LED_SCROLLL }, - { MODEFLAG, LED_KANA }, - { COMPOSEFLAG, LED_COMPOSE } + { COMPOSEFLAG, LED_COMPOSE }, + { MODEFLAG, LED_KANA } }; InputInfoPtr pInfo;