Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members | File Members | Related Pages

hk_key Class Reference

base class for a pressed key More...

#include <hk_key.h>

Inheritance diagram for hk_key:

hk_class List of all members.

Public Types

enum  enum_keycode {
  key_Escape = 0x1000, key_Tab = 0x1001, key_Backtab = 0x1002, key_BackTab = key_Backtab,
  key_Backspace = 0x1003, key_BackSpace = key_Backspace, key_Return = 0x1004, key_Enter = 0x1005,
  key_Insert = 0x1006, key_Delete = 0x1007, key_Pause = 0x1008, key_Print = 0x1009,
  key_SysReq = 0x100a, key_Clear = 0x100b, key_Home = 0x1010, key_End = 0x1011,
  key_Left = 0x1012, key_Up = 0x1013, key_Right = 0x1014, key_Down = 0x1015,
  key_Prior = 0x1016, key_PageUp = key_Prior, key_Next = 0x1017, key_PageDown = key_Next,
  key_Shift = 0x1020, key_Control = 0x1021, key_Meta = 0x1022, key_Alt = 0x1023,
  key_CapsLock = 0x1024, key_NumLock = 0x1025, key_ScrollLock = 0x1026, key_F1 = 0x1030,
  key_F2 = 0x1031, key_F3 = 0x1032, key_F4 = 0x1033, key_F5 = 0x1034,
  key_F6 = 0x1035, key_F7 = 0x1036, key_F8 = 0x1037, key_F9 = 0x1038,
  key_F10 = 0x1039, key_F11 = 0x103a, key_F12 = 0x103b, key_F13 = 0x103c,
  key_F14 = 0x103d, key_F15 = 0x103e, key_F16 = 0x103f, key_F17 = 0x1040,
  key_F18 = 0x1041, key_F19 = 0x1042, key_F20 = 0x1043, key_F21 = 0x1044,
  key_F22 = 0x1045, key_F23 = 0x1046, key_F24 = 0x1047, key_F25 = 0x1048,
  key_F26 = 0x1049, key_F27 = 0x104a, key_F28 = 0x104b, key_F29 = 0x104c,
  key_F30 = 0x104d, key_F31 = 0x104e, key_F32 = 0x104f, key_F33 = 0x1050,
  key_F34 = 0x1051, key_F35 = 0x1052, key_Super_L = 0x1053, key_Super_R = 0x1054,
  key_Menu = 0x1055, key_Hyper_L = 0x1056, key_Hyper_R = 0x1057, key_Help = 0x1058,
  key_Direction_L = 0x1059, key_Direction_R = 0x1060, key_Multi_key = 0x1120, key_Codeinput = 0x1137,
  key_SingleCandidate = 0x113c, key_MultipleCandidate = 0x113d, key_PreviousCandidate = 0x113e, key_Mode_switch = 0x117e,
  key_Kanji = 0x1121, key_Muhenkan = 0x1122, key_Henkan = 0x1123, key_Romaji = 0x1124,
  key_Hiragana = 0x1125, key_Katakana = 0x1126, key_Hiragana_Katakana = 0x1127, key_Zenkaku = 0x1128,
  key_Hankaku = 0x1129, key_Zenkaku_Hankaku = 0x112a, key_Touroku = 0x112b, key_Massyo = 0x112c,
  key_Kana_Lock = 0x112d, key_Kana_Shift = 0x112e, key_Eisu_Shift = 0x112f, key_Eisu_toggle = 0x1130,
  key_Hangul = 0x1131, key_Hangul_Start = 0x1132, key_Hangul_End = 0x1133, key_Hangul_Hanja = 0x1134,
  key_Hangul_Jamo = 0x1135, key_Hangul_Romaja = 0x1136, key_Hangul_Codeinput = 0x1137, key_Hangul_Jeonja = 0x1138,
  key_Hangul_Banja = 0x1139, key_Hangul_PreHanja = 0x113a, key_Hangul_PostHanja = 0x113b, key_Hangul_SingleCandidate = 0x113c,
  key_Hangul_MultipleCandidate = 0x113d, key_Hangul_PreviousCandidate = 0x113e, key_Hangul_Special = 0x113f, key_Space = 0x20,
  key_Any = key_Space, key_Exclam = 0x21, key_QuoteDbl = 0x22, key_NumberSign = 0x23,
  key_Dollar = 0x24, key_Percent = 0x25, key_Ampersand = 0x26, key_Apostrophe = 0x27,
  key_ParenLeft = 0x28, key_ParenRight = 0x29, key_Asterisk = 0x2a, key_Plus = 0x2b,
  key_Comma = 0x2c, key_Minus = 0x2d, key_Period = 0x2e, key_Slash = 0x2f,
  key_0 = 0x30, key_1 = 0x31, key_2 = 0x32, key_3 = 0x33,
  key_4 = 0x34, key_5 = 0x35, key_6 = 0x36, key_7 = 0x37,
  key_8 = 0x38, key_9 = 0x39, key_Colon = 0x3a, key_Semicolon = 0x3b,
  key_Less = 0x3c, key_Equal = 0x3d, key_Greater = 0x3e, key_Question = 0x3f,
  key_At = 0x40, key_A = 0x41, key_B = 0x42, key_C = 0x43,
  key_D = 0x44, key_E = 0x45, key_F = 0x46, key_G = 0x47,
  key_H = 0x48, key_I = 0x49, key_J = 0x4a, key_K = 0x4b,
  key_L = 0x4c, key_M = 0x4d, key_N = 0x4e, key_O = 0x4f,
  key_P = 0x50, key_Q = 0x51, key_R = 0x52, key_S = 0x53,
  key_T = 0x54, key_U = 0x55, key_V = 0x56, key_W = 0x57,
  key_X = 0x58, key_Y = 0x59, key_Z = 0x5a, key_BracketLeft = 0x5b,
  key_Backslash = 0x5c, key_BracketRight = 0x5d, key_AsciiCircum = 0x5e, key_Underscore = 0x5f,
  key_QuoteLeft = 0x60, key_BraceLeft = 0x7b, key_Bar = 0x7c, key_BraceRight = 0x7d,
  key_AsciiTilde = 0x7e, key_nobreakspace = 0x0a0, key_exclamdown = 0x0a1, key_cent = 0x0a2,
  key_sterling = 0x0a3, key_currency = 0x0a4, key_yen = 0x0a5, key_brokenbar = 0x0a6,
  key_section = 0x0a7, key_diaeresis = 0x0a8, key_copyright = 0x0a9, key_ordfeminine = 0x0aa,
  key_guillemotleft = 0x0ab, key_notsign = 0x0ac, key_hyphen = 0x0ad, key_registered = 0x0ae,
  key_macron = 0x0af, key_degree = 0x0b0, key_plusminus = 0x0b1, key_twosuperior = 0x0b2,
  key_threesuperior = 0x0b3, key_acute = 0x0b4, key_mu = 0x0b5, key_paragraph = 0x0b6,
  key_periodcentered = 0x0b7, key_cedilla = 0x0b8, key_onesuperior = 0x0b9, key_masculine = 0x0ba,
  key_guillemotright = 0x0bb, key_onequarter = 0x0bc, key_onehalf = 0x0bd, key_threequarters = 0x0be,
  key_questiondown = 0x0bf, key_Agrave = 0x0c0, key_Aacute = 0x0c1, key_Acircumflex = 0x0c2,
  key_Atilde = 0x0c3, key_Adiaeresis = 0x0c4, key_Aring = 0x0c5, key_AE = 0x0c6,
  key_Ccedilla = 0x0c7, key_Egrave = 0x0c8, key_Eacute = 0x0c9, key_Ecircumflex = 0x0ca,
  key_Ediaeresis = 0x0cb, key_Igrave = 0x0cc, key_Iacute = 0x0cd, key_Icircumflex = 0x0ce,
  key_Idiaeresis = 0x0cf, key_ETH = 0x0d0, key_Ntilde = 0x0d1, key_Ograve = 0x0d2,
  key_Oacute = 0x0d3, key_Ocircumflex = 0x0d4, key_Otilde = 0x0d5, key_Odiaeresis = 0x0d6,
  key_multiply = 0x0d7, key_Ooblique = 0x0d8, key_Ugrave = 0x0d9, key_Uacute = 0x0da,
  key_Ucircumflex = 0x0db, key_Udiaeresis = 0x0dc, key_Yacute = 0x0dd, key_THORN = 0x0de,
  key_ssharp = 0x0df, key_agrave = 0x0e0, key_aacute = 0x0e1, key_acircumflex = 0x0e2,
  key_atilde = 0x0e3, key_adiaeresis = 0x0e4, key_aring = 0x0e5, key_ae = 0x0e6,
  key_ccedilla = 0x0e7, key_egrave = 0x0e8, key_eacute = 0x0e9, key_ecircumflex = 0x0ea,
  key_ediaeresis = 0x0eb, key_igrave = 0x0ec, key_iacute = 0x0ed, key_icircumflex = 0x0ee,
  key_idiaeresis = 0x0ef, key_eth = 0x0f0, key_ntilde = 0x0f1, key_ograve = 0x0f2,
  key_oacute = 0x0f3, key_ocircumflex = 0x0f4, key_otilde = 0x0f5, key_odiaeresis = 0x0f6,
  key_division = 0x0f7, key_oslash = 0x0f8, key_ugrave = 0x0f9, key_uacute = 0x0fa,
  key_ucircumflex = 0x0fb, key_udiaeresis = 0x0fc, key_yacute = 0x0fd, key_thorn = 0x0fe,
  key_ydiaeresis = 0x0ff, key_Back = 0x1061, key_Forward = 0x1062, key_Stop = 0x1063,
  key_Refresh = 0x1064, key_VolumeDown = 0x1070, key_VolumeMute = 0x1071, key_VolumeUp = 0x1072,
  key_BassBoost = 0x1073, key_BassUp = 0x1074, key_BassDown = 0x1075, key_TrebleUp = 0x1076,
  key_TrebleDown = 0x1077, key_MediaPlay = 0x1080, key_MediaStop = 0x1081, key_MediaPrev = 0x1082,
  key_MediaNext = 0x1083, key_MediaRecord = 0x1084, key_HomePage = 0x1090, key_Favorites = 0x1091,
  key_Search = 0x1092, key_Standby = 0x1093, key_OpenUrl = 0x1094, key_LaunchMail = 0x10a0,
  key_LaunchMedia = 0x10a1, key_Launch0 = 0x10a2, key_Launch1 = 0x10a3, key_Launch2 = 0x10a4,
  key_Launch3 = 0x10a5, key_Launch4 = 0x10a6, key_Launch5 = 0x10a7, key_Launch6 = 0x10a8,
  key_Launch7 = 0x10a9, key_Launch8 = 0x10aa, key_Launch9 = 0x10ab, key_LaunchA = 0x10ac,
  key_LaunchB = 0x10ad, key_LaunchC = 0x10ae, key_LaunchD = 0x10af, key_LaunchE = 0x10b0,
  key_LaunchF = 0x10b1, key_MediaLast = 0x1fff, key_unknown = 0xffff
}
enum  enum_state { state_normal = 0x0000, state_shift = 0x0100, state_ctrl = 0x0200, state_alt = 0x0400 }

