13#import <AppKit/NSEvent.h>
65 KeyEvent(
Type type, uintptr_t wparam, intptr_t lparam,
bool is_system_key);
83 kMod_CtrlKey = 1 << 1,
86 kMod_MetaKey = 1 << 2,
89 kMod_ShiftKey = 1 << 3,
163 String& key_identifier_result);
#define UExport
Definition Exports.h:25
Keyboard event representing a change in keyboard state.
Definition KeyEvent.h:23
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:144
Type
The various KeyEvent types.
Definition KeyEvent.h:28
@ kType_RawKeyDown
Raw Key-Down type.
Definition KeyEvent.h:46
@ kType_Char
Character input event type.
Definition KeyEvent.h:52
@ kType_KeyDown
Key-Down event type.
Definition KeyEvent.h:36
@ kType_KeyUp
Key-Up event type.
Definition KeyEvent.h:41
String key_identifier
This is a string identifying the key that was pressed.
Definition KeyEvent.h:123
bool is_keypad
Whether or not this is a keypad event.
Definition KeyEvent.h:139
bool is_system_key
Whether or not the pressed key is a "system key".
Definition KeyEvent.h:151
Modifiers
An enumeration of the different keyboard modifiers.
Definition KeyEvent.h:78
String unmodified_text
The text generated by this keyboard event before all modifiers except shift are applied.
Definition KeyEvent.h:134
String text
The actual text generated by this keyboard event.
Definition KeyEvent.h:128
int virtual_key_code
The virtual key-code associated with this keyboard event.
Definition KeyEvent.h:108
Type type
The type of this KeyEvent.
Definition KeyEvent.h:95
KeyEvent()
Creates an empty KeyEvent, you will need to initialize its members yourself.
int native_key_code
The actual key-code generated by the platform.
Definition KeyEvent.h:115
unsigned modifiers
The current state of the keyboard.
Definition KeyEvent.h:101
Unicode string container with conversions for UTF-8, UTF-16, and UTF-32.
Definition String.h:34
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.