Class ScanMapBase
Represents the base class for keyboard layout scan-maps.
Inheritance
System.Object
ScanMapBase
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: Cosmos.System
Assembly: Cosmos.System2.dll
Syntax
public abstract class ScanMapBase
Constructors
| Improve this Doc View SourceScanMapBase()
Initializes a new instance of the ScanMapBase class.
Declaration
protected ScanMapBase()
Fields
| Improve this Doc View SourceKeys
The available key mappings.
Declaration
protected List<KeyMapping> Keys
Field Value
Type | Description |
---|---|
System.Collections.Generic.List<KeyMapping> |
Methods
| Improve this Doc View SourceConvertScanCode(Byte, Boolean, Boolean, Boolean, Boolean, Boolean, Boolean)
Converts the given scan code to a KeyEvent instance.
Declaration
public KeyEvent ConvertScanCode(byte scanKey, bool ctrl, bool shift, bool alt, bool numLock, bool capsLock, bool scrollLock)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | scanKey | The scanned (pressed) key. |
System.Boolean | ctrl | Whether the Control (Ctrl) key is pressed. |
System.Boolean | shift | Whether the Shift key is pressed. |
System.Boolean | alt | Whether the Alt key is pressed. |
System.Boolean | numLock | Whether num-lock is active. |
System.Boolean | capsLock | Whether caps-lock is active. |
System.Boolean | scrollLock | Whether scroll-lock is active. |
Returns
Type | Description |
---|---|
KeyEvent | The translated KeyEvent. |
InitKeys()
Initializes the key list.
Declaration
protected abstract void InitKeys()
ScanCodeMatchesKey(Byte, ConsoleKeyEx)
Checks if the given scan code matches the specified key.
Declaration
public bool ScanCodeMatchesKey(byte scanCode, ConsoleKeyEx key)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | scanCode | The physical keyboard scan-code. |
ConsoleKeyEx | key | The virtual mapping key. |
Returns
Type | Description |
---|---|
System.Boolean |