-
Notifications
You must be signed in to change notification settings - Fork 318
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
Keyboard layout messed up for KBD_PORTUGUESE_BRAZILIAN_ABNT2. #27
Comments
@tb110188 , would you please attach weston.log from /mnt/wslg ? and what keyboard layout do you use in Windows side ? |
i'm reinstalling Ubuntu... And sure, also I do use PT BR (ABNT2) |
I'm having the same issue. My keyboard layout is PT-BR (ABNT2) too, and here's my weston.log file: |
@jordan080 Thanks... |
From your weston.log. [23:07:28.183] kbd_layout:0x416 kbd_type:0x4 kbd_subType:0x0 kbd_functionKeys:0xc RDP client is correctly reports 0x416, which is ... #define KBD_PORTUGUESE_BRAZILIAN_ABNT 0x00000416 Would you please do "setxkbmap -print -verbose 10" on Linux side to see if corresponding layout is installed/configured in Xkb ? |
Setting verbose level to 10 |
also here is my weston.log |
My output from "setxkbmap" is pretty much the same as that of @tb110188: Setting verbose level to 10 |
Assuming you are on Ubuntu, can you configure keyboard layout using "sudo dpkg-reconfigure keyboard-configuration" and restart WSLg by wsl --shutdown or wsl --terminate [distro name] ? |
@hideyukn88 Nope, still the same issue... |
when I try to type "qwerty" this is what it shows "/,.hxw"... |
I don't know exactly what i did, i installed full gnome pckages and change my locale to pt_BR.UTF8, also changind some stuff related to the keyboar... and now it's working just fine... |
What exactly did you change in the keyboard settings? And did you install the full GNOME DE? |
Tried again, but without installing Full Gnome Desktop Experience... I think we need that... |
Update: We don't need Gnome Desktop Experience, but i don't know what else... |
The same here. It only worked here after removing the Brazilian ABTN2 keyboard and have restarted WSL. It is working with United States-International. |
there shoul be a way to make it work without messing with the keyboard... |
Unfortunately, while they don't fix it, we won't be able to use GUI apps with ABNT2 keyboards |
setxkbmap -model abnt2 -layout br -variant abnt2 |
Didn't work for me Did you changed the LOCALE too??? |
setxkbmap -model abnt2 -layout br -variant abnt2 |
sudo update-locale LANG=pt_BR.UTF8 |
*** update-locale: Error: invalid locale settings: LANG=pt_BR.UTF8 |
sudo dpkg-reconfigure locales ? |
edit sudo vim /etc/locale.gen |
now we do need aa way to keep this config when we shutdown WSL... |
echo "setxkbmap -model abnt2 -layout br -variant abnt2" >> ~/.bashrc I didn't find any parameters in /etc/wsl.conf so I put it to set when starting bash in the terminal |
it stops working when i install gnome-terminal... lol |
Tried all of @PauloCotrim solutions, and none of these work |
first step, configure your locale sudo dpkg-reconfigure locales on the screen scroll down and choose pt_BR.UTF8 then next you will do ok and ok, and run this on the command line sudo update-locale LANG=pt_BR.UTF8 in the end you run this setxkbmap -model abnt2 -layout br -variant abnt2 and don't restart WSL yet, just try... |
this helped
now the linux gui apps follow the layout selected in windows, however the frames of the windows are kind of ugly. Any idea how to configure this? |
So the Anyway, It seems like the problem in my case is due to the Colemak layout not being recognised. and here's what I see when tailing
Apart from Colemak not being able to match with anything ( I wonder if I need to install the colemak layout on the linux side for it to be able to match the windows one? |
ok, I managed to get it working again, when I set
now, when I change layout on windows side it will override the one set with
|
@adrian-gierakowski, thanks for reporting the issue. If I understand correctly, by default, Windows doesn't support "colemak" keyboard layout. Have you installed 3rd party keyboard layout file to Windows? thanks! |
Closing this issue as KBD_PORTUGUESE_BRAZILIAN_ABNT2 should be working correctly. If there is issue with KBD_PORTUGUESE_BRAZILIAN_ABNT2, please reopen this issue. If there is issue with other keyboard layout/language, please open new issue, thanks! |
I know that this thread is closed, but I needed to leave this comment, that the only thing that make it work for me, was this post from @baiano , besides:
that was suggested a couple of times before, the difference for me was:
I tried with gedit, and finally, it recognized the ABNT2 keyboard. |
For me it works without display, but only after the first graphical program has been run. |
Thank you so much. This was really annoying to me. And it finally got fixed. My best wishes. |
@robertoalvesneto, have you updated WSL with the latest version from aka.ms/wslstorepage? If this doesn't solve, please let me know how those settings (themes, color and keyboard layout) are applied, thanks! |
@hideyukn88 thanks for the reply. Some versions:
How i set up the theme:I installed the gnome-tweaks using
If i launch any app by terminal the theme is not applied. But, if i launch by shortcut icon on windows folder the theme is applied. IBus preferencesI try set keyboard in the ibus but it doesn't seem to have any effect, and every time i open it, it alerts:
I add this vars to |
@robertoalvesneto, thanks for detail info, WSL alone doesn't manage keyboard layout, but WSLg does. In your case, VcXsrv is being used instead of WSLg, you might need to follow up with VcXsrv. Thanks! |
@hideyukn88 thanks for your answer! I installed VcXsrv a long time ago and i didn't even know WSLg. I uninstalled VcXsrv and updated all. I still have problems but at least they are new problems 😆.
In my case, change to export GDK_BACKEND=wayland For my, run And launch my apps by I still don't know how to make the keyboard preferences work by launching the app from zsh, but I've made some progress. References that helped me:reddit WSLg vs VcXsrv |
This is how I persist the configuration with
|
@gmazoni, do you still see the issue (without applying your workaround) even using the latest WSL from aka.ms/wslstorepage? thanks! |
Hi @hideyukn88, thanks for replying, I updated the WSL and it solved my problem, I removed the wsl.conf and checked all my rc profiles to not export and execute setxkbmap. |
It worked like a charm. Thanks. |
Nothing of the above was working in a way that I liked in Win11. I wanted this to be automatic, and my choices (done in bashrc and wsl.conf) didn't work. This required running the command again. Also, sometimes it failed, even with the command. Simplest workaround: changing the keyboard layout in Windows, from ABNT2 to ABNT. The Alt Gr key still works in Windows, and it is now working 100% on WSLg without any additional configuration. |
SOLUTION DONE! =D |
I have a pretty similar problem. |
same here. I have German and US key-baord layout installed for Windows. When I switch to US layout and start wsl2, I have also us layout in the wsl2 bash. But emacs started from this bash has then German keyboard layout. really annoying, as emacs becomes useless with this keyboard layout :( |
I don't know if matters, but I noticed that when I change the keyboard layout on windows the keyboard on linux gui app starts to work properly, maybe the solution is on what happen when we refresh the keyboard on windows. |
For my pt-br keyboard worked these steps: 1- in your zsh terminal type:
select PT-BR UTF-8 with space key on keyboard and click "ok" 2 - type a new command on terminal:
3 - On your ~/.zshrc file adds the lines:
Don't forget to restart terminal for load zshrc file changes. If you do not use Zsh, try to edit ~/.bashrc file instead thanks @marcioandradejs and @PauloCotrim for the references |
When I switch keyboard layouts in windows, both "Serbian Latin" and "Serbian Cyrilc" keyboard layouts print cyrilic chars in WSL2 Wayland apps. Sloveninan, which I have also installed, is recognized OK and prints latin chars just fine. $ setxkbmap -query
rules: xorg
model: pc104
layout: rs
variant: latinalternatequotes
options: lv3:ralt_switch |
I have the same problem but I can't try the solutions proposed here because I use openSUSE Tumbleweed and some commands from the solutions are exclusive to ubuntu. ANyone know how to fix the issue on openSUSE? I'm using abnt, not abnt2. |
Does anyone know how to persist, wsl.conf is not being executed, because I added 'command = ' and it didn't work |
When I try to type any text on any of the GUI applicatuins, the letter doesnt matches the keyboard layout (it works just fine from the command prompt).
The text was updated successfully, but these errors were encountered: