Closed olesendan closed 2 years ago
It might work when enabled Systemd. Please follow this: https://wsldl-pg.github.io/ArchW-docs/Known-issues/#wsl2
Where keymap used? Command window? or WSLg? VNC? or etc..?
The command window is a Windows implementation, and I think that setting is used. I think WSL is a VM container and the keyboard is used only indirectly.
Hi Thank you for your answers.
I'm using the terminal inside WSL. Running in Windows Terminal. My scenario is: Windows 10 with a keyboard with danish layout. WSL2 with archWSL installed. On this host I would like to use a keyboard with US layout.
So I have tried to set the keymap inside the ArchWSL host. Is this wrong?
Greetings from Denmark Dan Olesen
Yeah,, That part (terminal window) is handled by the Windows OS. If you are physically using a different keyboard, you can set KeyboardTypeOverride of the registry.
but I hope that helps. yuk7
@olesendan So I have tried to set the keymap inside the ArchWSL host. Is this wrong?
That is not wrong. Normally, keyboard input as scan code goes directly to Linux kernel. Linux kernel then maps scan code to a key code and sends it to Console, Display, etc. But in WSL, keyboard input as scan code goes to Hyper-V through NT Kernel. Then Hyper-V sends input as key code to Linux Kernel. Or NT Kernel sends key code to Console Host, Windows Terminal etc. Therefore, NT kernel needs to be configured to map the scan code as intended.
Thank you.
Changed keyboard layout on the windows side, and it is working.
Greetings from Denmark Dan olesen
On Sun, 18 Jul 2021, 04.27 shanghai yakisoba chan!, < @.***> wrote:
@olesendan https://github.com/olesendan So I have tried to set the keymap inside the ArchWSL host. Is this wrong?
That is not wrong. Normally, keyboard input as scan code goes directly to Linux kernel. Linux kernel then maps scan code to a key code and sends it to Console, Display, etc. But in WSL, keyboard input as scan code goes to Hyper-V through NT Kernel. Then Hyper-V sends input as key code to Linux Kernel. Therefore, NT kernel needs to be configured to map the scan code as intended. Set in here. (Screenshot)
[image: screenshot0] https://user-images.githubusercontent.com/44153315/126053662-f4b8bd12-3f5e-458e-a595-578ffcb2a18f.png [image: screenshot1] https://user-images.githubusercontent.com/44153315/126053739-8b1c002f-000b-4f8f-823f-fba4b9e99e94.png
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/wsldl-pg/ArchW-docs/issues/18#issuecomment-881987403, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI67KZGRQVU7SCS6B27RNN3TYI3XPANCNFSM5AGOMJPQ .
We glad helped you☺️
Hi.
I'm trying to set keymap in archlinux.
Ive tried to two approaches
either way do not work.
So is there a way to set keymap in archWSL
Greetings from Denmark Dan Olesen