Keymap Issue: Arrow keys in XRDP do not work on Debian Linux

After installing xrdp on a fresh Debian Wheezy (7.1) installation, three keys on the keyboard (two arrow keys and the pipe |) were not working as expected via RDP.

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.

The solution:

  • 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:

km-0409.ini

Voila – it works.



Facebooktwittergoogle_plusredditpinterestlinkedinmail

7 comments

Leave a Reply

Your email address will not be published. Required fields are marked *