Class ConsoleKeyMapping
Helper class to handle the scan code and virtual key from a System.ConsoleKey.
Inheritance
System.Object
ConsoleKeyMapping
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public static class ConsoleKeyMapping
Methods
| Improve this Doc View SourceGetConsoleKeyFromKey(UInt32, ConsoleModifiers, out UInt32, out UInt32)
Get the System.ConsoleKey from a Key.
Declaration
public static uint GetConsoleKeyFromKey(uint keyValue, ConsoleModifiers modifiers, out uint scanCode, out uint outputChar)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | keyValue | The key value. |
System.ConsoleModifiers | modifiers | The modifiers keys. |
System.UInt32 | scanCode | The resulting scan code. |
System.UInt32 | outputChar | The resulting output character. |
Returns
Type | Description |
---|---|
System.UInt32 | The System.ConsoleKey or the outputChar . |
GetKeyCharFromConsoleKey(UInt32, ConsoleModifiers, out UInt32, out UInt32)
Get the output character from the System.ConsoleKey.
Declaration
public static uint GetKeyCharFromConsoleKey(uint unicodeChar, ConsoleModifiers modifiers, out uint consoleKey, out uint scanCode)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | unicodeChar | The unicode character. |
System.ConsoleModifiers | modifiers | The modifiers keys. |
System.UInt32 | consoleKey | The resulting console key. |
System.UInt32 | scanCode | The resulting scan code. |
Returns
Type | Description |
---|---|
System.UInt32 | The output character or the consoleKey . |
MapConsoleKeyToKey(ConsoleKey, out Boolean)
Maps a System.ConsoleKey to a Key.
Declaration
public static Key MapConsoleKeyToKey(ConsoleKey consoleKey, out bool isMappable)
Parameters
Type | Name | Description |
---|---|---|
System.ConsoleKey | consoleKey | The console key. |
System.Boolean | isMappable | If true is mapped to a valid character, otherwise false. |
Returns
Type | Description |
---|---|
Key | The Key or the consoleKey . |
MapKeyModifiers(ConsoleKeyInfo, Key)
Maps a System.ConsoleKeyInfo to a Key.
Declaration
public static Key MapKeyModifiers(ConsoleKeyInfo keyInfo, Key key)
Parameters
Type | Name | Description |
---|---|---|
System.ConsoleKeyInfo | keyInfo | The console key info. |
Key | key | The key. |
Returns
Type | Description |
---|---|
Key | The Key with System.ConsoleModifiers or the key |
MapKeyToConsoleKey(UInt32, out Boolean)
Maps a Key to a System.ConsoleKey.
Declaration
public static uint MapKeyToConsoleKey(uint keyValue, out bool isMappable)
Parameters
Type | Name | Description |
---|---|---|
System.UInt32 | keyValue | The key value. |
System.Boolean | isMappable | If true is mapped to a valid character, otherwise false. |
Returns
Type | Description |
---|---|
System.UInt32 | The System.ConsoleKey or the keyValue . |