2024-11-02 11:09:31 -05:00
|
|
|
/*
|
|
|
|
Originally I was modelling this after the following(1). I have since changed my mind.
|
|
|
|
I am now modelling it as I see fit. This is likely not the final version.
|
|
|
|
|
|
|
|
1) https://www.libsdl.org/release/SDL-1.2.15/include/SDL_keysym.h
|
|
|
|
*/
|
|
|
|
|
2024-09-17 19:26:37 -05:00
|
|
|
KeyCode := u32
|
|
|
|
|
2024-11-02 11:09:31 -05:00
|
|
|
// Typically this is not a keycode you will ever recieve.
|
|
|
|
None := KeyCode.(0)
|
2024-09-18 03:40:25 -05:00
|
|
|
|
2024-11-02 11:09:31 -05:00
|
|
|
Escape := KeyCode.(1)
|
|
|
|
/* Alphabet keycodes */
|
2024-09-18 03:40:25 -05:00
|
|
|
|
2024-11-02 11:09:31 -05:00
|
|
|
A := KeyCode.(2)
|
|
|
|
B := KeyCode.(3)
|
|
|
|
C := KeyCode.(4)
|
|
|
|
D := KeyCode.(5)
|
|
|
|
E := KeyCode.(6)
|
|
|
|
F := KeyCode.(7)
|
|
|
|
G := KeyCode.(8)
|
|
|
|
H := KeyCode.(9)
|
|
|
|
I := KeyCode.(10)
|
|
|
|
J := KeyCode.(11)
|
|
|
|
K := KeyCode.(12)
|
|
|
|
L := KeyCode.(13)
|
|
|
|
M := KeyCode.(14)
|
|
|
|
N := KeyCode.(15)
|
|
|
|
O := KeyCode.(16)
|
|
|
|
P := KeyCode.(17)
|
|
|
|
Q := KeyCode.(18)
|
|
|
|
R := KeyCode.(19)
|
|
|
|
S := KeyCode.(20)
|
|
|
|
T := KeyCode.(21)
|
|
|
|
U := KeyCode.(22)
|
|
|
|
V := KeyCode.(23)
|
|
|
|
W := KeyCode.(24)
|
|
|
|
X := KeyCode.(25)
|
|
|
|
Y := KeyCode.(26)
|
|
|
|
Z := KeyCode.(27)
|
2024-09-18 03:40:25 -05:00
|
|
|
|
2024-11-02 11:09:31 -05:00
|
|
|
/* Numeric keycodes*/
|
2024-09-18 03:40:25 -05:00
|
|
|
|
2024-11-02 11:09:31 -05:00
|
|
|
Number0 := KeyCode.(28)
|
|
|
|
Number1 := KeyCode.(29)
|
|
|
|
Number2 := KeyCode.(30)
|
|
|
|
Number3 := KeyCode.(31)
|
|
|
|
Number4 := KeyCode.(32)
|
|
|
|
Number5 := KeyCode.(33)
|
|
|
|
Number6 := KeyCode.(34)
|
|
|
|
Number7 := KeyCode.(35)
|
|
|
|
Number8 := KeyCode.(36)
|
|
|
|
Number9 := KeyCode.(37)
|
2024-09-18 03:40:25 -05:00
|
|
|
|
2024-11-02 11:09:31 -05:00
|
|
|
KeypadNumber0 := KeyCode.(38)
|
|
|
|
KeypadNumber1 := KeyCode.(39)
|
|
|
|
KeypadNumber2 := KeyCode.(40)
|
|
|
|
KeypadNumber3 := KeyCode.(41)
|
|
|
|
KeypadNumber4 := KeyCode.(42)
|
|
|
|
KeypadNumber5 := KeyCode.(43)
|
|
|
|
KeypadNumber6 := KeyCode.(44)
|
|
|
|
KeypadNumber7 := KeyCode.(45)
|
|
|
|
KeypadNumber8 := KeyCode.(46)
|
|
|
|
KeypadNumber9 := KeyCode.(47)
|
2024-09-18 03:40:25 -05:00
|
|
|
|
2024-11-02 11:09:31 -05:00
|
|
|
KeypadPeriod := KeyCode.(48)
|
|
|
|
KeypadDivide := KeyCode.(49)
|
|
|
|
KeypadMultiply := KeyCode.(50)
|
|
|
|
KeypadMinus := KeyCode.(51)
|
|
|
|
KeypadPlus := KeyCode.(52)
|
|
|
|
KeypadEnter := KeyCode.(53)
|
|
|
|
KeypadEquals := KeyCode.(54)
|
|
|
|
|
|
|
|
Delete := KeyCode.(55)
|
|
|
|
/* Locking Keys */
|
|
|
|
NumLock := KeyCode.(56)
|
|
|
|
CapsLock := KeyCode.(57)
|
|
|
|
ScrollLock := KeyCode.(58)
|
2024-09-18 03:40:25 -05:00
|
|
|
|
|
|
|
/* "Alt Gr" key */
|
2024-11-02 11:09:31 -05:00
|
|
|
Mode := KeyCode.(59)
|
2024-09-18 03:40:25 -05:00
|
|
|
|
|
|
|
/* Multi-key compose key */
|
2024-11-02 11:09:31 -05:00
|
|
|
Compose := KeyCode.(60)
|
|
|
|
|
|
|
|
LeftAlt := KeyCode.(61)
|
|
|
|
LeftControl := KeyCode.(62)
|
|
|
|
LeftMeta := KeyCode.(63)
|
|
|
|
LeftShift := KeyCode.(64)
|
|
|
|
/* Left "Windows" key */
|
|
|
|
LeftSuper := KeyCode.(65)
|
|
|
|
|
|
|
|
RightAlt := KeyCode.(66)
|
|
|
|
RightControl := KeyCode.(67)
|
|
|
|
RightMeta := KeyCode.(68)
|
|
|
|
RightShift := KeyCode.(69)
|
|
|
|
/* Right "Windows" key */
|
|
|
|
RightSuper := KeyCode.(70)
|
|
|
|
|
|
|
|
/*
|
|
|
|
This block of any triggers on any press of any of the keys.
|
|
|
|
Typically this is the event to care about.
|
|
|
|
*/
|
|
|
|
AnyNumber0 := KeyCode.(71)
|
|
|
|
AnyNumber1 := KeyCode.(72)
|
|
|
|
AnyNumber2 := KeyCode.(73)
|
|
|
|
AnyNumber3 := KeyCode.(74)
|
|
|
|
AnyNumber4 := KeyCode.(75)
|
|
|
|
AnyNumber5 := KeyCode.(76)
|
|
|
|
AnyNumber6 := KeyCode.(77)
|
|
|
|
AnyNumber7 := KeyCode.(78)
|
|
|
|
AnyNumber8 := KeyCode.(79)
|
|
|
|
AnyNumber9 := KeyCode.(80)
|
|
|
|
|
|
|
|
AnyAlt := KeyCode.(81)
|
|
|
|
AnyControl := KeyCode.(82)
|
|
|
|
AnyMeta := KeyCode.(83)
|
|
|
|
AnyShift := KeyCode.(84)
|
|
|
|
/* Any "Windows" key */
|
|
|
|
AnySuper := KeyCode.(85)
|