June 6, 2025
After I recently switched to Linux on my desktop system, I noticed that the “less than”/“greater than” key is switched with the circumflex key. This was only an issue on my Apple Magic Keyboard. For reference, it’s the German version and it is connected via Bluetooth. In case it’s helpful for you (or myself in the future), here’s how I fixed it. All of this assumes that you are using eudev or systemd’s udev.
I had to create a custom mapping in the file
/etc/udev/hwdb.d/magic-keyboard.hwdb
:
evdev:input:b0005v004Cp0267*
KEYBOARD_KEY_70035=102nd
KEYBOARD_KEY_70064=grave
Then run (with root privileges):
udevadm hwdb --update
udevadm trigger
If this doesn’t work for you, you might want to check if the device’s input ID is different for your keyboard. You can find it using
udevadm info /dev/input/eventsX
Replace X with the correct ID/number for the keyboard on your system (e.g.
/dev/input/events25). evtest
helped me to identify it.