#include <WebKeyboardEvent.h>
Public Types | |
enum | Type { TYPE_KEY_DOWN, TYPE_KEY_UP, TYPE_CHAR } |
An enumeration of the different WebKeyboardEvent types. More... | |
enum | Modifiers { MOD_SHIFT_KEY = 1 << 0, MOD_CONTROL_KEY = 1 << 1, MOD_ALT_KEY = 1 << 2, MOD_META_KEY = 1 << 3, MOD_IS_KEYPAD = 1 << 4, MOD_IS_AUTOREPEAT = 1 << 5 } |
An enumeration of the different keyboard modifiers. More... | |
Public Member Functions | |
WebKeyboardEvent () | |
WebKeyboardEvent (UINT msg, WPARAM wparam, LPARAM lparam) | |
Public Attributes | |
Type | type |
The type of this WebKeyboardEvent. | |
int | modifiers |
The current state of the keyboard. Modifiers may be OR'd together to represent multiple values. | |
int | virtualKeyCode |
int | nativeKeyCode |
char | keyIdentifier [20] |
WebUChar | text [4] |
WebUChar | unmodifiedText [4] |
bool | isSystemKey |
An enumeration of the different keyboard modifiers.
An enumeration of the different WebKeyboardEvent types.
Awesomium::WebKeyboardEvent::WebKeyboardEvent | ( | ) |
Creates an empty WebKeyboardEvent, you will need to initialize its members yourself. This is most useful for synthesizing your own keyboard events.
Awesomium::WebKeyboardEvent::WebKeyboardEvent | ( | UINT | msg, | |
WPARAM | wparam, | |||
LPARAM | lparam | |||
) |
Creates a WebKeyboardEvent directly from a Windows keyboard event message.
Whether or not the pressed key is a "system key". This is a Windows-only concept and should be "false" for all non-Windows platforms. For more information, see the following link: http://msdn.microsoft.com/en-us/library/ms646286(VS.85).aspx
This is a string identifying the key that was pressed. This can be generated from the virtualKeyCode via the getKeyIdentifierFromVirtualKeyCode() utility function. You can find the full list of key identifiers at: http://www.w3.org/TR/DOM-Level-3-Events/keyset.html
The actual key-code generated by the platform. The DOM specification primarily uses Windows-equivalent codes (hence virtualKeyCode above) but it helps to additionally specify the platform-specific key-code as well.
WebUChar Awesomium::WebKeyboardEvent::text[4] |
The actual text generated by this keyboard event. This is usually only a single character but we're generous and cap it at a max of 4 characters.
WebUChar Awesomium::WebKeyboardEvent::unmodifiedText[4] |
The text generated by this keyboard event before all modifiers except shift are applied. This is used internally for working out shortcut keys. This is usually only a single character but we're generous and cap it at a max of 4 characters.
The virtual key-code associated with this keyboard event. This is either directly from the event (ie, WPARAM on Windows) or via a mapping function. You can see a full list of the possible virtual key-codes in KeyboardCodes.h