Xmodmap reset on keyboard reconnect (issue)
Peter Hutterer
peter.hutterer at who-t.net
Mon Jan 27 11:15:33 UTC 2025
On Fri, Jan 17, 2025 at 04:21:52PM -0800, Tyler Mayes wrote:
> I use a split keyboard (dacyl manuform) that utilizes qmk. One of the keys
> on the thumbcluster is set to "menu" or "app". I use xmodmap to map this to
> hyper for use in emacs, as well as enabling F13-F24.
>
> Everything works splendidly barring one small issue. Due to the custom
> nature of the keyboard I use a magnetic usb-c to enable me to disconnect my
> keyboard and take it to work or other places where I will need it.
>
> Upon reconnect xmodmap resets to defaults. This wouldn't be as much of an
> issue if I shutdown my pc at all times but I leave it on for file syncing
> and remote access.
>
> It's rather tedious to re-run my bash script every time I reconnect. What
> would be the best way to prevent reconnecting keyboards to set to system
> defaults? Or alternatively what is the process to redefine the defaults to
> my use case?
>
> I've tried searching this up online but hyper seems to be a pretty
> infrequently used feature. I tried looking into
> /usr/share/x11/xkb/rules/xorg.lst but it seems the xkboptions value might
> not be freeform but requires preset options.
Use the custom layout and then switch your xorg.conf.d (or desktop
environment) to use that:
https://who-t.blogspot.com/2021/02/a-pre-supplied-custom-keyboard-layout.html
Cheers,
Peter
More information about the xorg
mailing list