-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Support language input keys #63034
Comments
Tagging subscribers to this area: @dotnet/area-system-console Issue DetailsLanguage input keys are not defined in
That causes issues like PowerShell/PSReadLine#2206. So I recommend ConsoleKey to include:
Virtual-Key Codes (Winuser.h) - Win32 apps | Microsoft Docs lists up other language input keys, too. And, according to the entry in Windows Blog for Japan (Japanese), codes below also should be added.
|
The following API is proposed: namespace System
{
enum ConsoleKey
{
Convert = 0x1C, // or named as ImeConvert
NonConvert = 0x1D, // or named as ImeNonConvert
ImeOn = 0x16,
ImeOff = 0x1A,
}
} |
Winforms use |
In the public winforms enum linked I notice a typo: "IMEAceept".. |
@danmoseley That is for backward compatibility. https://docs.microsoft.com/en-us/dotnet/api/system.windows.forms.keys?view=windowsdesktop-6.0&viewFallbackFrom=net-5.0 says "The IME accept key. Obsolete, use IMEAccept instead." A comment in http://www.mikepope.com/blog/AddComment.aspx?blogid=2250 explains the history:
|
For now I've added this issue to #52374, will try to tackle it when we start working on improving Console |
Is it possible to recognize them on Unix? |
Are you making a distinction between Linux and Unix in your statement? If not, I am happy to report that those keys are recognised on Ubuntu. If so, please wait for another report from someone. |
Is there any chance you could run I've used it in https://devblogs.microsoft.com/dotnet/console-readkey-improvements-in-net-7/#sys-calls |
I apologize for the significant delay in responding to your inquiry regarding the key recognition issue on Linux. After finally conducting the tests you suggested, I have some results to share. |
Language input keys are not defined in
That causes issues like PowerShell/PSReadLine#2206.
So I recommend ConsoleKey to include:
Virtual-Key Codes (Winuser.h) - Win32 apps | Microsoft Docs lists up other language input keys, too. And, according to the entry in Windows Blog for Japan (Japanese), codes below also should be added.
The text was updated successfully, but these errors were encountered: