ArchWSL icon indicating copy to clipboard operation
ArchWSL copied to clipboard

Can't use italian keyboard layout in GUI apps

Open ayesse opened this issue 2 years ago • 11 comments

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:

  • Windows build number: 10.0.22000.376
  • Security Software: Windows Defender
  • WSL version: 2
  • ArchWSL version: 21.8.28.0
  • ArchWSL Installer type: zip clean
  • Launcher version: 21082800

ayesse avatar Dec 26 '21 00:12 ayesse

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

yuk7 avatar Dec 26 '21 07:12 yuk7

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

ayesse avatar Dec 26 '21 10:12 ayesse

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

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

yuk7 avatar Dec 27 '21 01:12 yuk7

I did, I'm on 1.0.26 now

ayesse avatar Dec 27 '21 08:12 ayesse

Okay... Could you try these command?

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

yuk7 avatar Jan 04 '22 08:01 yuk7

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 avatar Jan 04 '22 18:01 ayesse

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

ayesse avatar Jan 05 '22 11:01 ayesse

@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

rffontenelle avatar Mar 28 '22 23:03 rffontenelle

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

Angelo-Pio avatar Dec 01 '22 00:12 Angelo-Pio

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?

haosmos avatar Apr 12 '23 15:04 haosmos

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

Angelo-Pio avatar Apr 12 '23 18:04 Angelo-Pio