|
QuasarEngine
Cross-platform 3D engine and editor
|
Sent when the user types a character, for text input. More...
#include <quasar/events/KeyEvent.h>
Public Member Functions | |
| KeyTypedEvent (char32_t character) | |
| Creates the event for the typed character, as a Unicode code point. | |
| char32_t | GetCharacter () const |
| Returns the typed character, as a Unicode code point. | |
| std::string | ToString () const override |
| Returns the event with its character, for example "KeyTyped: 'A' (U+0041)" or "KeyTyped: U+00E9". | |
| Public Member Functions inherited from Quasar::EventOf< EventType::KeyTyped, EventCategory::Input|EventCategory::Keyboard > | |
| EventType | GetType () const override |
| Returns the type of the event. | |
| EventCategory | GetCategories () const override |
| Returns all the categories of the event. | |
| Public Member Functions inherited from Quasar::Event | |
| const char * | GetName () const |
| Returns the name of the type of the event, for example "KeyPressed". | |
| bool | IsInCategory (EventCategory category) const |
| Returns true if the event belongs to the given category. | |
| bool | IsHandled () const |
| Returns true if the event was handled. | |
| void | SetHandled (bool handled) |
| Marks the event as handled, or not handled. | |
Additional Inherited Members | |
| Static Public Member Functions inherited from Quasar::EventOf< EventType::KeyTyped, EventCategory::Input|EventCategory::Keyboard > | |
| static constexpr EventType | GetStaticType () |
| Returns the type of this event class. | |
| Protected Member Functions inherited from Quasar::Event | |
| Event ()=default | |
| Creates an event that is not handled. | |
Sent when the user types a character, for text input.
A typed character is not the same thing as a key press: it depends on the keyboard layout, on Shift and on dead keys, and some characters need several keys. Use this event for text fields, and KeyPressedEvent for actions.
|
inlineoverridevirtual |
Returns the event with its character, for example "KeyTyped: 'A' (U+0041)" or "KeyTyped: U+00E9".
Only printable ASCII characters are shown as they are, so the log stays readable on every console.
Reimplemented from Quasar::Event.