Tizen Native API
3.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, int keyCode, int keyModifier, unsigned long timeStamp, const State &keyState) | |
Constructor. | |
~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. | |
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. | |
int | keyCode |
Keycode for the key pressed. | |
int | 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. |
Detailed Description
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.
- Since:
- 3.0, DALi version 1.0.0
Member Enumeration Documentation
Constructor & Destructor Documentation
Default constructor.
- Since:
- 3.0, DALi version 1.0.0
Dali::KeyEvent::KeyEvent | ( | const std::string & | keyName, |
const std::string & | keyString, | ||
int | keyCode, | ||
int | keyModifier, | ||
unsigned long | timeStamp, | ||
const State & | keyState | ||
) |
Constructor.
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[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
Destructor.
- Since:
- 3.0, DALi version 1.0.0
Member Function Documentation
bool Dali::KeyEvent::IsAltModifier | ( | ) | const |
Checks to see if Alt key modifier has been supplied.
- Since:
- 3.0, DALi version 1.0.0
- Returns:
- True if alt modifier
bool Dali::KeyEvent::IsCtrlModifier | ( | ) | const |
Checks to see if Ctrl (control) key modifier has been supplied.
- Since:
- 3.0, DALi version 1.0.0
- Returns:
- True if ctrl modifier
bool Dali::KeyEvent::IsShiftModifier | ( | ) | const |
Checks to see if Shift key modifier has been supplied.
- Since:
- 3.0, DALi version 1.0.0
- Returns:
- True if shift modifier
Member Data Documentation
Keycode for the key pressed.
- Remarks:
- We recommend not to use this key code value directly because its meaning might be changed in the future. Currently, it means a platform-specific key code. You need to use IsKey() to know what a key event means instead of direct comparison of key code value.
State of the key event.
- See also:
- State