Public Member Functions

 hk_key (int keycode, int keystate, const hk_string &keytext)
 hk_key (const hk_key &)
virtual ~hk_key ()
int state () const
int key () const
hk_string text () const
bool operator= (const hk_key &)
bool operator== (const hk_key &)
bool operator!= (const hk_key &)
bool accept_key (void) const
void set_accept_key (bool)

Protected Member Functions

 hk_key ()

Friends

class hk_visibleprivate

Detailed Description

base class for a pressed key

Version:
Revision
1.3
Author:
Horst Knorr (hk_classes@knoda.org)


Member Enumeration Documentation

enum hk_key::enum_keycode
 

The key codes are based on Qts key codes

Enumeration values:
key_Escape 
key_Tab 
key_Backtab 
key_BackTab 
key_Backspace 
key_BackSpace 
key_Return 
key_Enter 
key_Insert 
key_Delete 
key_Pause 
key_Print 
key_SysReq 
key_Clear 
key_Home 
key_End 
key_Left 
key_Up 
key_Right 
key_Down 
key_Prior 
key_PageUp 
key_Next 
key_PageDown 
key_Shift 
key_Control 
key_Meta 
key_Alt 
key_CapsLock 
key_NumLock 
key_ScrollLock 
key_F1 
key_F2 
key_F3 
key_F4 
key_F5 
key_F6 
key_F7 
key_F8 
key_F9 
key_F10 
key_F11 
key_F12 
key_F13 
key_F14 
key_F15 
key_F16 
key_F17 
key_F18 
key_F19 
key_F20 
key_F21 
key_F22 
key_F23 
key_F24 
key_F25 
key_F26 
key_F27 
key_F28 
key_F29 
key_F30 
key_F31 
key_F32 
key_F33 
key_F34 
key_F35 
key_Super_L 
key_Super_R 
key_Menu 
key_Hyper_L 
key_Hyper_R 
key_Help 
key_Direction_L 
key_Direction_R 
key_Multi_key 
key_Codeinput 
key_SingleCandidate 
key_MultipleCandidate 
key_PreviousCandidate 
key_Mode_switch 
key_Kanji 
key_Muhenkan 
key_Henkan 
key_Romaji 
key_Hiragana 
key_Katakana 
key_Hiragana_Katakana 
key_Zenkaku 
key_Hankaku 
key_Zenkaku_Hankaku 
key_Touroku 
key_Massyo 
key_Kana_Lock 
key_Kana_Shift 
key_Eisu_Shift 
key_Eisu_toggle 
key_Hangul 
key_Hangul_Start 
key_Hangul_End 
key_Hangul_Hanja 
key_Hangul_Jamo 
key_Hangul_Romaja 
key_Hangul_Codeinput 
key_Hangul_Jeonja 
key_Hangul_Banja 
key_Hangul_PreHanja 
key_Hangul_PostHanja 
key_Hangul_SingleCandidate 
key_Hangul_MultipleCandidate 
key_Hangul_PreviousCandidate 
key_Hangul_Special 
key_Space 
key_Any 
key_Exclam 
key_QuoteDbl 
key_NumberSign 
key_Dollar 
key_Percent 
key_Ampersand 
key_Apostrophe 
key_ParenLeft 
key_ParenRight 
key_Asterisk 
key_Plus 
key_Comma 
key_Minus 
key_Period 
key_Slash 
key_0 
key_1 
key_2 
key_3 
key_4 
key_5 
key_6 
key_7 
key_8 
key_9 
key_Colon 
key_Semicolon 
key_Less 
key_Equal 
key_Greater 
key_Question 
key_At 
key_A 
key_B 
key_C 
key_D 
key_E 
key_F 
key_G 
key_H 
key_I 
key_J 
key_K 
key_L 
key_M 
key_N 
key_O 
key_P 
key_Q 
key_R 
key_S 
key_T 
key_U 
key_V 
key_W 
key_X 
key_Y 
key_Z 
key_BracketLeft 
key_Backslash 
key_BracketRight 
key_AsciiCircum 
key_Underscore 
key_QuoteLeft 
key_BraceLeft 
key_Bar 
key_BraceRight 
key_AsciiTilde 
key_nobreakspace 
key_exclamdown 
key_cent 
key_sterling 
key_currency 
key_yen 
key_brokenbar 
key_section 
key_diaeresis 
key_copyright 
key_ordfeminine 
key_guillemotleft 
key_notsign 
key_hyphen 
key_registered 
key_macron 
key_degree 
key_plusminus 
key_twosuperior 
key_threesuperior 
key_acute 
key_mu 
key_paragraph 
key_periodcentered 
key_cedilla 
key_onesuperior 
key_masculine 
key_guillemotright 
key_onequarter 
key_onehalf 
key_threequarters 
key_questiondown 
key_Agrave 
key_Aacute 
key_Acircumflex 
key_Atilde 
key_Adiaeresis 
key_Aring 
key_AE 
key_Ccedilla 
key_Egrave 
key_Eacute 
key_Ecircumflex 
key_Ediaeresis 
key_Igrave 
key_Iacute 
key_Icircumflex 
key_Idiaeresis 
key_ETH 
key_Ntilde 
key_Ograve 
key_Oacute 
key_Ocircumflex 
key_Otilde 
key_Odiaeresis 
key_multiply 
key_Ooblique 
key_Ugrave 
key_Uacute 
key_Ucircumflex 
key_Udiaeresis 
key_Yacute 
key_THORN 
key_ssharp 
key_agrave 
key_aacute 
key_acircumflex 
key_atilde 
key_adiaeresis 
key_aring 
key_ae 
key_ccedilla 
key_egrave 
key_eacute 
key_ecircumflex 
key_ediaeresis 
key_igrave 
key_iacute 
key_icircumflex 
key_idiaeresis 
key_eth 
key_ntilde 
key_ograve 
key_oacute 
key_ocircumflex 
key_otilde 
key_odiaeresis 
key_division 
key_oslash 
key_ugrave 
key_uacute 
key_ucircumflex 
key_udiaeresis 
key_yacute 
key_thorn 
key_ydiaeresis 
key_Back 
key_Forward 
key_Stop 
key_Refresh 
key_VolumeDown 
key_VolumeMute 
key_VolumeUp 
key_BassBoost 
key_BassUp 
key_BassDown 
key_TrebleUp 
key_TrebleDown 
key_MediaPlay 
key_MediaStop 
key_MediaPrev 
key_MediaNext 
key_MediaRecord 
key_HomePage 
key_Favorites 
key_Search 
key_Standby 
key_OpenUrl 
key_LaunchMail 
key_LaunchMedia 
key_Launch0 
key_Launch1 
key_Launch2 
key_Launch3 
key_Launch4 
key_Launch5 
key_Launch6 
key_Launch7 
key_Launch8 
key_Launch9 
key_LaunchA 
key_LaunchB 
key_LaunchC 
key_LaunchD 
key_LaunchE 
key_LaunchF 
key_MediaLast 
key_unknown 

enum hk_key::enum_state
 

Enumeration values:
state_normal 
state_shift 
state_ctrl 
state_alt 


Constructor & Destructor Documentation

hk_key::hk_key int  keycode,
int  keystate,
const hk_string keytext
 

hk_key::hk_key const hk_key  ) 
 

virtual hk_key::~hk_key  )  [virtual]
 

hk_key::hk_key  )  [protected]
 


Member Function Documentation

bool hk_key::accept_key void   )  const
 

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

int hk_key::key  )  const
 

returns the key code of the current pressed key

bool hk_key::operator!= const hk_key  ) 
 

bool hk_key::operator= const hk_key  ) 
 

bool hk_key::operator== const hk_key  ) 
 

void hk_key::set_accept_key bool   ) 
 

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

int hk_key::state  )  const
 

the state codes can be combined via 'OR'. It returns whether the Alt or the Ctrl key is pressed.

hk_string hk_key::text  )  const
 

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


Friends And Related Function Documentation

friend class hk_visibleprivate [friend]
 


The documentation for this class was generated from the following file:
Generated on Thu Mar 9 18:40:42 2006 for hk_classes by  doxygen 1.4.1