yuk7 / ArchWSL

ArchLinux based WSL Distribution. Supports multiple install.
https://git.io/archwsl
MIT License
6.88k stars 201 forks source link

Can't use italian keyboard layout in GUI apps #264

Open ayesse opened 2 years ago

ayesse commented 2 years ago

Please fill out the below information: Describe the issue I cannot use italian keyboard layout in GUI apps like Gedit, CodeBlocks ecc. it will always use US layout, even thought locale is set to Italian

Enviroment:

yuk7 commented 2 years ago

What is your x/wayland server? WSLg or xming or others?

ayesse commented 2 years ago

How do I check? Btw I didn't change anything about it, so I guess it's WSLg

yuk7 commented 2 years ago

Okay. first, could you update WSLg to latest version?

https://github.com/microsoft/wslg/releases/latest

ayesse commented 2 years ago

I did, I'm on 1.0.26 now

yuk7 commented 2 years ago

Okay... Could you try these command?

setxkbmap it
echo "[keyboard]
keymap_layout=it" >> /mnt/wslg/.config/weston.ini
ayesse commented 2 years ago

setxkbmap it

zsh: command not found: setxkbmap

echo "[keyboard] keymap_layout=it" >> /mnt/wslg/.config/weston.ini

zsh: file or directory does not exist: /mnt/wslg/.config/weston.ini

ayesse commented 2 years ago

I created the .config directory and the weston.ini file inside of it, but as soon as I shut down WSL, the folder gets automatically deleted and it doesn't exist anymore

rffontenelle commented 2 years ago

@ayesse Try exporting WAYLAND_DISPLAY="wayland-1" before opening the GUI app. If it works, put it in a rc file to run on each session startup (e.g. ~/.bashrc for Bash).

By the way, setxkbmap is provided by xorg-setxkbmap.

You might like this: https://github.com/microsoft/wslg/issues/27

Angelo-Pio commented 1 year ago

Had the same problem. I spent maybe 4 hours trying fixing this bug (I tried all the commands with locale, update-locale, dpkg etc.) and the solution was very simple. Go to settings and search for advanced keyboard settings, in the section "Override for default input method" switch it to the basic italian language and that's it

haosmos commented 1 year ago

Had the same problem. I spent maybe 4 hours trying fixing this bug (I tried all the commands with locale, update-locale, dpkg etc.) and the solution was very simple. Go to settings and search for advanced keyboard settings, in the section "Override for default input method" switch it to the basic italian language and that's it

Hello! I have a similar problem. Could you clarify where these settings you are talking about are stored?

Angelo-Pio commented 1 year ago

Had the same problem. I spent maybe 4 hours trying fixing this bug (I tried all the commands with locale, update-locale, dpkg etc.) and the solution was very simple. Go to settings and search for advanced keyboard settings, in the section "Override for default input method" switch it to the basic italian language and that's it

Hello! I have a similar problem. Could you clarify where these settings you are talking about are stored?

Windows settings for keyboard