KeyStepBuilder
Namespace: Hex1b.Input
Assembly: Hex1b.dll
Fluent builder for constructing key steps in an input binding. Supports chaining modifiers, keys, and multi-step chords.
public sealed class KeyStepBuilderInheritance
Object → KeyStepBuilder
Methods
Action(Action, string?)
Completes the binding with the given action handler.
Parameters:
public void Action(Action handler, string? description = null)Action(Action<InputBindingActionContext>, string?)
Completes the binding with a context-aware action handler. The context provides access to app-level services like focus navigation.
Parameters:
handler(Action<InputBindingActionContext>):description(String):
public void Action(Action<InputBindingActionContext> handler, string? description = null)Action(Func<InputBindingActionContext, Task>, string?)
Completes the binding with an async context-aware action handler.
Parameters:
handler(Func<InputBindingActionContext, Task>):description(String):
public void Action(Func<InputBindingActionContext, Task> handler, string? description = null)Alt()
Adds Alt modifier to the current step.
Returns: KeyStepBuilder
public KeyStepBuilder Alt()Ctrl()
Adds Ctrl modifier to the current step. Cannot be combined with Shift modifier.
Returns: KeyStepBuilder
public KeyStepBuilder Ctrl()Global()
Marks this binding as global (evaluated regardless of focus). Global bindings are checked before focus-based routing. Useful for menu bar accelerators that should work from anywhere.
Returns: KeyStepBuilder
public KeyStepBuilder Global()Key(Hex1bKey)
Sets the key for the current step.
Parameters:
key(Hex1bKey):
Returns: KeyStepBuilder
public KeyStepBuilder Key(Hex1bKey key)OverridesCapture()
Marks this binding as overriding input capture. When another node has captured all input, this binding will still be checked. Use for menu accelerators and app-level shortcuts that should always work.
Returns: KeyStepBuilder
public KeyStepBuilder OverridesCapture()Shift()
Adds Shift modifier to the current step. Cannot be combined with Ctrl modifier.
Returns: KeyStepBuilder
public KeyStepBuilder Shift()Then()
Commits the current step and starts a new one for chords.
Returns: KeyStepBuilder
public KeyStepBuilder Then()Triggers(ActionId, Action, string?)
Completes the binding by registering it for the specified action. The handler is provided and registered in the action registry for future rebinding.
Parameters:
actionId(ActionId): The action this binding triggers.handler(Action): The handler to execute (no context).description(String): Optional description for help/documentation.
public void Triggers(ActionId actionId, Action handler, string? description = null)Triggers(ActionId, Action<InputBindingActionContext>, string?)
Completes the binding by registering it for the specified action. The handler is provided and registered in the action registry for future rebinding.
Parameters:
actionId(ActionId): The action this binding triggers.handler(Action<InputBindingActionContext>): The handler to execute.description(String): Optional description for help/documentation.
public void Triggers(ActionId actionId, Action<InputBindingActionContext> handler, string? description = null)Triggers(ActionId, Func<InputBindingActionContext, Task>, string?)
Completes the binding by registering it for the specified action. The handler is provided and registered in the action registry for future rebinding.
Parameters:
actionId(ActionId):handler(Func<InputBindingActionContext, Task>):description(String):
public void Triggers(ActionId actionId, Func<InputBindingActionContext, Task> handler, string? description = null)Triggers(ActionId)
Completes the binding by rebinding a previously registered action to this key. The handler is auto-resolved from the action registry.
Parameters:
actionId(ActionId): The action to rebind. Must have been previously registered via .
public void Triggers(ActionId actionId)