10#import <AppKit/NSEvent.h>
18class PlatformKeyEvent;
186 String& key_identifier_result);
#define UExport
Definition Exports.h:22
bool is_auto_repeat
Whether or not this was generated as the result of an auto-repeat (eg, holding down a key).
Definition KeyEvent.h:161
Type
The various KeyEvent types.
Definition KeyEvent.h:30
@ kType_RawKeyDown
Raw Key-Down type.
Definition KeyEvent.h:49
@ kType_Char
Character input event type.
Definition KeyEvent.h:55
@ kType_KeyDown
Key-Down event type.
Definition KeyEvent.h:39
@ kType_KeyUp
Key-Up event type.
Definition KeyEvent.h:44
String key_identifier
This is a string identifying the key that was pressed.
Definition KeyEvent.h:140
bool is_keypad
Whether or not this is a keypad event.
Definition KeyEvent.h:156
KeyEvent & operator=(KeyEvent &&other) noexcept
Move assignment.
bool is_system_key
Whether or not the pressed key is a "system key".
Definition KeyEvent.h:168
Modifiers
An enumeration of the different keyboard modifiers.
Definition KeyEvent.h:95
@ kMod_AltKey
Whether or not an ALT key is down.
Definition KeyEvent.h:97
@ kMod_CtrlKey
Whether or not a Control key is down.
Definition KeyEvent.h:100
@ kMod_ShiftKey
Whether or not a Shift key is down.
Definition KeyEvent.h:106
@ kMod_MetaKey
Whether or not a meta key (Command-key on Mac, Windows-key on Win) is down.
Definition KeyEvent.h:103
String unmodified_text
The text generated by this keyboard event before all modifiers except shift are applied.
Definition KeyEvent.h:151
String text
The actual text generated by this keyboard event.
Definition KeyEvent.h:145
KeyEvent(const KeyEvent &other)
Copy constructor.
int virtual_key_code
The virtual key-code associated with this keyboard event.
Definition KeyEvent.h:125
PlatformKeyEvent * platform_event
Internal, platform-specific key event data (set by the library's own platform integrations).
Definition KeyEvent.h:174
KeyEvent(KeyEvent &&other) noexcept
Move constructor.
Type type
The type of this KeyEvent.
Definition KeyEvent.h:112
KeyEvent()
Creates an empty KeyEvent, you will need to initialize its members yourself.
KeyEvent & operator=(const KeyEvent &other)
Copy assignment.
int native_key_code
The actual key-code generated by the platform.
Definition KeyEvent.h:132
unsigned modifiers
The current state of the keyboard.
Definition KeyEvent.h:118
Unicode string container with conversions for UTF-8, UTF-16, and UTF-32.
Definition String.h:31
Root namespace for every public Ultralight type, function, and enumeration.
void GetKeyIdentifierFromVirtualKeyCode(int virtual_key_code, String &key_identifier_result)
Utility function for generating a key identifier string from a virtual key-code.
void GetKeyFromVirtualKeyCode(int virtual_key_code, bool shift, String &key_result)
Utility function for generating a key string from a virtual key-code.