You are not logged in.

#1 2019-11-29 10:41:14

multipitch
Member
From: Dublin, Ireland
Registered: 2013-10-30
Posts: 14

[Solved] Xrdp keyboard layout randomly switching to US during use

I'm using arch on a hyper-v VM.
I'm running Gnome.
I frequently encounter an issue when I'm working away in my IDE of choice.
Randomly, the keyboard layout is switching from UK to US.
It reverts to UK on a reboot but I can't get it to revert to UK during the session.

When I open "Region & language" settings, I only have one keyboard type listed - "English (UK)".
When I press on the "eye" icon to bring up the visual keyboard, I observe the following (by way of example):
If I try to type "@", which on my UK keyboard is Shift+' (apostrophe, near the enter key), the visual keyboard shows me pressing Shift+2, which is where "@" is on a US keyboard.

This mis-mapping occurs in all application in Gnome and does not persist across reboots.

Last edited by multipitch (2019-12-03 09:45:23)

Offline

#2 2019-12-02 10:52:12

multipitch
Member
From: Dublin, Ireland
Registered: 2013-10-30
Posts: 14

Re: [Solved] Xrdp keyboard layout randomly switching to US during use

I think it's not a gnome problem but an xrdp problem.
Have tried a few things e.g. modifying xrdp_keyboard.ini and adding/removing km-*.ini files in /etc/xrdp, but still no joy.
If I ssh into the vm from the host, the terminal keymap is correct.

Offline

#3 2019-12-03 09:44:09

multipitch
Member
From: Dublin, Ireland
Registered: 2013-10-30
Posts: 14

Re: [Solved] Xrdp keyboard layout randomly switching to US during use

Fixed... looking at xrdp logs...

$ sudo cat /var/log/xrdp.log | grep key
...
[20191202-13:00:54] [INFO ] Cannot find keymap file /etc/xrdp/km-00001809.ini
[20191202-13:00:54] [INFO ] Loading keymap file /etc/xrdp/km-00000409.ini
...

A bit of googling shows that the ...1809 keymap it is looking for is the keymap for an Irish keyboard.
UK and Irish keyboard layouts are identical, and I usually just set things to UK.
Not sure why this suddenly became an issue - could be some change in the host os (Work PC running Windows 10, over which I have very limited control).

Fixed as follows:

$ sudo cp /etc/xrdp/km-00000809.ini /etc/xrdp/km-00001809.ini
$ sudo cp /etc/xrdp/xrdp_keyboard.ini /etc/xrdp/xrdp_keyboard.ini.old
$ sudo vim /etc/xrdp/xrdp_keyboard.ini

Added the follwing entries to xrdp_keyboard.ini:

...
[default_rdp_layouts]
...
rdp_layout_ie=0x00001809
...
[default_layouts_map]
...
rdp_layout_ie=ie
...

Finally:

$ sudo systemctl restart xrdp.service

Offline

Board footer

Powered by FluxBB