Method FindHotKey | Terminal.Gui v2 (original) (raw)
Namespace
Assembly
Terminal.Gui.dll
FindHotKey(string, Rune, out int, out Key, bool)
Finds the HotKey and its location in text.
public static bool FindHotKey(string text, Rune hotKeySpecifier, out int hotPos, out Key hotKey, bool firstUpperCase = false)
Parameters
text
string
The text to look in.
hotKeySpecifier
Rune
The HotKey specifier (e.g. '_') to look for.
hotPos
int
Outputs the Rune index into text
.
hotKey
Key
Outputs the hotKey. Empty if not found.
firstUpperCase
bool
If true
the legacy behavior of identifying the first upper case character as the HotKey will be enabled. Regardless of the value of this parameter, hotKeySpecifier
takes precedence. Defaults to false.
Returns
true
if a HotKey was found; false
otherwise.