Open twaik opened 5 months ago
XKB's group system is rather complex, but it could be worth exploring if this could be used. Switching group isn't as obvious as the other states, though, so I'm not sure exactly what needs to be done here.
This could be a mitigation for #93.
I implemented scanning layouts and switching layout before inputting symbol (in XCB, not on X server side) a while ago, I hope it will be helpful.
https://github.com/termux/termux-x11/blob/62bf17ddf8a8cacd945f8ef3fa9e91cec42fa39c/app/src/main/cpp/lorie/xcb-connection.hpp#L254-L515
The most interesting parts are reload_keymaps
(which scans the whole keymap table including all layouts) and send_keysym
which sends symbols with changing layout before sending key event and restoring it after that.
Describe the bug Hello. It seems like when you try to input symbol from layout which is not selected as current layout X server does not even try to scan secondary (or non-selected) layout and to use it. Only primary layout and it's shift levels are being used.
To Reproduce
vncserver -SecurityTypes None -xstartup xterm -fg
.xev
inxterm
window.setxkbmap us,ru
on both main andvncserver
's X servers.alt-shift
(ifalt-shift
toggle is configured) or use your DE's layout switcher (only on main X server).xev
's window.Xev will show you scratch (fake?) keycodes and not real keycodes that you can reproduce on your local X server.
Expected behavior X server should scan secondary layouts to find symbols and switch layouts when needed.
Screenshots
Client (please complete the following information):
Server (please complete the following information):
vncserver -SecurityTypes None -xstartup xterm -fg
Additional context N/a