15 #include <Ultralight/Defines.h> 19 #import <AppKit/NSEvent.h> 56 KeyEvent(Type type, uintptr_t wparam, intptr_t lparam,
bool is_system_key);
77 kMod_CtrlKey = 1 << 1,
80 kMod_MetaKey = 1 << 2,
83 kMod_ShiftKey = 1 << 3,
103 int virtual_key_code;
162 String& key_identifier_result);
Type
The various KeyEvent types.
String key_identifier
This is a string identifying the key that was pressed.
String unmodified_text
The text generated by this keyboard event before all modifiers except shift are applied.
int native_key_code
The actual key-code generated by the platform.
void UExport GetKeyIdentifierFromVirtualKeyCode(int virtual_key_code, String &key_identifier_result)
Utility function for generating a key identifier string from a virtual key-code.
Modifiers
An enumeration of the different keyboard modifiers.
The header for the KeyCodes definitions.
This is a set of common JavaScriptCore Helper functions to simplify sample code.
UTF-16 String container with conversions for UTF-8 and UTF-32.
bool is_keypad
Whether or not this is a keypad event.
bool is_auto_repeat
Whether or not this was generated as the result of an auto-repeat (eg, holding down a key).
Character input type (this event generates text in input fields)
unsigned modifiers
The current state of the keyboard.
The header for the String class.
bool is_system_key
Whether or not the pressed key is a "system key".
A generic keyboard event that can be created from a platform event or synthesized from scratch.
String text
The actual text generated by this keyboard event.