3 ms·
I just use what X-Windows supplies for customizing the keyboard. The way to tell the machine what modifier keys to use for what is with xmodmap. My .Xmodmap fil
by leephillips 5y ago
I just use what X-Windows supplies for customizing the keyboard. The way to tell the machine what modifier keys to use for what is with xmodmap. My .Xmodmap file contains:
clear control
clear mod2
clear mod4
keycode 134 = dead_greek dead_greek dead_greek dead_greek
keycode 108 = Multi_key
remove Lock = Caps_Lock
keycode 66 = Control_L
add control = Control_L
But you have to figure out the keycodes that your keyboard is sending to make it work for your particular machine. The program xev is good for this.
This mapping also makes the capslock key into another control key, which is good if you use Vim.
The Greek letters will be on keys that make sense, and the other Unicode characters are pretty rational too: to make é, type <mod>'e. You can make any key combination produce anything, even long strings, by putting the mappings in the Compose file. My Compose file is in /usr/share/X11/locale/en_US.UTF-8.
I have snippets in there, such as my email address. This way the mappings work anywhere, not just in a particular editor.
- e12e 5y agoThank you. Looks like custom input is still a little up in the air on Wayland. I guess one benefit is that some solutions will also work for the console (though not for the bootloader, so no "pi" boot options... but i can live with that...). https://unix.stackexchange.com/questions/292868/how-to-customise-keyboard-mappings-with-wayland https://unix.stackexchange.com/questions/292868/how-to-custo... In particular: https://gitlab.com/interception/linux/tools https://gitlab.com/interception/linux/tools https://gitlab.com/interception/linux/plugins/caps2esc https://gitlab.com/interception/linux/plugins/caps2esc (for remapping caps lock to escape - in the terminal and under Wayland).
- leephillips 5y agoOh, sorry, I don’t know anything about Wayland. It took me long enough to learn how to get X11 to do what I want, so I’m not about to learn a new system unless there is a big benefit. I don’t use multiple monitors or do anything that X11 can’t handle, so I'll stay here in 1987.