Implementation of luciad::IInputEvent that represents keyboard input.
More...
#include <luciad/input/IInputEvent.h>
Implementation of luciad::IInputEvent that represents keyboard input.
This class contains the button state, the key and the modifiers if any.
- Since
- 2020.1
◆ KeyEvent() [1/2]
Creates a key event.
- Parameters
-
| state | The state of the key. |
| key | The key of the event. |
| modifierKeys | The modifiers of the event. |
◆ KeyEvent() [2/2]
Creates a key event.
- Parameters
-
| state | The state of the key. |
| key | The key of the event. |
| modifierKeys | The modifiers of the event. |
| lastKnownLocation | The last known location of the mouse |
◆ getKey()
| KeyCode luciad::KeyEvent::getKey |
( |
| ) |
const |
|
inlinenoexcept |
Returns the key of the event.
- Returns
- the key of the event.
◆ getLastKnownLocation()
| std::optional< Coordinate > luciad::KeyEvent::getLastKnownLocation |
( |
| ) |
const |
|
inline |
Returns the last know location of the input device (for example the mouse cursor) when this event occurred.
It is expressed in screen coordinates (px) with top-left corner of the map being the (0,0) position.
- Returns
- the last know location of the input device when this event occurred.
◆ getModifierKeys()
Returns the modifiers of the event.
- Returns
- the modifiers of the event.
◆ getState()
Returns the state of the key.
- Returns
- the state of the key.