Entire Class Index | Main Class Index | Cross Index | Global Index

# Class CL_Key

Structure descripting a key event.
Contained in: global
Derived from: none
Derived by: none
Group: Display (Input)

#include <ClanLib/display.h>

### public function member index:
### Construction:
`` | `CL_Key` | `()`;
`` | `CL_Key` | `(`int` `l_id`, `State` `l_state` = NoKey, `int` `l_ascii` = -1, `float` `l_x` = -1, `float` `l_y` = -1)`;

## Description:

CL_KEY_BACKSPACE backspace
CL_KEY_TAB tab
CL_KEY_ENTER return
CL_KEY_PAUSE pause
CL_KEY_ESCAPE escape
CL_KEY_SPACE space
CL_KEY_0 0
...
CL_KEY_9 9
CL_KEY_A a
...
CL_KEY_Z z
CL_KEY_KP_0 keypad 0
...
CL_KEY_KP_9 keypad 9
CL_KEY_KP_DEV keypad divide
CL_KEY_KP_MULT keypad multiply
CL_KEY_KP_MINUS keypad minus
CL_KEY_KP_PLUS keypad plus
CL_KEY_KP_DECIMAL keypad decimal point
CL_KEY_KP_ENTER keypad enter
CL_KEY_UP up arrow
CL_KEY_DOWN down arrow
CL_KEY_RIGHT right arrow
CL_KEY_LEFT left arrow
CL_KEY_DELETE delete
CL_KEY_INSERT insert
CL_KEY_HOME home
CL_KEY_END end
CL_KEY_PAGEUP page up
CL_KEY_PAGEDOWN page down
CL_KEY_F1 F1
...
CL_KEY_F12 F12
CL_KEY_NUMLOCK numlock
CL_KEY_CAPSLOCK capslock
CL_KEY_SCRLOCK scrollock
CL_KEY_RSHIFT right shift
CL_KEY_LSHIFT left shift
CL_KEY_RCTRL right ctrl
CL_KEY_LCTRL left ctrl
CL_KEY_ALTGR right alt / alt gr
CL_KEY_ALT left alt / alt
CL_KEY_PRINT print-screen
CL_MOUSE_LEFTBUTTON mouse left button
CL_MOUSE_MIDDLEBUTTON mouse middle button
CL_MOUSE_RIGHTBUTTON mouse right button
CL_MOUSE_THUMBBUTTON mouse thumb button
CL_MOUSE_WHEELUP mouse wheel up
CL_MOUSE_WHEELDOWN mouse wheel down
CL_MOUSE_WHEELBUTTON mouse wheel click

## Function Member Descriptions:

CL_Key::CL_Key - Key Constructor
`` `CL_Key``()`;

CL_Key::CL_Key - Key Constructor
`` `CL_Key``(`int` `l_id`, `State` `l_state` = NoKey, `int` `l_ascii` = -1, `float` `l_x` = -1, `float` `l_y` = -1)`;

## Variable Member Descriptions:

CL_Key::ascii - Ascii value or -1 if not available.
``int`` ``ascii`;`

CL_Key::id - Key ID.
``int`` ``id`;`

CL_Key::state - <p>Key state. Was it pressed or released. NoKey is used when there were no key available in the input buffer.</p>
``State`` ``state`;`

CL_Key::x - x-coordinate position if a pointing device was the source. -1 if none.
``float`` ``x`;`

CL_Key::y - y-coordinate position if a pointing device was the source. -1 if none.
``float`` ``y`;`