Keymaps have a similar flow to the OSI model, though not nearly as well defined. I'm currently remapping at a higher level than I would like. Obviously Layer 1 corresponds to the physical keyboard and Layer 7 to the application, but I'm not sure how many other layers there are or where they fall in line.
If this were a desktop with a dedicated programmable physical keyboard, I'd be set, but alas, it's a laptop, and I need to maintain the remaps while using the built-in keyboard.
FWIW, I'm swapping the following pairs of keys: [Tilde/Esc], [Caps/LCtrl], [Back{space,slash}]. I also use Dvorak, but that's configured in the OS in the standard way.
Currently, I'm modifying /usr/share/X11/xkb/keycodes/evdev to make my changes in X (and creating a custom layout file for consoles, but that's not relevant here). I'm not sure where this falls in the "layer stack."
The issue: My keymap doesn't translate to Proxmox console sessions, which uses a web VNC client. (The layout also doesn't apply, but that's expected.) The issue is clearly that the VNC client is hooking the keyboard at a lower layer where the evdev remap isn't yet applied.
In Windows, I use a utility called KeyTweak to generate scancode maps for the registry, which seems to basically be "Layer 3." I've played games that apparently hooked the keyboard at "Layer 2," but that's barely an issue since there's very little typing in most games.
In conclusion, I'm not sure where evdev falls in my imaginary OSI keyboard model, but how can I remap at a lower layer? I have no need to swap out of the remap for any reason, so this change can basically be permanent. If I could do it in the BIOS I would.
setkeycodes
. – Gilles 'SO- stop being evil' Oct 20 '21 at 13:00setkeycodes
doesn't work on USB. On OpenSUSE Tumbleweed, the manpage is dated 8 Nov 1994 and mentions kernel 2.6! Currently looking into udev for a possible solution – Joe Fruchey Oct 20 '21 at 19:29