TSdlKeyboardEvent
Keyboard button event structure (Event.Key.* )
The Key
is the base TSdlKeycode generated by pressing the Scancode
using the current keyboard layout, applying any options specified in TSdlHints.KeycodeOptions. You can get the TSdlKeycode corresponding to the event scancode and modifiers directly from the keyboard layout, bypassing TSdlHints.KeycodeOptions, by calling TSdlScancode.ToKeycode.
Definition
Unit: Neslib.Sdl3.Events
See Also
Properties
Name | Description |
---|---|
IsDown | True if the key is pressed |
IsRepeat | True if this is a key repeat |
Key | SDL virtual key code |
Keyboard | The keyboard instance, or nil if unknown or virtual |
Kind | Event kind (TSdlEventKind.Key*) |
Mods | current key modifiers |
Raw | The platform dependent scancode for this event |
Scancode | SDL physical key code |
Timestamp | In nanoseconds, populated using SdlGetTicksNS |
Property Descriptions
IsDown
True if the key is pressed
property IsDown: Boolean read FHandle.down
Type: Boolean
IsRepeat
True if this is a key repeat
property IsRepeat: Boolean read FHandle.&repeat
Type: Boolean
Key
SDL virtual key code
property Key: TSdlKeycode read GetKey
Type: TSdlKeycode
Keyboard
The keyboard instance, or nil if unknown or virtual
property Keyboard: TSdlKeyboard read GetKeyboard
Type: TSdlKeyboard
Kind
Event kind (TSdlEventKind.Key*)
property Kind: TSdlEventKind read GetKind
Type: TSdlEventKind
Mods
current key modifiers
property Mods: TSdlKeymods read GetMods
Type: TSdlKeymods
Raw
The platform dependent scancode for this event
property Raw: Word read FHandle.raw
Type: Word
Scancode
SDL physical key code
property Scancode: TSdlScancode read GetScancode
Type: TSdlScancode
Timestamp
In nanoseconds, populated using SdlGetTicksNS
property Timestamp: UInt64 read FHandle.timestamp
Type: UInt64