-
Notifications
You must be signed in to change notification settings - Fork 695
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
Cleans up key handling in drivers (was "fixes VkeyPacketSimulator is broken") #3078
Conversation
@tig have you at least looked at this PR to understand the reason for the changes? |
No, I've not had a chance. But I will asap. |
…ft, IsAlt and IsCtrl return the right value.
What is the setup required to actually get the VK_PACKET stuff Is it an Telnet/ssh thing. ? |
Yes, know it's used with RDP (Remote Desktop Protocol) where the unicode char is encoded with the virtual key. |
Typing in the first |
I understand what the simulator is supposed to do. I want to be able to use VK Packet support "for real". Do you know what I need to do in order to do that? |
I never try it with a real support but here (#2008 (comment)) is a way to try it. |
@BDisp, you wrote this: You are not wrong in saying "'â' is the lower case of 'Â`". However, in all of my testing, on the US ENG, DEU, POR, and other keyboards this is NOT how keyboards work, or what users expect. For example, in either Windows Terminal settings, use the settings UI to change the keybinding for "New tab, proifle index 0" Using the DEU keyboard, the "CTRL+SHIFT+ä" key (which in ENG is "CTRL+SHIFT+'" gets displayed as "Ctrl+Shift+ä" NOT "Ctrl-Shift+Ä" The same is true for, eg.., the Key.D7. |
@tig I have a Portuguese keyboard and I know what I'm talking about. To get the To get the Using a virtual keyboard isn't the same as a real keyboard. So a If I type |
My keyboard has more or less this layout: Pressing Pressing If I press Pressing Pressing If I press |
…rminal.Gui into BDisp-v2_vkeypacketsimulator-fix_3054
@BDisp please read this: https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-mapvirtualkeya Esp: This is the mode I believe Terminal.Gui should operate in. The current code in this PR (and v2_develop) is broken w.r.t. keys like OemPlus and more. Neither of you nor I had this correct. The This can be demonstrated in v1 ( Since you use POR, you do not see this because you coded all this to assume POR. With the POR keyboard: Likewise, This is broken too: In short, your understanding of how VK_PACKET works is incorrect. Previously, I was confused too (in a different way). I am currently working on this and will submit a PR to PR with my suggested changes in the next few days. Please work on something else in the meantime so we are not working against each other. |
This is bad in my opinion. Currently |
I think @BDisp is encountering what I was ultimately getting at but not communicating properly. 😅 Isn't globalization fun? |
Fixes key handling for Windows.
@BDisp do you know what this is? |
I think I used that a long time ago to use on the |
Fixes key handling in `NetDriver` (for WSL anyway)
Fixes a lot of keyboard related things, but does NOT fix #3054
Pull Request checklist:
CTRL-K-D
to automatically reformat your files before committing.dotnet test
before commit///
style comments)