Click or drag to resize
IKeyboardHandlerOnKeyEvent Method
Version 51.0.0
Called after the renderer and JavaScript in the page has had a chance to handle the event. Return true if the keyboard event was handled or false otherwise.

Namespace: CefSharp
Assembly: CefSharp (in CefSharp.dll) Version: (
bool OnKeyEvent(
	IWebBrowser browserControl,
	IBrowser browser,
	KeyType type,
	int windowsKeyCode,
	int nativeKeyCode,
	CefEventFlags modifiers,
	bool isSystemKey


Type: CefSharpIWebBrowser
The IWebBrowser control this request is for.
Type: CefSharpIBrowser
The browser instance.
Type: CefSharpKeyType
Whether this was a key up/down/raw/etc...
Type: SystemInt32
The Windows key code for the key event. This value is used by the DOM specification. Sometimes it comes directly from the event (i.e. on Windows) and sometimes it's determined using a mapping function. See WebCore/platform/chromium/KeyboardCodes.h for the list of values.
Type: SystemInt32
The native key code. On Windows this appears to be in the format of WM_KEYDOWN/WM_KEYUP/etc... lParam data.
Type: CefSharpCefEventFlags
What other modifier keys are currently down: Shift/Control/Alt/OS X Command/etc...
Type: SystemBoolean
Indicates whether the event is considered a "system key" event (see for details).

Return Value

Type: Boolean
Return true if the keyboard event was handled or false otherwise.
See Also