Skip to content
ConsoleMonster
Struct

KeyHint

ConsoleMonster.Widgets

Namespace
ConsoleMonster.Widgets
Assembly
ConsoleMonster
Base
ValueType
Modifiers
sealed

One key hint in a footer: the keys ("ctrl+c", "↑↓") and what they do ("stop", "move").

Inheritance

  • ValueType
  • KeyHint

Usage

Explore 15 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Returned or exposed by 3

Accepted by parameters 12

Constructors

KeyHint 2 overloads
public KeyHint(string keys, string label, bool available = true) #

Creates a hint.

Parameters

keys string required
The keys, lower case ("ctrl+c").
label string required
What they do ("stop").
available bool = true optional
Whether the command can run in the current context.
public KeyHint(string keys, string label, KeyChord chord, bool available = true) #

Creates a hint that a click in an app presses chord for, as the keyboard would.

Parameters

keys string required
The keys, lower case ("f5").
label string required
What they do ("refresh").
chord ConsoleMonster.Input.KeyChord required
The key a click on the hint presses.
available bool = true optional
Whether the command can run in the current context; an unavailable hint does not click.

Properties

public KeyChord? Chord { get; } #

The key a click on the hint presses in an app, or null for a hint that only describes keys.

public string Keys { get; } #

The keys.

public string Label { get; } #

What they do.

public bool Available { get; } #

Whether this command can run in the current context. Unavailable hints remain visible and dimmed.