Open cassiocsantana opened 5 months ago
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!
Note: You can give me feedback by thumbs upping or thumbs downing this comment.
All options were made, however none had a satisfactory result, because if the keyboard is changed, the GUI applications do not receive updates in real time
Same issue here...
Anyone, no solution or update for this problem?
try running this
setxkbmap -layout us
So, I use a laptop with an external keyboard that is in the pt-br layout; The system does not trigger the layout change action for Linux, in fact it does not always trigger correctly, as at times it returns to Us.
I have a similar problem. I mapped some keys in Windows through powertoys and they are correctly inherited in WSL2 TUI but not in the GUI.
Hello, Same as Ubaldot. Keyboard layout are correctly inherited in WSL2 TUI but not in the GUI.
Same problem here,
All input languages work in the terminal, but GUI apps like Emacs, Neovim-Qt and gedit work as follows:
Same problem. GUI launched in wslg are using a qwerty layout and not the one configured in windows. It was working perfectly before, the ctrl-shift was shifting from one to an other. Then I decided to remove that functionality and remove the unused default languages to only keep the AZERTY that I use. and after that. The qwerty layout is kept in gui app launched in wsl
unfortunately using setxkbmap
doesn't work at my end, I only manage to launch app using wayland it seems:
$ setxkbmap
Cannot open display ":0"
Locale-gen and setting X11 layout keymap doesn't help either.
Same problem on ubuntu, debian and arch.
Ok, it is resolved for me. Seems to be a problem with the entry deleted in the language option for windows. I readd the qwerty layout back and after a bunch of switch of layout in windows, the GUI switched too.
@BrachystochroneSD Could you explain better how you solved your problem?
The problem raised when I deleted the keyboard qwerty layouts in
Time & Language > Language & region
. The only layout kept was Belgian(Comma) AZERTY, which was correct on Windows and the terminal, but the keyword on X and Wayland GUI was stuck at QWERTY layout.
What I did, is re-adding the deleted keyboard layout for QWERTY in Time & Language > Language & region
, and switch back and forth between qwerty and azerty, and the GUI keyboard layout now synchronize correctly with the switch.
Unfortunately, I am not able to replicate. The way windows manage keyboard layout is cryptic and despite having only one entry in the options:
I still have three options in the list:
I'll try to do something similar, as my problem is linked to the keyboard layout, from English to Brazilian Portuguese, keyboard with different accents
Good news, folks! Our friend @BrachystochroneSD's response motivated me to investigate different keyboard types, and it seems his solution is correct. What happens is that, from what I observed in the tests, if your keyboard layout is configured incorrectly, it doesn't work as expected.
In the case of WSL2, it doesn't read the keyboard layout correctly. In my case, I was using a standard ABNT QWERTY keyboard (which is from Brazil), but Brazil has another QWERTY standard (ABNT2). I just added the ABNT2 layout and everything worked correctly.
I advise you to investigate your keyboard's layout and try different ones; it might work.
Sorry, but my screenshots are in Brazilian Portuguese.
Completed? Assuming the fix works for everyone else, the behavior still sounds like a bug.
I have the same issue: normally I have a custom (italian-based) keyboard layout, and found that was not possible to have any special key in only the gui application in WSLg.
The trick to add an "official" layout worked for me to, but
(comment added just to follow the thread...)
Windows Version
10.0.22621.3007
WSL Version
2.0.9.0
Are you using WSL 1 or WSL 2?
Kernel Version
5.15.133.1-1
Distro Version
Ubuntu 22.04
Other Software
No response
Repro Steps
Expected Behavior
When opening the installed application, such as GitKraken on WSL Ubuntu, the keyboard layout should adhere to the settings configured in Windows. In this case, the Portuguese (Brazil) International keyboard layout should be recognized and applied within the application, allowing for proper handling of accentuations and ensuring a seamless user experience.
Actual Behavior
Upon opening the installed application, such as GitKraken on WSL Ubuntu, the keyboard layout does not respect the settings configured in Windows. Despite having the Portuguese (Brazil) International keyboard layout selected in Windows, the application fails to recognize and apply this layout. As a consequence, accentuations are not handled correctly, leading to a loss of functionality. Following the steps outlined in the tutorial (https://github.com/microsoft/wslg/issues/27) did not resolve the issue, and the synchronization of keyboard layouts between WSL2 and Windows remains problematic.
Diagnostic Logs
No response