Interface IKeyboard
Defines a contract for managing keyboard input and key bindings at the Application level.
This interface decouples keyboard handling state from the static App class, enabling parallelizable unit tests and better testability.
public interface IKeyboard
Properties
- App
Sets the application instance that this keyboard handler is associated with. This provides access to application state without coupling to static Application class.
- ArrangeKey
Gets or sets the key to activate arranging views using the keyboard.
- KeyBindings
Gets the Application-scoped key bindings.
- NextTabGroupKey
Alternative key to navigate forwards through views. Ctrl+Tab is the primary key.
- NextTabKey
Alternative key to navigate forwards through views. Tab is the primary key.
- PrevTabGroupKey
Alternative key to navigate backwards through views. Shift+Ctrl+Tab is the primary key.
- PrevTabKey
Alternative key to navigate backwards through views. Shift+Tab is the primary key.
- QuitKey
Gets or sets the key to quit the application.
Methods
- InvokeCommand(Command, Key, KeyBinding)
Invokes an Application-bound command.
- InvokeCommandsBoundToKey(Key)
Invokes any commands bound at the Application-level to
key.
- RaiseKeyDownEvent(Key)
Called when the user presses a key (by the IDriver). Raises the cancelable KeyDown event, then calls NewKeyDownEvent(Key) on all top level views, and finally if the key was not handled, invokes any Application-scoped KeyBindings.
- RaiseKeyUpEvent(Key)
Called when the user releases a key (by the IDriver). Raises the cancelable KeyUp event then calls NewKeyUpEvent(Key) on all top level views. Called after RaiseKeyDownEvent(Key).