Table of Contents

Property Binding

Namespace
Terminal.Gui.Input
Assembly
Terminal.Gui.dll

Binding

The binding that triggered the command.

public IInputBinding? Binding { readonly get; set; }

Property Value

IInputBinding

Remarks

Use pattern matching to access specific binding types:

if (ctx.Binding is KeyBinding kb) { /* key binding */ }
    else if (ctx.Binding is MouseBinding mb) { /* mouse binding */ }
    else if (ctx.Binding is InputBinding ib) { /* programmatic */ }