You are not logged in.
I wanted to remap some keys on the fly. To do this I tend to use xmodmap. I ran the following two lines:
xmodmap -e "keycode 106 = KP_Divide backslash"
xmodmap -e "keycode 49 = grave bar backslash"I previously ran these lines and the mapping changed correctly. However, after the latest update (which was quite large as I hadn't logged on over the holiday period), running these changes the output of
xmodmap -pkeand xev identifies the change, but nothing else does. I even tried doing
xmodmap -e "keycode 106 = backslash"to see if the issue was with the modifier keys, but that had no effect either. At this point, I am quite stumped as to why the change is not being propagated to the rest of X. Any advice would be greatly appreciated.
Last edited by DAMO238 (2024-01-02 12:27:16)
Offline
And what exactly is "nothing else"?
Are you maybe (now) running a wayland session?
loginctl session-statusOffline
Thanks for your reply. By "nothing else", I mean that I tested a bunch of applications including alacritty, firefox, nheko, etc and none of them respect the xmodmap setting. I am not running Wayland, since I use i3 which doesn't support Wayland. This is confirmed by interrogating systemd as you suggested.
Offline
setxkbmap -print -queryOffline
Not really sure what to be looking for here. I recognise the base layout I use for my keyboard, but should I be seeing the changes from xmodmap here as well?
xkb_keymap {
xkb_keycodes { include "evdev+aliases(qwerty)" };
xkb_types { include "complete" };
xkb_compat { include "complete" };
xkb_symbols { include "pc+gb+inet(evdev)+altwin(alt_super_win)+capslock(swapescape)" };
xkb_geometry { include "pc(pc105)" };
};
rules: evdev
model: pc105
layout: gb
options: caps:swapescape,altwin:alt_super_winLast edited by DAMO238 (2024-01-01 17:38:38)
Offline
I suspected a multi-layout setup (but it's not)
Do you use some kind of input method?
printenvDoes xterm also not reflect the expected keymap?
Offline
So it was working in xterm, which led me down a road of investigating, from a developer perspective, how keyboard inputs are read. And it seems the culprit is a library called winit. It only affects one version as far as I can tell, but it made it so that it would not hot reload the xmodmap. This is verified by opening another instance of any affected program *after* making the change and seeing that the change works. Since I don't really want to move away from the official repos where possible, I will simply reinstantiate any faulty instances where needed and wait for an update with updated winit.
TL;DR: It is a bug in a commonly used library that has already been fixed on the development branch.
Thanks for all your help!
Last edited by DAMO238 (2024-01-02 10:28:32)
Offline
culprit is a library called winit
https://docs.rs/winit/latest/winit/ ?
Butbutbut… I though if it's written in rust that means it's bugfree??
So that was a lie… ![]()
If you're cmoing along this thread, rust is a make dep. for the mentioned clients only, what kinda hides the problem.
Thanks for the investigation and please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline