Why does Windows Microsoft Pinyin IME changes to english mode from chinese mode automatically? How to prevent it?
Windows applications can programmatically choose the input language and IME mode for themselves, which is why the Pinyin input method is automatically switched to English or English mode. As far as I know, this behavior cannot be blocked.
Microsoft Pinyin IME has (by default) the Shift key mapped as a shortcut key for switching between Chinese and English entry mode. So when typing, if you hit the Shift key by accident it may seem that it just switched by itself.
Not sure how to programmatically stop this from happening, but if you simply want to have it stop bothering you can change the Pinyin IME options (the following steps based on Windows 10, but other versions probably similar):
Open Language Preferences (via the pop-up menu when you left-mouse click on the IME language notification area icon)
See the section with the Languages, find the Chinese language and click on it to select it
Click on the Options button and scroll down the dialog to the Keyboards. Click on the Microsoft Pinyin input method to select it and click on Options
Under Mode switching find the Choose the key you use to switch between Chinese and English option. From the drop-down list, choose None and then you won't accidentally switch the mode via the keyboard anymore (you can still change it by clicking on the Pinyin IME notification icon to switch between Chinese/English mode).
Related
Description
I'm using some intellij products (WebStorm, PHPStorm) and Android Studio and have the same issue with both of theses.
I have an azerty keyboard, with a french layout.
I can type without issue in these softs, but I can't activate shortcuts.
When I try to activate a shortcut (e.g ctrl+z), the activated shortcut is ctrl+w.
the shortcut is correctly triggered, but with the wrong keyboard layout. It seems that when I type, my french keyboard is used, but when I want to use a shortcut, the english layout seems to be used.
Is this a known bug (if so, I've not found any mentions about it), or did I miss something?
What I've tried
I'm running on Fedora 29, with Gnome 3.
I've tried to see if it wasn't reproductible with others softs (e.g firefox/ vscode), and I can't reproduce this.
I've tried to see if it wasn't based on my keyboard settings, so I ran xev to monitor the output of pressed keys. I can't reproduce this issue.
In intellij settings, I've tried to set Keymap > Prefer key position over key char with national layout both true and false, it doesn't seem to change anything.
Current situation
Here is an exemple of a shortcut definition in Android Studio.
I pressed A to Y keys on my french keyboard (which output A,Z,E,R,T,Y), and then press the same keys with ctrl (which output ctrl+Q instead of ctrl+A and so on)
https://imgur.com/a/U4aFd7F
Expected situation (tl;dr)
I expect that when I press ctrl+a, the shortcut triggered inside intellij products is ctrl+a instead of ctrl+q
It is indeed a known bug: https://youtrack.jetbrains.com/issue/IDEA-165950
In the bug report another workaround is mentioned for Gnome 3:
Re-order the languages in Settings > Language and Region tab, put English(US) first of the input source list.
I solved it by running setxkbmap fr. I don't know why this is required by intellij products, but it works.
This question is originally posted by me in Microsoft Community at:
https://answers.microsoft.com/en-us/windows/forum/windows_10-other_settings/msklc-under-windows-10-create-custom-keyboard/8c5a7137-d575-4247-8ab3-b4dd1e5fb437?tm=1495318604424
In summary: I have created a custom keyboard layout with Microsoft Keyboard Layout Creator 1.4 in Windows 10, it is working but only partially. It cannot:
combine two keystrokes into one to type a "combined letter", e.g, "¨"+"u" = "ü". It should not exist in Chinese but I want to achieve this.
type Chinese pinyin and Chinese punctuation. In MS pinyin IME, I can press shift to switch between Chinese pinyin mode and English mode. Under pinyin mode I can convert letters into pinyin and thus get Chinese characters, but my layout lacks this. And, if I press "," in Microsoft Pinyin in pinyin mode, it should give me ","(full length comma), but this layout is not able to do this.
I am thinking about two ways to solve this:
Substitute Microsoft Pinyin's keyboard layout to my layout(replace the English part of MS Pinyin with my layout)
Copy the pinyin part of MS pinyin to my layout.
So, how can I solve this?
I have solved it.
For the first problem, you must define some "dead keys combinations". The details are explained here:
http://www.angelfire.com/planet/linguisticsisfun/Creating_a_Keyboard_Using_MSKLC.pdf
For the second problem, basically you do:
Create your keyboard layout.
Edit the .klc file with a Text Editor, to change the VK code mapping. That is because most of the applications in Microsoft Windows, when you press the hotkeys, detects VK code sent to OS, not the "key chars"(the characters output as you type in a text processing software). So in order to make the key chars of your keyboard layout to match with their VK code, you must do this manually. MSKLC will not change that for you. Some details here:
http://www.sensefulsolutions.com/2010/08/how-to-fix-keyboard-shortcuts-in-klc-eg.html
Install the layout.
Open your registry editor, enter HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layouts\, find your new keyboard layout at the bottom (mine with name like a0000xxxx). Copy the dll file name. That is the DLL file containing your newly created keyboard layout info.
Go back to the registry father branch, search the language you want to apply this layout, like Chinese or Spanish. You will find several variations with names alike, but the descriptions are self-explanatory and can help you differentiate them.
Simplified Chinese uses KBDUS.dll, that means "keyboard layout for US keyboard". This will apply to MS Pinyin, too. Change this value to your copied DLL name, so that it will load your DLL next time the OS launches.
Restart.
The result:
I can type English and Chinese pinyin with Microsoft Pinyin with my custom keyboard layout, and I can navigate next/previous page with , and ..
With this keyboard layout I can type Spanish special characters, like ï, á, ç, ñ and € without switching to Spanish keyboard.
Hotkeys in any software are working as expected, because now VK code are matched with letters printed on the keys.
I have Intellij IDEA installed on my Debian Jessie with Cinnamon. It has shortcut ALT+SHIFT+F10. The problem is that the input language change shortcut is ALT+SHIFT, so when I try to use IntelliJ shortcut it works, but it also changes the language.
Moreover, on my work computer under Windows 10, the language doesn't change. I think it is because, on Windows, language switching is performed after I release the keys, and on Debian when keys are pressed.
So how should I set language change shortcut on keyUp event? Again, my goal is to use IntelliJ ALT+SHIFT+F10 shortcut without immediate language switching (assigned to ALT+SHIFT).
Regards!
Keyboard shortcuts on Cinnamon are changed in the Keyboard Settings Screen. To begin editing shortcuts click on the menu button, navigate to preferences and scroll down until you see "Keyboard".
Note, on my system I do not have anything mapped to alt+shift so you might have another application that is listening on that key combination.
I recently obtained a personal licence for Dyalog APL and started using it (I'm switching over from APLX). I really like it, but whenever I'm not using the IDE, the APL symbol keybindings persist. For example, if I try to undo something in another application by hitting CTRL-Z, I'll instead get ⊂ and the undo will not go through. Similarly, attempting to use CTRL-S to save a document will result in me typing ⌈ instead of saving. The only way I've been able to resolve this is by restarting my computer.
How can I disable APL symbol input after the IDE is either not in focus or has been closed? If there's no way to do that, is it possible to map the symbol shortcut to ALT instead of CTRL? ALT is used far less often than CTRL for shortcuts, so I could live with that.
I'm using Windows 8.1 64 bit and the 64 bit version of Dyalog APL with a US keyboard.
If you want to use AltGr (right side Alt) to enter APL symbols while keeping a normal US layout or an almost normal UK layout, you can use my keyboard layout instead of the IDE. This avoids almost all clashes with other applications, so you can keep the keyboard active at all times and forget about mode switching.
Dyalog uses a standard Windows mechanism called "IME" (Input Method Editor) to enable input of APL-Characters. The advantage is that this enables you to use APL-Symbols anywhere - but obviously there is a 2nd side to that.
The "challenge" in your setup is only to change the IME back from APL to regular text-mode and this does not need a reboot. Pls check this article for more info on IME: https://www.google.de/amp/www.thewindowsclub.com/input-method-editors-windows/amp
(Sorry, I'm using W10, so I rather refer you to that article than giving wrong info... BTW, the advantage of W10 is that the IME will be default work in application-mode, so you can go to WinWord there and use default hotkeys w/o switching IME.)
Edit: For those using W10 (and probably W11) that article is out of date. The Languages settings are no longer in the Control Panel and are now in Settings. Go to Time and Language>Keyboard>"Input language hot keys" and change the Key sequence for "Between input languages". The "Switch Keyboard Layout" shortcut will be the one that toggles between keyboard layouts (I have Shift+LeftAlt toggling between Dyalog and US). You can also see which keyboard you are using on the taskbar by adjusting "Language bar options" on the same Settings page.
My desktop application is using shortcut (CTRL+A) to select all text from current focused window. My application runs in different localization including spanish language. But in spanish language it is not selecting all text by using (CTRL+A). (CTRL+A) in spanish is "open". "CTRL+E" is used to select all text from spanish (notepad). Can anyone tell me how to map these two shortcuts in windows desktop application? (os: windows xp, windows 7 (32 & 64) bits)
Thanks a lot
You can have multiple accelerator table resources, one for each locale. The resource editor should let you assign each accelerator table to a particular locale.
The documentation specifically mentions localization as a benefit of accelerator tables.