Awesomium::WebKeyboardEvent Class Reference

#include <WebKeyboardEvent.h>

List of all members.

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


Detailed Description

A generic keyboard event that can be created from a platform-specific event or synthesized from a virtual event. Used by WebView::injectKeyboardEvent.

Member Enumeration Documentation

An enumeration of the different keyboard modifiers.

Enumerator:
MOD_CONTROL_KEY  Whether or not a Shift key is down.
MOD_ALT_KEY  Whether or not a Control key is down.
MOD_META_KEY  Whether or not an ALT key is down.
MOD_IS_KEYPAD  Whether or not a meta key (Command-key on Mac, Windows-key on Windows) is down.
MOD_IS_AUTOREPEAT  Whether or not the key pressed is on the keypad.

An enumeration of the different WebKeyboardEvent types.

Enumerator:
TYPE_KEY_UP  Key-Down type.
TYPE_CHAR  Key-Up type.

Character input type


Constructor & Destructor Documentation

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.

Note:
Valid message types include:
  • WM_KEYDOWN
  • WM_KEYUP
  • WM_SYSKEYDOWN
  • WM_SYSKEYUP
  • WM_CHAR
  • WM_IMECHAR
  • WM_SYSCHAR


Member Data Documentation

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.

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.

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


The documentation for this class was generated from the following files:

Generated on Wed Sep 23 14:27:48 2009 for Awesomium by  doxygen 1.5.8