37 key_event(
unsigned short _key = 0,
KeyAction _action = KA_PRESS,
unsigned char _char = 0,
unsigned char _modifiers = 0,
unsigned char _toggle_keys = 0,
double _time = 0,
int _x = 0,
int _y = 0);
39 void stream_out(std::ostream& os)
const;
41 void stream_in(std::istream& is);
43 unsigned short get_key()
const;
45 void set_key(
unsigned short _key);
51 unsigned char get_char()
const;
53 void set_char(
unsigned char _char);
63#include <cgv/config/lib_end.h>
class to represent all possible keyboard events with the EID_KEY
short x
x position of mouse pointer
unsigned char character
store the corresponding ascii character
unsigned char action
store whether
unsigned short key
store the pressed key
short y
y position of mouse pointer
KeyAction
different actions that a key can perform
@ KA_REPEAT
key repeated press action
@ KA_PRESS
key press action
@ KA_RELEASE
key release action
std::string get_key_action_string(KeyAction action)
convert a key action into a readable string