Contents Up Previous Next

wxKeyEvent is-a wxEvent

A key event identifier is passed to a window's on-char or on-char-hook handler. The key code, position and state of shift/control/alt can be examined by calling the following functions.

wxKeyEvent alt-down
wxKeyEvent control-down
wxKeyEvent get-key-code
wxKeyEvent position-x
wxKeyEvent position-y
wxKeyEvent shift-down


wxKeyEvent alt-down

bool ( alt-down)

Returns TRUE if alt was pressed.


wxKeyEvent control-down

bool ( control-down)

Returns TRUE if control was pressed.


wxKeyEvent get-key-code

string ( get-key-code)

Returns a string corresponding to the internal wxWindows key code, such as "WXK_BACK'', "WXK_F1'' or "WXK_RETURN''.


wxKeyEvent position-x

double ( position-x)

Gets the x position of the mouse pointer at the moment the key was pressed.


wxKeyEvent position-y

double ( event-position-y)

Gets the y position of the mouse pointer at the moment the key was pressed.


wxKeyEvent shift-down

bool ( shift-down)

Returns TRUE if shift was pressed.