Class ConsoleKeyMapping
Helper class to handle the scan code and virtual key from a
ConsoleKey.
Inheritance
ConsoleKeyMapping
Assembly: Terminal.Gui.dll
Syntax
public static class ConsoleKeyMapping
Methods
|
Edit this page
View Source
GetConsoleKeyFromKey(uint, ConsoleModifiers, out uint, out uint)
Declaration
public static uint GetConsoleKeyFromKey(uint keyValue, ConsoleModifiers modifiers, out uint scanCode, out uint outputChar)
Parameters
| Type |
Name |
Description |
| uint |
keyValue |
The key value. |
| ConsoleModifiers |
modifiers |
The modifiers keys. |
| uint |
scanCode |
The resulting scan code. |
| uint |
outputChar |
The resulting output character. |
Returns
|
Edit this page
View Source
GetKeyCharFromConsoleKey(uint, ConsoleModifiers, out uint, out uint)
Declaration
public static uint GetKeyCharFromConsoleKey(uint unicodeChar, ConsoleModifiers modifiers, out uint consoleKey, out uint scanCode)
Parameters
| Type |
Name |
Description |
| uint |
unicodeChar |
The unicode character. |
| ConsoleModifiers |
modifiers |
The modifiers keys. |
| uint |
consoleKey |
The resulting console key. |
| uint |
scanCode |
The resulting scan code. |
Returns
| Type |
Description |
| uint |
The output character or the consoleKey. |
|
Edit this page
View Source
MapConsoleKeyToKey(ConsoleKey, out bool)
Declaration
public static Key MapConsoleKeyToKey(ConsoleKey consoleKey, out bool isMappable)
Parameters
| Type |
Name |
Description |
| ConsoleKey |
consoleKey |
The console key. |
| bool |
isMappable |
If true is mapped to a valid character, otherwise false. |
Returns
| Type |
Description |
| Key |
The Key or the consoleKey. |
|
Edit this page
View Source
MapKeyModifiers(ConsoleKeyInfo, Key)
Declaration
public static Key MapKeyModifiers(ConsoleKeyInfo keyInfo, Key key)
Parameters
Returns
|
Edit this page
View Source
MapKeyToConsoleKey(uint, out bool)
Declaration
public static uint MapKeyToConsoleKey(uint keyValue, out bool isMappable)
Parameters
| Type |
Name |
Description |
| uint |
keyValue |
The key value. |
| bool |
isMappable |
If true is mapped to a valid character, otherwise false. |
Returns