Write out Win32 based Scancode table.
This commit is contained in:
@@ -34,25 +34,161 @@ namespace Dashboard.Events
|
|||||||
|
|
||||||
public enum ScanCode
|
public enum ScanCode
|
||||||
{
|
{
|
||||||
// TODO: this array is from ReFuel, see if this makes any sense.
|
// This scan code table is based on the Win32 scan code table.
|
||||||
|
// See https://learn.microsoft.com/en-us/windows/win32/inputdev/about-keyboard-input
|
||||||
|
Error = 0xFF,
|
||||||
|
SystemPowerDown = 0xE05E,
|
||||||
|
SystemSleep = 0xE05F,
|
||||||
|
SystemWakeUp = 0xE063,
|
||||||
|
|
||||||
Esc, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,
|
A = 0x1E,
|
||||||
Tilde, _1, _2, _3, _4, _5, _6, _7, _8, _9, _0, Minus, Equals, Backspace,
|
B = 0x30,
|
||||||
Tab, Q, W, E, R, T, Y, U, I, O, P, LBracket, RBracket, Backslash,
|
C = 0x2E,
|
||||||
CapsLock, A, S, D, F, G, H, J, K, L, Semicolon, Quote, Enter,
|
D = 0x20,
|
||||||
LShift, Z, X, C, V, B, N, M, Dot, Comma, Slash, RShift,
|
E = 0x12,
|
||||||
LCtrl, LWin, LAlt, Space, RAlt, RWin, Menu, RCtrl,
|
F = 0x21,
|
||||||
|
G = 0x22,
|
||||||
|
H = 0x23,
|
||||||
|
I = 0x17,
|
||||||
|
J = 0x24,
|
||||||
|
K = 0x25,
|
||||||
|
L = 0x26,
|
||||||
|
M = 0x32,
|
||||||
|
N = 0x31,
|
||||||
|
O = 0x18,
|
||||||
|
P = 0x19,
|
||||||
|
Q = 0x10,
|
||||||
|
R = 0x13,
|
||||||
|
S = 0x1F,
|
||||||
|
T = 0x14,
|
||||||
|
U = 0x16,
|
||||||
|
V = 0x2F,
|
||||||
|
W = 0x11,
|
||||||
|
X = 0x2D,
|
||||||
|
Y = 0x15,
|
||||||
|
Z = 0x2C,
|
||||||
|
|
||||||
PrtSc, ScrollLock, PauseBreak,
|
D1 = 0x02,
|
||||||
Insert, Delete, Home, End, PgUp, PgDown,
|
D2 = 0x03,
|
||||||
Up, Down, Left, Right,
|
D3 = 0x04,
|
||||||
|
D4 = 0x05,
|
||||||
|
D5 = 0x06,
|
||||||
|
D6 = 0x07,
|
||||||
|
D7 = 0x08,
|
||||||
|
D8 = 0x09,
|
||||||
|
D9 = 0x0A,
|
||||||
|
D0 = 0x0B,
|
||||||
|
|
||||||
NumLock, NumDiv, NumMul, NumSub, NumAdd, NumEnter, NumDecimal,
|
Return = 0x1C,
|
||||||
Num0, Num1, Num2, Num3, Num4, Num5, Num6, Num7, Num8, Num9,
|
Esc = 0x01,
|
||||||
|
Delete = 0x0E,
|
||||||
IsoB00,
|
Tab = 0x0F,
|
||||||
|
Space = 0x39,
|
||||||
KeysMax,
|
Dash = 0x0C,
|
||||||
|
Equals = 0x0D,
|
||||||
|
LBracket = 0x1A,
|
||||||
|
RBracket = 0x1B,
|
||||||
|
Backslash = 0x2B,
|
||||||
|
Semicolon = 0x27,
|
||||||
|
Apostrophe = 0x28,
|
||||||
|
Grave = 0x29,
|
||||||
|
Comma = 0x33,
|
||||||
|
Period = 0x34,
|
||||||
|
ForwardSlash = 0x35,
|
||||||
|
CapsLock = 0x3A,
|
||||||
|
F1 = 0x3B,
|
||||||
|
F2 = 0x3C,
|
||||||
|
F3 = 0x3D,
|
||||||
|
F4 = 0x3E,
|
||||||
|
F5 = 0x3F,
|
||||||
|
F6 = 0x40,
|
||||||
|
F7 = 0x41,
|
||||||
|
F8 = 0x42,
|
||||||
|
F9 = 0x43,
|
||||||
|
F10 = 0x44,
|
||||||
|
F11 = 0x45,
|
||||||
|
F12 = 0x46,
|
||||||
|
PrintScr = 0xE037,
|
||||||
|
ScrollLock = 0x46,
|
||||||
|
Pause = 0xE046,
|
||||||
|
Insert = 0xE052,
|
||||||
|
Home = 0xE047,
|
||||||
|
PageUp = 0xE049,
|
||||||
|
Backspace = 0xE053,
|
||||||
|
End = 0xE04F,
|
||||||
|
PageDown = 0xE051,
|
||||||
|
RightArrow = 0xE04D,
|
||||||
|
LeftArrow = 0xE04B,
|
||||||
|
DownArrow = 0xE050,
|
||||||
|
UpArrow = 0xE048,
|
||||||
|
NumLock = 0xE045,
|
||||||
|
NumDiv = 0xE035,
|
||||||
|
NumMul = 0x37,
|
||||||
|
NumSub = 0x4A,
|
||||||
|
NumAdd = 0x4E,
|
||||||
|
NumEnter = 0xE01C,
|
||||||
|
Num1 = 0x4F,
|
||||||
|
Num2 = 0x50,
|
||||||
|
Num3 = 0x51,
|
||||||
|
Num4 = 0x4B,
|
||||||
|
Num5 = 0x4C,
|
||||||
|
Num6 = 0x4D,
|
||||||
|
Num7 = 0x47,
|
||||||
|
Num8 = 0x48,
|
||||||
|
Num9 = 0x49,
|
||||||
|
Num0 = 0x52,
|
||||||
|
NumDecimal = 0x53,
|
||||||
|
NumBackslash = 0x56,
|
||||||
|
NumEquals = 0x59,
|
||||||
|
Application = 0xE05D,
|
||||||
|
F13 = 0x64,
|
||||||
|
F14 = 0x65,
|
||||||
|
F15 = 0x66,
|
||||||
|
F16 = 0x67,
|
||||||
|
F17 = 0x68,
|
||||||
|
F18 = 0x69,
|
||||||
|
F19 = 0x6A,
|
||||||
|
F20 = 0x6B,
|
||||||
|
F21 = 0x6C,
|
||||||
|
F22 = 0x6D,
|
||||||
|
F23 = 0x6E,
|
||||||
|
F24 = 0x76,
|
||||||
|
NumComma = 0x7E,
|
||||||
|
International1 = 0x73,
|
||||||
|
International2 = 0x70,
|
||||||
|
International3 = 0x7D,
|
||||||
|
International4 = 0x79,
|
||||||
|
International5 = 0x7B,
|
||||||
|
International6 = 0x5C,
|
||||||
|
Lang1 = 0x72,
|
||||||
|
Lang2 = 0x71,
|
||||||
|
Lang3 = 0x78,
|
||||||
|
Lang4 = 0x77,
|
||||||
|
LCtrl = 0x1D,
|
||||||
|
LShift = 0x2A,
|
||||||
|
LWin = 0xE05B,
|
||||||
|
LAlt = 0x38,
|
||||||
|
RAlt = 0xE038,
|
||||||
|
RWin = 0xE05C,
|
||||||
|
RCtrl = 0xE01D,
|
||||||
|
RShift = 0x36,
|
||||||
|
NextTrack = 0xE019,
|
||||||
|
PrevTrack = 0xE010,
|
||||||
|
Stop = 0xE024,
|
||||||
|
PlayPause = 0xE022,
|
||||||
|
VolUp = 0xE030,
|
||||||
|
VolDown = 0xE029,
|
||||||
|
Configuration = 0xE06D,
|
||||||
|
Email = 0xE06C,
|
||||||
|
Calculator = 0xE021,
|
||||||
|
Browser = 0xE06B,
|
||||||
|
Search = 0xE065,
|
||||||
|
HomePage = 0xE032,
|
||||||
|
Back = 0xE06A,
|
||||||
|
Forward = 0xE69,
|
||||||
|
Halt = 0xE068,
|
||||||
|
Refresh = 0xE67,
|
||||||
|
Bookmarks = 0xE066,
|
||||||
}
|
}
|
||||||
|
|
||||||
public class KeyboardButtonEventArgs(KeyCode keyCode, ScanCode scanCode, ModifierKeys modifierKeys, bool up)
|
public class KeyboardButtonEventArgs(KeyCode keyCode, ScanCode scanCode, ModifierKeys modifierKeys, bool up)
|
||||||
|
|||||||
Reference in New Issue
Block a user