Configs/Keyboards
- I like to map
- The most consistent way I've found to achieve this is with setkeycodes
- Works across Arch, Fedora, Ubuntu and different window managers
- First attempt:
#!/bin/sh # showkey --scancodes # showkey --keycodes # Capslock -> Left Ctrl setkeycodes 3a 29 setkeycodes ba 29 # Right Alt -> Escape setkeycodes e038 1 setkeycodes e0b8 1 # https://wiki.archlinux.org/index.php/Map_scancodes_to_keycodes
- Automating this with systemd:
[Unit] Description=Customize keycodes on boot [Service] Type=oneshot # Capslock -> Left Ctrl ExecStart=/usr/bin/setkeycodes 3a 29 ExecStart=/usr/bin/setkeycodes ba 29 # Right Alt -> Escape ExecStart=/usr/bin/setkeycodes e038 1 ExecStart=/usr/bin/setkeycodes e0b8 1 [Install] WantedBy=multi-user.target
- Works across Arch, Fedora, Ubuntu and different window managers