13#import <AppKit/NSEvent.h>
67 KeyEvent(
Type type, uintptr_t wparam, intptr_t lparam,
bool is_system_key);
85 kMod_CtrlKey = 1 << 1,
88 kMod_MetaKey = 1 << 2,
91 kMod_ShiftKey = 1 << 3,
164 String& key_identifier_result);
#define UExport
Definition Defines.h:65
Generic keyboard event representing a change in keyboard state.
Definition KeyEvent.h:23
int native_key_code
The actual key-code generated by the platform.
Definition KeyEvent.h:117
String unmodified_text
The text generated by this keyboard event before all modifiers except shift are applied.
Definition KeyEvent.h:136
String text
The actual text generated by this keyboard event.
Definition KeyEvent.h:130
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:146
String key_identifier
This is a string identifying the key that was pressed.
Definition KeyEvent.h:125
Type type
Definition KeyEvent.h:97
KeyEvent()
Creates an empty KeyEvent, you will need to initialize its members yourself.
unsigned modifiers
The current state of the keyboard.
Definition KeyEvent.h:103
Type
The various KeyEvent types.
Definition KeyEvent.h:28
@ kType_KeyDown
Key-Down event type.
Definition KeyEvent.h:35
@ kType_KeyUp
Key-Up event type.
Definition KeyEvent.h:40
@ kType_RawKeyDown
Raw Key-Down type.
Definition KeyEvent.h:48
@ kType_Char
Character input event type.
Definition KeyEvent.h:54
Modifiers
An enumeration of the different keyboard modifiers.
Definition KeyEvent.h:80
bool is_keypad
Whether or not this is a keypad event.
Definition KeyEvent.h:141
int virtual_key_code
The virtual key-code associated with this keyboard event.
Definition KeyEvent.h:110
bool is_system_key
Whether or not the pressed key is a "system key".
Definition KeyEvent.h:152
UTF-8 String container with conversions for UTF-16 and UTF-32.
Definition String.h:21
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.