interface ICoreWebView2AcceleratorKeyPressedEventArgs

Note

This reference is no longer being maintained. For the latest API reference, see WebView2 API Reference.

interface ICoreWebView2AcceleratorKeyPressedEventArgs
  : public IUnknown

Event args for the AcceleratorKeyPressed event.

Summary

Members Descriptions
get_Handled During AcceleratorKeyPressedEvent handler invocation the WebView is blocked waiting for the decision of if the accelerator is handled by the host (or not).
get_KeyEventKind The key event type that caused the event to run.
get_KeyEventLParam The LPARAM value that accompanied the window message.
get_PhysicalKeyStatus A structure representing the information passed in the LPARAM of the window message.
get_VirtualKey The Win32 virtual key code of the key that was pressed or released.
put_Handled Sets the Handled property.

Members

get_Handled

During AcceleratorKeyPressedEvent handler invocation the WebView is blocked waiting for the decision of if the accelerator is handled by the host (or not).

public HRESULT get_Handled(BOOL * handled)

If the Handled property is set to TRUE then this prevents the WebView from performing the default action for this accelerator key. Otherwise the WebView performs the default action for the accelerator key.

get_KeyEventKind

The key event type that caused the event to run.

public HRESULT get_KeyEventKind(COREWEBVIEW2_KEY_EVENT_KIND * keyEventKind)

get_KeyEventLParam

The LPARAM value that accompanied the window message.

public HRESULT get_KeyEventLParam(INT * lParam)

For more information, navigate to WM_KEYDOWN and WM_KEYUP.

get_PhysicalKeyStatus

A structure representing the information passed in the LPARAM of the window message.

public HRESULT get_PhysicalKeyStatus(COREWEBVIEW2_PHYSICAL_KEY_STATUS * physicalKeyStatus)

get_VirtualKey

The Win32 virtual key code of the key that was pressed or released.

public HRESULT get_VirtualKey(UINT * virtualKey)

It is one of the Win32 virtual key constants such as VK_RETURN or an (uppercase) ASCII value such as A. Verify whether Ctrl or Alt are pressed by running GetKeyState(VK_CONTROL) or GetKeyState(VK_MENU).

put_Handled

Sets the Handled property.

public HRESULT put_Handled(BOOL handled)