Some keys on Japanese layout keyboards are incorrectly interpreted as @
See original GitHub issueEnvironment
PS version: 7.1.1
PSReadline version: 2.1.0
os: 10.0.19041.800 (WinBuild.160101.0800)
PS file version: 7.1.1.0
HostName: ConsoleHost (Windows Terminal)
BufferWidth: 120
BufferHeight: 30
Exception report
N/A
Steps to reproduce
- Open powershell with Japanese layout keyboard.
- Press “無変換(Muhenkan)” key on keyboard.
Expected behavior
This is not character key - so nothing should happen and be displayed in console.
Actual behavior
Console prints @ key.
Backgrounds
I ran [console]::ReadKey() in pwsh and press “無変換(Muhenkan)” key.
KeyChar Key Modifiers
------- --- ---------
29 0
Japanese is not an alphabet, so I use an IME - Input Method Editor (e.g. Microsoft IME) to type it. The “Muhenkan” key is for IME operation, so it does not send any characters.
It didn’t occur with the “半角/全角(Hankaku/Zenkaku)” key and the “変換(Henkan)” key for operating Japanese IME. However, if I press it together with the ALT key, the “@” will be displayed like “Muhenkan” key.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:11
- Comments:11 (1 by maintainers)
Top Results From Across the Web
Keyboard is typing wrong characters for Japanese language
Keyboard is typing wrong characters for Japanese language - Microsoft Community.
Read more >How can I use the Japanese IME (Input Method Editor) with a
This is a big problem for users of non-English (and non-Japanese) keyboards since many keys (such as z and y, dashes and brackets...
Read more >Keyboard keys are incorrectly assigned - Windows 10, 11
Symptom. Incorrect keys or characters are displayed when typing on the keyboard. For example, the H key is mapped as a backspace.
Read more >How to change keyboard layout to fix problem of ... - YouTube
Hello friends, Today in this video we will see How to change keyboard language to fix problem of typing special character. because each ......
Read more >Is it hard to get used to a Japanese keyboard layout, or ...
Depends on what you're going to do with it. A Japanese keyboard has several extra keys as modifiers compared to keyboards meant for...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
https://github.com/PowerShell/PSReadLine/blob/15850a4e2ec4c74e31c222403f741532a2f46571/PSReadLine/Keys.cs#L206-L220
To add
0x1D
(29) here will solve the problem. On the other hand, that constant should be available asConsoleKey.NonConvert
or such, so I added an issue to the .NET framework.I happened to find that using the new version of the Microsoft IME solve this problem in my environment. That IME had many bugs and I’ve used the previous version for a long time https://support.microsoft.com/en-us/windows/revert-to-a-previous-version-of-an-ime-input-method-editor-adcc9caa-17cb-44d8-b46e-f5b473b4dd77.