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.Widgets.Menus.KeyGesture Struct Reference

A host key code and an exact combination of keyboard modifiers. More...

Public Member Functions

 KeyGesture (int key, KeyboardModifierState modifiers=KeyboardModifierState.None)
 Creates a gesture. Letter codes should use uppercase characters.
override string ToString ()
 Returns a display label such as Ctrl+O or Alt+F4.

Static Public Member Functions

static KeyGesture Ctrl (int key)
 Creates a Control-key gesture.
static KeyGesture CtrlShift (int key)
 Creates a Control-Shift gesture.

Properties

int Key [get]
 Gets the adapter key code.
KeyboardModifierState Modifiers [get]
 Gets the exact modifier combination.

Detailed Description

A host key code and an exact combination of keyboard modifiers.

Key codes follow the keyboard adapter, as with WidgetKeyboardEventArgs. Display names use the virtual-key convention used by the built-in widgets.

Definition at line 8 of file KeyGesture.cs.

Constructor & Destructor Documentation

◆ KeyGesture()

Gondwana.Widgets.Menus.KeyGesture.KeyGesture ( int key,
KeyboardModifierState modifiers = KeyboardModifierState::None )

Creates a gesture. Letter codes should use uppercase characters.

Parameters
keyThe lookup key for the resource.
modifiersThe modifiers.

Definition at line 13 of file KeyGesture.cs.

Member Function Documentation

◆ Ctrl()

KeyGesture Gondwana.Widgets.Menus.KeyGesture.Ctrl ( int key)
static

Creates a Control-key gesture.

Parameters
keyThe lookup key for the resource.
Returns
A key gesture requiring the Control modifier.

◆ CtrlShift()

KeyGesture Gondwana.Widgets.Menus.KeyGesture.CtrlShift ( int key)
static

Creates a Control-Shift gesture.

Parameters
keyThe lookup key for the resource.
Returns
A key gesture requiring both Control and Shift modifiers.

◆ ToString()

override string Gondwana.Widgets.Menus.KeyGesture.ToString ( )

Returns a display label such as Ctrl+O or Alt+F4.

Returns
The formatted keyboard shortcut text.

Definition at line 37 of file KeyGesture.cs.

Property Documentation

◆ Key

int Gondwana.Widgets.Menus.KeyGesture.Key
get

Gets the adapter key code.

Definition at line 24 of file KeyGesture.cs.

◆ Modifiers

KeyboardModifierState Gondwana.Widgets.Menus.KeyGesture.Modifiers
get

Gets the exact modifier combination.

Definition at line 26 of file KeyGesture.cs.