
1 min read
Map Keyboard Key
I am using a “Keychron K3 Pro” keyboard. Right of the space key there is a “Super” key to run the launcher (similar to windows key). Therefore the “Alt Right” key is missing and this makes creating umlauts more difficult. I am using the “Enlgish (int, with AltGr dead keys)” keyboard layout and pressing Alt Right+Shift Right+" gives me the
To identify the keys we need the scancode. You can run the following command to output the scancodes of the pressed keys:
sudo showkey --scancodes
The first code, in my case 0xe0
, is the super key.
I use hwdb
(hardware database) to remap the key. Create a new config file.
sudo vi /etc/udev/hwdb.d/70-keyboard.hwdb
And enter this input:
evdev:input:*
KEYBOARD_KEY_$SCANCODE=rightalt
In my case it was:
evdev:input:*
KEYBOARD_KEY_0xe0=rightalt
Reload the hardware database and the key is mapped.
sudo systemd-hwdb update
sudo udevadm trigger
Edits:
I found a simpler way to write umlauts. As the Alt Right
key acts as the compose key. The compose key can be re-assigned:
With this assignment I still don’t have a Alt Right key, but at least I can write ä,ö and ü.
Categories: DesktopTags: linux , terminal , keyboard
Edit this page
Show statistic for this page