Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
Loading...
Searching...
No Matches
Gondwana.Input.Keyboard.KeyDownEventArgs Class Referencesealed

Provides data for keyboard key events, including information about the key that was pressed, the action performed (pressed, released, or repeated), and the state of modifier keys at the time of the event. This event args class is used with keyboard input polling to deliver comprehensive keyboard event information to event handlers. More...

Inheritance diagram for Gondwana.Input.Keyboard.KeyDownEventArgs:

Public Member Functions

 KeyDownEventArgs (KeyEventConfiguration config, KeyboardModifierState modifiers, KeyAction action)
 Initializes a new instance of the KeyDownEventArgs class with the specified key configuration, modifier state, and key action.

Properties

KeyEventConfiguration KeyConfig [get]
 Gets the configuration details for the keyboard key that generated this event, including the key identifier, throttling settings, and pause state. This configuration controls how frequently the key can generate events.
KeyboardModifierState Modifiers [get]
 Gets the state of keyboard modifier keys (Shift, Ctrl, Alt) at the time this event was generated. This can be a combination of multiple modifiers when keys like Ctrl+Shift or Ctrl+Alt are pressed together. Use the convenience properties IsShift, IsCtrl, and IsAlt to check for specific modifiers.
KeyAction KeyAction [get]
 Gets the type of action that occurred for this key, indicating whether the key was initially pressed, released, or is being held down and generating repeated events. This allows handlers to respond differently to key press, key release, and key repeat scenarios.
bool IsShift [get]
 Gets a value indicating whether the Shift modifier key was pressed at the time this event was generated. This is a convenience property that checks if the Modifiers flags include KeyboardModifierState.Shift.
bool IsCtrl [get]
 Gets a value indicating whether the Control (Ctrl) modifier key was pressed at the time this event was generated. This is a convenience property that checks if the Modifiers flags include KeyboardModifierState.Ctrl.
bool IsAlt [get]
 Gets a value indicating whether the Alt modifier key was pressed at the time this event was generated. This is a convenience property that checks if the Modifiers flags include KeyboardModifierState.Alt.

Detailed Description

Provides data for keyboard key events, including information about the key that was pressed, the action performed (pressed, released, or repeated), and the state of modifier keys at the time of the event. This event args class is used with keyboard input polling to deliver comprehensive keyboard event information to event handlers.

Definition at line 9 of file KeyDownEventArgs.cs.

Constructor & Destructor Documentation

◆ KeyDownEventArgs()

Gondwana.Input.Keyboard.KeyDownEventArgs.KeyDownEventArgs ( KeyEventConfiguration config,
KeyboardModifierState modifiers,
KeyAction action )

Initializes a new instance of the KeyDownEventArgs class with the specified key configuration, modifier state, and key action.

Parameters
configThe configuration details for the key that generated the event, including key identification and throttling settings.
modifiersThe state of keyboard modifier keys (Shift, Ctrl, Alt) at the time of the event. This can be a combination of multiple modifiers using bitwise flags.
actionThe type of action that occurred for this key (pressed, released, or repeated), indicating the phase of the key interaction.

Definition at line 70 of file KeyDownEventArgs.cs.

Property Documentation

◆ IsAlt

bool Gondwana.Input.Keyboard.KeyDownEventArgs.IsAlt
get

Gets a value indicating whether the Alt modifier key was pressed at the time this event was generated. This is a convenience property that checks if the Modifiers flags include KeyboardModifierState.Alt.

Definition at line 52 of file KeyDownEventArgs.cs.

◆ IsCtrl

bool Gondwana.Input.Keyboard.KeyDownEventArgs.IsCtrl
get

Gets a value indicating whether the Control (Ctrl) modifier key was pressed at the time this event was generated. This is a convenience property that checks if the Modifiers flags include KeyboardModifierState.Ctrl.

Definition at line 45 of file KeyDownEventArgs.cs.

◆ IsShift

bool Gondwana.Input.Keyboard.KeyDownEventArgs.IsShift
get

Gets a value indicating whether the Shift modifier key was pressed at the time this event was generated. This is a convenience property that checks if the Modifiers flags include KeyboardModifierState.Shift.

Definition at line 38 of file KeyDownEventArgs.cs.

◆ KeyAction

KeyAction Gondwana.Input.Keyboard.KeyDownEventArgs.KeyAction
get

Gets the type of action that occurred for this key, indicating whether the key was initially pressed, released, or is being held down and generating repeated events. This allows handlers to respond differently to key press, key release, and key repeat scenarios.

Definition at line 31 of file KeyDownEventArgs.cs.

◆ KeyConfig

KeyEventConfiguration Gondwana.Input.Keyboard.KeyDownEventArgs.KeyConfig
get

Gets the configuration details for the keyboard key that generated this event, including the key identifier, throttling settings, and pause state. This configuration controls how frequently the key can generate events.

Definition at line 16 of file KeyDownEventArgs.cs.

◆ Modifiers

KeyboardModifierState Gondwana.Input.Keyboard.KeyDownEventArgs.Modifiers
get

Gets the state of keyboard modifier keys (Shift, Ctrl, Alt) at the time this event was generated. This can be a combination of multiple modifiers when keys like Ctrl+Shift or Ctrl+Alt are pressed together. Use the convenience properties IsShift, IsCtrl, and IsAlt to check for specific modifiers.

Definition at line 24 of file KeyDownEventArgs.cs.