[PATCH 4/4] winex11.drv: Dump keysyms and translations for all keys.
Giovanni Mascellani
gmascellani at codeweavers.com
Fri Jan 22 05:28:26 CST 2021
Dump all we can see about the user keyboard, so that their +keyboard
logs can be used to fix layout tables.
Signed-off-by: Giovanni Mascellani <gmascellani at codeweavers.com>
---
dlls/winex11.drv/keyboard.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/dlls/winex11.drv/keyboard.c b/dlls/winex11.drv/keyboard.c
index fe4a29c4b06..281cd1b1b1a 100644
--- a/dlls/winex11.drv/keyboard.c
+++ b/dlls/winex11.drv/keyboard.c
@@ -1477,6 +1477,19 @@ X11DRV_KEYBOARD_DetectLayout( Display *display )
for (i = 0; i < syms; i++) {
if (!(keysym = keycode_to_keysym (display, keyc, i))) continue;
ckey[keyc][i] = keysym_to_char(keysym);
+ if (TRACE_ON(keyboard))
+ {
+ char buf[32];
+ WCHAR bufW[32];
+ int len, lenW;
+ KeySym orig_keysym = keysym;
+ len = XkbTranslateKeySym(display, &keysym, 0, buf, sizeof(buf), NULL);
+ lenW = MultiByteToWideChar(CP_UNIXCP, 0, buf, len, bufW, ARRAY_SIZE(bufW));
+ if (lenW < ARRAY_SIZE(bufW))
+ bufW[lenW] = 0;
+ TRACE("keycode %u, index %d, orig_keysym 0x%04lx, keysym 0x%04lx, buf %s, bufW %s\n",
+ keyc, i, orig_keysym, keysym, debugstr_a(buf), debugstr_w(bufW));
+ }
}
}
--
2.30.0
More information about the wine-devel
mailing list