Add support for switching input method
I'm using the Chinese version of windows 10 , which uses the system's built-in pinyin input method. I use ./bin/winapps manual Notepad.exe to open notepad. I want to input some Chinese in Notepad, but I can't switch to the Chinese input method.
Technical details:
Host OS: Manjaro Linux with KDE plasma 5.27.8 Winapps: Latest git. FreeRDP packages: freerdp 2:2.11.1-1 Arch: amd64. Guest OS: Windows 10 PRO 22H2(Chinese Version).
Input method on Linux: fcitx5-rime Please let me know if you need any more information. If there is some configuration I can do on my end to get this working properly, also please let me know.
Thank you and congratulations for this awesome project!
Have you tried connecting to the VM normally via RDP and changing the Keyboard layout in windows? Otherwise, maybe you'll find something useful here: https://github.com/FreeRDP/FreeRDP/issues/8980
As you can see above, I have two keyboard layouts on my windows, and I tried to remove the English one. Now after opening notepad by ./bin/winapps manual Notepad.exe , I can see the candidate word panel of the Chinese Pinyin input method, but it flashed away during the input process (as shown below), so I still can't enter Chinese normally.
Is your System layout also Chinese? Maybe thats a problem.
Do not use any default input method offered by windows. Use 3rd party software like baidu, which includes a feature to trigger the input method by customizing your own shortcut.
Hello,
I have the exact same problem with the French Keyboard. Since the migration to Docker Windows image, I don't know exactly why but it seems that the US keyboard cannot be removed.... When I start any application, this is always the one selected. I tried so many things to remove this keyboard layout or to ask FreeRDP to use the French Keyboard that I don't know what to do anymore.....
Best, Jerome
@jrevillard did you change the localisation using docker enviroment flags documented in https://github.com/dockur/windows ?
@jrevillard did you change the localisation using docker enviroment flags documented in https://github.com/dockur/windows ?
Yes I did, and actually, I think this is a pur Windows issue so I opened an issue here: https://github.com/dockur/windows/issues/551
Best, Jerome
@jrevillard I agree with the response from the windows docker repo. It seems like freerdp bug. Maybe you want to report it there and link the issue here?
Perhaps this one : https://github.com/FreeRDP/FreeRDP/issues/9678 ?
@jrevillard can you add /kdb:
The issue you mentioned seems not to be related.
I did already tested xfreerdp3 /kbd:lang:0x040c..., xfreerdp3 /kbd:layout:French,lang:0x040c.... Nothing helped.
@jrevillard I think you should open a issue on the freerdp repo. This seems to me like a bug in freerdp.
Also are you using x11 or wayland? Wayland causes a lot of strange issues and is not supported.
@jrevillard We can include the reg file from dockur/windows#551 in the VM by default if you had good results with that
This solved my issue indeed but I don't know if it's a good idea to integrate such specific thing. I guess it could break something for other people...
Just wanted to add that the registry method mentioned above (adding [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout] "IgnoreRemoteKeyboardLayout"=dword:00000001) works - as long as the VM itself has the right keyboard layout in the settings - while the FreeRDP setting (in my case adding RDP_FLAGS="/kbd:0x00000452" to winapps.conf) doesn't as it somehow prevents the Windows app from starting.
This should either be fixed upstream in freerdp or mentioned in the Winapps documentation somewhere.
I've had this problem and solved it by: Running this command to know the hex code for my desired keyboard layout:
xfreerdp /list:kbd
Then opening my configuration file located in ~/.config/winapps/winapps.conf and adding:
RDP_FLAGS="/kbd:layout:0x00000450"
+1. I have german and ukrainian layouts in windows. And if I open MS Word and try to Win+Space it only changes my language in Linux.
I think there should be some sort of focus for language change or buttons. Or the launcher would work good. #544
I'm in the same situation as @KyrTeF. It would be great to be able to change the input method, for example, from the taskbar widget.
@hmcezar you can add /grab-keyboard to your rdp flags in in winapps.conf file. This will allow you to switch input via alt shift
@hmcezar you can add /grab-keyboard to your rdp flags in in winapps.conf file. This will allow you to switch input via alt shift
Hmm I added it to the rdp flags, but I'm not sure what you mean by switching via "alt shift". Do you mean literally "ALT + SHIFT"? I tried that and it didn't work. Also tried "WIN + SPACE" but that changes the input in my host system.
Ok, I figured a way out. The problem was that I had two different keyboard layouts for the same language, but Alt + Shift, changes only between languages (by default). You can customize the shortcuts to allow different layouts using the same language.
I'll add a mini tutorial for people trying this in the future:
On Windows you go to Time & Language -> Typing -> Advanced keyboard settings -> Input language hot keys.
There you can configure shortcuts to different languages and keyboard layouts. For example, I set the shortcut Left alt + shift + 1 to one keyboard layout and Left alt + shift + 2 to another layout. Now, everytime I'm using Word, I can just use the shortcut to change to the other layout.
I have /grab-keyboard in my RDP_FLAGS, not sure if this is necessary or not.
I've had this problem and solved it by: Running this command to know the hex code for my desired keyboard layout:
xfreerdp /list:kbdThen opening my configuration file located in
~/.config/winapps/winapps.confand adding:RDP_FLAGS="/kbd:layout:0x00000450"
this one worked for me!
I also did this beforehand: Settings > Time & Language > Typing > Advanced keyboard settings > check the "Use desktop language bar when it's available".
And then, bellow that, go to the "Language bar options" and check "Hidden".