![]() |
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.
|
Global Avalonia key state collector that feeds the KeyboardEventPoller. Attaches tunnel-phase handlers at the TopLevel so it sees ALL key messages regardless of which control has focus, mirroring the WinForms IMessageFilter approach. Key codes are Key values cast to int.
More...
Public Member Functions | |
| AvaloniaKeyboardAdapter (Control lifetimeOwner) | |
| Initializes a new instance of the AvaloniaKeyboardAdapter class. | |
| bool | IsDown (int keyCode) |
Returns true if the key represented by keyCode (an Key value cast to int) is currently pressed. | |
| void | Dispose () |
| Releases all resources and removes all event handlers registered by this adapter. | |
Static Public Member Functions | |
| static ? int | GetKeyCodeFromString (string keyName) |
| Converts an Avalonia Key name (case-insensitive) to its integer key code. | |
Properties | |
| KeyboardModifierState | CurrentKeyboardModifiers [get] |
| Gets the current state of keyboard modifiers (Shift, Ctrl, Alt). | |
Global Avalonia key state collector that feeds the KeyboardEventPoller. Attaches tunnel-phase handlers at the TopLevel so it sees ALL key messages regardless of which control has focus, mirroring the WinForms IMessageFilter approach. Key codes are Key values cast to int.
Definition at line 17 of file AvaloniaKeyboardAdapter.cs.
| Gondwana.Avalonia.Input.Keyboard.AvaloniaKeyboardAdapter.AvaloniaKeyboardAdapter | ( | Control | lifetimeOwner | ) |
Initializes a new instance of the AvaloniaKeyboardAdapter class.
| lifetimeOwner | The control whose visual-tree lifetime governs this adapter. Key events are captured at the TopLevel that owns this control. |
| ArgumentNullException | Thrown when lifetimeOwner is null. |
Definition at line 58 of file AvaloniaKeyboardAdapter.cs.
| void Gondwana.Avalonia.Input.Keyboard.AvaloniaKeyboardAdapter.Dispose | ( | ) |
Releases all resources and removes all event handlers registered by this adapter.
Definition at line 146 of file AvaloniaKeyboardAdapter.cs.
|
static |
Converts an Avalonia Key name (case-insensitive) to its integer key code.
| keyName | The name of the key, matching a Key enumeration value. |
null.Definition at line 24 of file AvaloniaKeyboardAdapter.cs.
| bool Gondwana.Avalonia.Input.Keyboard.AvaloniaKeyboardAdapter.IsDown | ( | int | keyCode | ) |
Returns true if the key represented by keyCode (an Key value cast to int) is currently pressed.
| keyCode | An Key value cast to int. |
true if the key is currently pressed; otherwise, false.Implements Gondwana.Input.Keyboard.IKeyboardAdapter.
Definition at line 120 of file AvaloniaKeyboardAdapter.cs.
|
get |
Gets the current state of keyboard modifiers (Shift, Ctrl, Alt).
Implements Gondwana.Input.Keyboard.IKeyboardAdapter.
Definition at line 47 of file AvaloniaKeyboardAdapter.cs.