#include <scim_event.h>
Public Member Functions | |
KeyEvent (int c=0, int m=0) | |
Default constructor. | |
KeyEvent (const String &str) | |
Constructor, construct a key event from a string. | |
bool | empty () const |
Check if this KeyEvent is empty. | |
char | get_ascii_code () const |
Get the ascii code of this key event. | |
ucs4_t | get_unicode_code () const |
Get the Unicode code of this key event. | |
String | get_key_string () const |
Get the string of this key event. | |
bool | is_shift_down () const |
Check if the shift key is pressed down. | |
bool | is_lock_down () const |
Check if the lock key is pressed down. | |
bool | is_control_down () const |
Check if the ctrl key is pressed down. | |
bool | is_alt_down () const |
Check if the alt key is pressed down. | |
bool | is_mod1_down () const |
Check if the mod1 key is pressed down. | |
bool | is_mod2_down () const |
Check if the mod2 key is pressed down. | |
bool | is_mod3_down () const |
Check if the mod3 key is pressed down. | |
bool | is_mod4_down () const |
Check if the mod4 key is pressed down. | |
bool | is_mod5_down () const |
Check if the mod5 key is pressed down. | |
bool | is_num_lock_down () const |
Check if the num lock key is pressed down. | |
bool | is_caps_lock_down () const |
Check if the caps lock key is pressed down. | |
bool | is_scroll_lock_down () const |
Check if the scroll lock key is pressed down. | |
bool | is_key_press () const |
Check if it's a key press event. | |
bool | is_key_release () const |
Check if it's a key release event. | |
bool | operator== (const KeyEvent &key) const |
Compare two key events. | |
bool | operator< (const KeyEvent &key) const |
Compare two key events. | |
Public Attributes | |
int | code |
int | mask |
A keyboard event contains a key code and a set of key masks. The key masks indicate which modifier keys are pressed down and if it's a key release event.
Definition at line 1974 of file scim_event.h.
|
Default constructor.
|
|
Constructor, construct a key event from a string.
References code, mask, scim::scim_string_to_key(), and scim::String. |
|
Check if this KeyEvent is empty.
|
|
Get the ascii code of this key event. Not all key events have ascii codes.
|
|
Get the Unicode code of this key event. Not all key events have unicode codes.
|
|
Get the string of this key event. Not all key events can be converted to string.
|
|
Check if the shift key is pressed down. Definition at line 2033 of file scim_event.h. References mask, and scim::SCIM_KEY_ShiftMask. |
|
Check if the lock key is pressed down. Definition at line 2038 of file scim_event.h. References mask, and scim::SCIM_KEY_LockMask. |
|
Check if the ctrl key is pressed down. Definition at line 2043 of file scim_event.h. References mask, and scim::SCIM_KEY_ControlMask. |
|
Check if the alt key is pressed down. Definition at line 2048 of file scim_event.h. References is_mod1_down(). |
|
Check if the mod1 key is pressed down. Definition at line 2053 of file scim_event.h. References mask, and scim::SCIM_KEY_Mod1Mask. Referenced by is_alt_down(). |
|
Check if the mod2 key is pressed down. Definition at line 2058 of file scim_event.h. References mask, and scim::SCIM_KEY_Mod2Mask. |
|
Check if the mod3 key is pressed down. Definition at line 2063 of file scim_event.h. References mask, and scim::SCIM_KEY_Mod3Mask. |
|
Check if the mod4 key is pressed down. Definition at line 2068 of file scim_event.h. References mask, and scim::SCIM_KEY_Mod4Mask. |
|
Check if the mod5 key is pressed down. Definition at line 2073 of file scim_event.h. References mask, and scim::SCIM_KEY_Mod5Mask. |
|
Check if the num lock key is pressed down. Definition at line 2078 of file scim_event.h. References mask, and scim::SCIM_KEY_NumLockMask. |
|
Check if the caps lock key is pressed down. Definition at line 2083 of file scim_event.h. References mask, and scim::SCIM_KEY_CapsLockMask. |
|
Check if the scroll lock key is pressed down. Definition at line 2088 of file scim_event.h. References mask, and scim::SCIM_KEY_ScrollLockMask. |
|
Check if it's a key press event. Definition at line 2093 of file scim_event.h. References mask, and scim::SCIM_KEY_ReleaseMask. |
|
Check if it's a key release event. Definition at line 2098 of file scim_event.h. References mask, and scim::SCIM_KEY_ReleaseMask. |
|
Compare two key events.
|
|
Compare two key events. This operator is mainly for sorting.
|
|
key code Definition at line 1976 of file scim_event.h. Referenced by empty(), KeyEvent(), operator<(), and operator==(). |
|
modifier keys' mask Definition at line 1977 of file scim_event.h. Referenced by empty(), is_caps_lock_down(), is_control_down(), is_key_press(), is_key_release(), is_lock_down(), is_mod1_down(), is_mod2_down(), is_mod3_down(), is_mod4_down(), is_mod5_down(), is_num_lock_down(), is_scroll_lock_down(), is_shift_down(), KeyEvent(), operator<(), and operator==(). |