-
Notifications
You must be signed in to change notification settings - Fork 52
-
Notifications
You must be signed in to change notification settings - Fork 52
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
WebView2.KeyDown does not work correctly with modifiers #1216
Comments
Thanks for catching this, I've confirmed on our end. I've added a bug to our backlog to get this fixed. |
An extra addition to this: Ctrl does not seem to work correctly either, when I press Ctrl + W for example then KeyDown returns that the Control key has been pressed, my W has disappeared nor is Control set as modifier. |
No update here. The current workaround is to keep track of when keys are being pushed (through a map or similar) and check that way, because as you note the "control" and the "T" are coming in separate events. Devs have also been using script to catch and handle keyboard shortcuts more easily, for example: #1684 (comment) We know this is a pain point, and is one of the upcoming .NET scenarios we're going to look at improving. |
Is there any news on this? |
@zhuhaichao518 Would this scenario be improved by your hit-transparent work? If so, can you share some details on how to enable that here? |
2 and a half years later, any update on this? |
Another workaround option, in case it helps someone: If you are working with a WinForms Control/Form, then you have access to the base Control.ModifierKeys property, which is a property that holds the current modifier key state. This seems to be a straightforward alternative to trying to use the Modifiers on the KeyEventArgs. |
@wnayes Thanks for your suggestion! |
This is resolved on the latest pre-release SDK and upcoming release SDK in about a week. |
Description
When you press Shift+F8 and the KeyDown event gets triggered it registers as F8 and not as Shift+F8
Version
SDK: 1.0.824-prerelease
Runtime: Stable Edge 90
Framework: WinForms
OS: Win10, 20H2
Repro Steps
Take the following project as example:
When you set a breakpoint in the KeyDown event handler and then press Shift+F8 you will see that no modifier is listed. We expect that the shift is listed as a modifier.
AB#34280866
The text was updated successfully, but these errors were encountered: