Tizen Native API
5.0
|
The key event structure is used to store a key press. More...
Public Types | |
enum | State |
Enumeration for specifying the state of the key event. More... | |
Public Member Functions | |
KeyEvent () | |
Default constructor. | |
KeyEvent (const std::string &keyName, const std::string &keyString, int32_t keyCode, int32_t keyModifier, unsigned long timeStamp, const State &keyState) | |
Constructor. | |
KeyEvent (const KeyEvent &rhs) | |
Copy constructor. | |
KeyEvent & | operator= (const KeyEvent &rhs) |
Assignment operator. | |
~KeyEvent () | |
Destructor. | |
bool | IsShiftModifier () const |
Checks to see if Shift key modifier has been supplied. | |
bool | IsCtrlModifier () const |
Checks to see if Ctrl (control) key modifier has been supplied. | |
bool | IsAltModifier () const |
Checks to see if Alt key modifier has been supplied. | |
std::string | GetCompose () const |
Get the key compose string. | |
std::string | GetDeviceName () const |
Get the device name the key event originated from. | |
Device::Class::Type | GetDeviceClass () const |
Get the device class the key event originated from. | |
Device::Subclass::Type | GetDeviceSubclass () const |
Get the device subclass the key event originated from. | |
Public Attributes | |
std::string | keyPressedName |
Name given to the key pressed. | |
std::string | keyPressed |
The actual string returned that should be used for input editors. | |
int32_t | keyCode |
Keycode for the key pressed. | |
int32_t | keyModifier |
special keys like shift, alt and control which modify the next key pressed. | |
unsigned long | time |
The time (in ms) that the key event occurred. | |
State | state |
State of the key event. |
The key event structure is used to store a key press.
It facilitates processing of these key presses and passing to other libraries like Toolkit. The keyString is the actual character you might want to display while the key name is just a descriptive name. There is a key modifier which relates to keys like alt, shift and control functions are supplied to check if they have been pressed.
Currently KeyEvent is also being used to relay messages from the IMF(Input Method Framework) keyboard to the internal core. In future IMF may communicate via its own module.
Default constructor.
Dali::KeyEvent::KeyEvent | ( | const std::string & | keyName, |
const std::string & | keyString, | ||
int32_t | keyCode, | ||
int32_t | keyModifier, | ||
unsigned long | timeStamp, | ||
const State & | keyState | ||
) |
Constructor.
[in] | keyName | The name of the key pressed or command from the IMF, if later then the some following parameters will be needed |
[in] | keyString | A string of input characters or key pressed |
[in] | keyCode | The unique key code for the key pressed |
[in] | keyModifier | The key modifier for special keys like shift and alt |
[in] | timeStamp | The time (in ms) that the key event occurred |
[in] | keyState | The state of the key event |
Dali::KeyEvent::KeyEvent | ( | const KeyEvent & | rhs | ) |
Copy constructor.
[in] | rhs | A reference to the copied handle |
Destructor.
std::string Dali::KeyEvent::GetCompose | ( | ) | const |
Get the key compose string.
Get the device class the key event originated from.
The device class type is classification type of the input device of event received
std::string Dali::KeyEvent::GetDeviceName | ( | ) | const |
Get the device name the key event originated from.
Get the device subclass the key event originated from.
The device subclass type is subclassification type of the input device of event received.
bool Dali::KeyEvent::IsAltModifier | ( | ) | const |
Checks to see if Alt key modifier has been supplied.
bool Dali::KeyEvent::IsCtrlModifier | ( | ) | const |
Checks to see if Ctrl (control) key modifier has been supplied.
bool Dali::KeyEvent::IsShiftModifier | ( | ) | const |
Checks to see if Shift key modifier has been supplied.
Assignment operator.
[in] | rhs | A reference to the copied handle |
int32_t Dali::KeyEvent::keyCode |
Keycode for the key pressed.
State of the key event.