Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting (non-us) keyboard layout #303

Open
PWM-Master opened this issue Jan 13, 2024 · 3 comments
Open

Setting (non-us) keyboard layout #303

PWM-Master opened this issue Jan 13, 2024 · 3 comments

Comments

@PWM-Master
Copy link

I am using Debian Sid and Cage 0.1.5

Within the Debian setup "de" (german) is set for keyboard layout.
Default XKBDEFAULT under /etc/default/keyboard is set to "de".
Config "dpkg-reconfigure keyboard-configuration" was set to "de".
~/.profile contains environment variable "export XKB_DEFAULT_LAYOUT=de"
(This last step/hint was found in Cage docu/wiki)

Shell uses the correct german keyboard layout
but Cage persists using the us layout.

How could I customize a non-us keyboard layout for Cage?
Or should I open a bug?

@emersion
Copy link
Contributor

export XKB_DEFAULT_LAYOUT=de should be enough for Cage.

How are you starting Cage?

@PWM-Master
Copy link
Author

My (first) Cage application was freerdp2 in X11 and Wayland mode - syntax/start is with:

cage wlfreerdp -- /v:{rdp-ip}
or
cage xfreerdp -- /v:{rdp-ip}

In both cases keyboard does not change from "us" -
not in the freerdp authentication dialogue, nor in the rdp session itself.
I just installed/cross-checked the app xterm with

cage xterm

and keyboard was set succesfully to "de".
So the issue might (only?) be a freerdp related one...

@PWM-Master
Copy link
Author

I testet other apps now and export XKB_DEFAULT_LAYOUT=de /setting keyboard layouts worked fine with Cage until now.

The problem seems to be caused by xfreerdp. Their documentation tells something about a "keyboard layout detection"
https://github.com/FreeRDP/FreeRDP/wiki/Keyboard#keyboard-layout-detection
(I dont understand the purpose - why not using the system settings?)
Their process seems to rely on some fancy X11 infrastructure that is not presesent in a pure (X)Wayland\Cage config.

For me (and possible other users of freerdp) the following workaround allows the setting of an keyboard layout with freerdp in a wayland/cage environment:

cage wlfreerdp -- /v:{rdp-ip} /kbd:0x{layout-id}

where layout-id is 0407 for german - other IDs could be find here:

https://github.com/awakecoding/FreeRDP-Manuals/blob/master/User/FreeRDP-User-Manual.markdown#keyboard-layouts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants