diff --git a/specs/UnhandledKeyPressed.md b/specs/UnhandledKeyPressed.md index bcde62794..d771ee39f 100644 --- a/specs/UnhandledKeyPressed.md +++ b/specs/UnhandledKeyPressed.md @@ -7,11 +7,14 @@ them to receive and handle key events not handled by the browser, same ability in WebView2. # Description -The `UnhandledKeyPressed` event allows developers to subscribe event handlers to be run when a key event is not handled by the browser (including DOM and browser accelerators). +The `UnhandledKeyPressed` event allows developers to subscribe event handlers to be run when +a key event is not handled by the browser (including DOM and browser accelerators). `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 [GetKeyState](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. +`UnhandledKeyPressed` event is async, which means [GetKeyState](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++