hk_key

base class for a pressed key

Inherits from hk_class.

keynumber key()

returns the key number. The key codes are compatible to Qt of Trolltech. See the QT documentationfor details.

int state() const;

the state codes can be combined via 'OR'. It returns whether the Alt or the Ctrl key is pressed. Possible values are state_normal,state_shift,state_ctrl, state_alt

string text()

if the key represents a printable key it will be returned as text()

accept_key()

returns whether or not this key will be accepted (and used as input)

set_accept_key(bool)

if true the key will be accepted, if set to false the key will be ignored