Author Topic: FreeRDP keyboard settings / host does not honor German keyboard layout  (Read 8106 times)

Andi B.

  • Hero Member
  • *****
  • Posts: 871
  • Karma: +14/-2
    • View Profile
I've tried FreeRDP to connect to different Linux boxes. It works but using FreeRDP the Linux host uses EN keyboard layout. All my Linux boxes does have German keyboards attached and work as expected when I'm sitting in front of them. My OS/2 system has a German keyboard too. But when I connect from my OS/2 system a Linux host via FreeRDP they get the English keys instead the German ones.

I don't see any setting in our FreeRDP port to translate the keys. Is there anything I'v to adjust on Linux (host) side?

Andi B.

  • Hero Member
  • *****
  • Posts: 871
  • Karma: +14/-2
    • View Profile
Re: FreeRDP keyboard settings / host does not honor German keyboard layout
« Reply #1 on: December 08, 2023, 06:26:07 pm »
Answering myself, I've to set for the rdp user in hardware setting the keyboard layout. Only problem now is "<Alt Gr>" and "<Alt> <Strg>" do not work as expected. F.i. I can't input a ~ or € on the remote system.

Andi B.

  • Hero Member
  • *****
  • Posts: 871
  • Karma: +14/-2
    • View Profile
Re: FreeRDP keyboard settings / host does not honor German keyboard layout
« Reply #2 on: February 03, 2024, 11:31:27 am »
Now I've still the problem that I've to switch manually from 'en' to 'de' every time I connect to this linux box. This drives me crazy.

Directly connected to the Linux box all works well. I log in and have my default German keyboard layout. But connect in parallel via FreeRDP to the same system it always switch to 'en'. Have to click in the bar (similar what xcenter is) to switch back to 'de'. There must be something FreeRDP related which let Linux think it should use English keyboard instead. Some LANG setting or?

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1354
  • Karma: +26/-0
    • View Profile
Re: FreeRDP keyboard settings / host does not honor German keyboard layout
« Reply #3 on: February 03, 2024, 03:03:04 pm »
Hey Andi,

I've tried FreeRDP to connect to different Linux boxes. It works but using FreeRDP the Linux host uses EN keyboard layout. All my Linux boxes does have German keyboards attached and work as expected when I'm sitting in front of them. My OS/2 system has a German keyboard too. But when I connect from my OS/2 system a Linux host via FreeRDP they get the English keys instead the German ones...

So I picked this up from an on-line FreeRDP User Manual (https://sysadminmosaic.ru/_media/freerdp/freerdp-user-manual.pdf), and while it's specficially calling out the use of xfreerdp, perhaps it works on our port as well:

Code: [Select]
xfreerdp .../kbd:0x409

where "/kbd:0x409" is they remote session keyboard layout you want to use, and in the case of non-EN setups you can use one of these:

Code: [Select]
Keyboard Layouts
0x00000401 Arabic (101)
0x00000402 Bulgarian
0x00000404 Chinese (Traditional) - US Keyboard
0x00000405 Czech
0x00000406 Danish
0x00000407 German
0x00000408 Greek
0x00000409 US

Looking at our port, I see the following option showing up:

Code: [Select]
/kbd:[layout:[0x<id>|<name>],lang:<0x<id>>,fn-key:<value>,type:<value>
      subtype:<value>,unicode[:on|off],remap:<key1>=<value1>
      remap:<key2>=<value2>,pipe:<filename>]
                                  Keyboard related options:* layout: set the
                                  keybouard layout announced to the server*
                                  lang: set the keyboard language identifier
                                  sent to the server* fn-key: Function key
                                  value* pipe: Name of a named pipe that can
                                  be used to type text into the RDP session

So it would at least appear like you should be able to set this. Give it a try and see if that helps?

Andi B.

  • Hero Member
  • *****
  • Posts: 871
  • Karma: +14/-2
    • View Profile
Re: FreeRDP keyboard settings / host does not honor German keyboard layout
« Reply #4 on: February 03, 2024, 04:17:13 pm »
Our FreeRDP comes with nice objects to setup a connection. Unfortunately I didn't find how to add additional parameters there. So I played with command line. But no matter what I try I can't get the /kdb: option to work. F.e.
Code: [Select]
ofreerdp.exe /u:xxxx /p:xxxx /w:2100 /h:1800 /v:m92p works but
Code: [Select]
ofreerdp.exe /u:xxxx /p:xxxx /w:2100 /h:1800 /kdb:de /v:m92p or any other value I tried for /kdb including /kbd:0x409 does not. :-(

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1354
  • Karma: +26/-0
    • View Profile
Re: FreeRDP keyboard settings / host does not honor German keyboard layout
« Reply #5 on: February 03, 2024, 04:37:46 pm »
...
Code: [Select]
ofreerdp.exe /u:xxxx /p:xxxx /w:2100 /h:1800 /kdb:de /v:m92p or any other value I tried for /kdb including /kbd:0x409 does not. :-(

Could it be that you need to spec out the "lang" part of this as well?:

Code: [Select]
ofreerdp.exe /u:xxxx /p:xxxx /w:2100 /h:1800 /kdb:0x407,lang:0x407 /v:m92p


This should set both the keyboard layout AND language to be used. I'm assuming here both IDs are the same value for German setup.

Andi B.

  • Hero Member
  • *****
  • Posts: 871
  • Karma: +14/-2
    • View Profile
Re: FreeRDP keyboard settings / host does not honor German keyboard layout
« Reply #6 on: February 03, 2024, 04:47:21 pm »
Unfortunately not. But I've found a bug report that says /kbd: together with some size options don't work. Maybe that's fixed now. But would be cool if I could find some working example.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1354
  • Karma: +26/-0
    • View Profile
Re: FreeRDP keyboard settings / host does not honor German keyboard layout
« Reply #7 on: February 03, 2024, 08:58:35 pm »
...not sure what else to try, but msg Andrey, I've worked with him on a few issues in the past and he's really good & attentive...so I'm guessing he'll give this things a try!

EDIT
====
No answers, but perhaps some more info to simplify the troubleshooting:

1) MS Info on Default Input Locales => https://learn.microsoft.com/en-us/previous-versions/windows/it-pro/windows-vista/cc766503%28v=ws.10%29?redirectedfrom=MSDN

2) FreeRDP issue tracker - 'Option to use the local keyboard layout' => https://github.com/FreeRDP/FreeRDP/issues/3121

- this is NOT quite what you are trying to do, but some of the comments reference the type of functionality that I think you are aiming to have
« Last Edit: February 03, 2024, 11:55:27 pm by Dariusz Piatkowski »

Digi

  • Jr. Member
  • **
  • Posts: 69
  • Karma: +4/-1
  • http://os2.snc.ru/
    • View Profile
    • OS/2 ports and applications
Re: FreeRDP keyboard settings / host does not honor German keyboard layout
« Reply #8 on: February 06, 2024, 12:31:01 am »
But when I connect from my OS/2 system a Linux host via FreeRDP they get the English keys instead the German ones.

Please try playing with the /kbd: switch in the latest version ( see http://os2.snc.ru/product-freerdp.html ). Something like this: /kbd:layout:0x00000407,lang:0x0407
All previous OS/2 ports were missing some function calls associated with this switch to configure the keyboard.

Note that lists of keyboards and languages can be obtained with the /list: switch.