Keymap Issue: Arrow keys in XRDP do not work on Debian Linux
The arrow up key would minimize/maximze the active window in GNOME while the arrow down key had no or some non-obvious function. The pipe-character just acted as ALT-GR wasn’t pressed.
After some investigation I found out that xrdp ships with a tool called xrdp-genkeymap, which should generate a correct xrdp-keymap (in my case /etc/xrdp/km-0409.ini which is the corresponding file for the German keyboard layout) from the currently active keymap in Xorg. I tried that and surprise: it didn’t work and all umlaut and function keys now were completely wrong.
- Use xmodmap -pk to get a list of the correct keymaps from Xorg
- Note the correct keysyms (outputs in hexadecimal notation) and the corresponding key identifier for the offending keys
- Convert the hexadecimal keysyms to decimal
- Edit the km-0409.ini (or the file used for your keyboard layout – see column “Culture Code” and remove the 0x in front to find out the number in the filename) and put/replace the working keysyms, in decimal notation, behind the colon of broken identifiers (under the [shift] and the [noshift] (only needed for some special keys) sections ) Each modifier key has its own section
- Save and re-login
If you happen to use a German keyboard layout and are affected by exactly the same keys not working as just described, you can download the fixed .ini file below:
Voila – it works.