Skip to content
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

Add UnhandledKeyPressed.md #3859

Open
wants to merge 12 commits into
base: api-UnhandledKeyPressed
Choose a base branch
from
Prev Previous commit
Next Next commit
add ref
  • Loading branch information
zhuhaichao518 authored Oct 10, 2023
commit 5ebd58794071e9c87bff5204d2811594b0ed1015
2 changes: 1 addition & 1 deletion specs/UnhandledKeyPressed.md
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ The `UnhandledKeyPressed` event allows developers to subscribe event handlers to

`UnhandledKeyPressed` event can be triggered by all keys, which is different from [AcceleratorKeyPressed](https://learn.microsoft.com/en-us/dotnet/api/microsoft.web.webview2.core.corewebview2acceleratorkeypressedeventargs?view=webview2-dotnet-1.0.705.50) event.

`UnhandledKeyPressed` event is async, which means 'GetKeyStates' does not return the exact key state when the key event is fired. Use `UnhandledKeyPressedEventArgs.Modifiers` instead to verify whether Ctrl or Alt is down in this situation.
`UnhandledKeyPressed` event is async, which means [GetKeyStates](https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getkeystate) does not return the exact key state when the key event is fired. Use `UnhandledKeyPressedEventArgs.Modifiers` instead to verify whether Ctrl or Alt is down in this situation.

# Examples
## C++