1
0
Fork 0
forked from AbleOS/ableos

keycode nonsense

This commit is contained in:
Able 2024-11-02 11:09:31 -05:00
parent 69c95c35b5
commit 6894ef2360

View file

@ -1,67 +1,121 @@
/*
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
*/
KeyCode := u32 KeyCode := u32
// https://www.libsdl.org/release/SDL-1.2.15/include/SDL_keysym.h // Typically this is not a keycode you will ever recieve.
Backspace := KeyCode.(8) None := KeyCode.(0)
Tab := KeyCode.(9)
Clear := KeyCode.(12)
Return := KeyCode.(13)
Pause := KeyCode.(19)
Escape := KeyCode.(27)
Space := KeyCode.(32)
A := KeyCode.(97) Escape := KeyCode.(1)
/* /* Alphabet keycodes */
ETC
*/
Z := KeyCode.(122)
Delete := KeyCode.(127) 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)
/* /* Numeric keycodes*/
ETC
*/
KeypadNumber0 := KeyCode.(256) Number0 := KeyCode.(28)
KeypadNumber1 := KeyCode.(257) Number1 := KeyCode.(29)
KeypadNumber2 := KeyCode.(258) Number2 := KeyCode.(30)
KeypadNumber3 := KeyCode.(259) Number3 := KeyCode.(31)
KeypadNumber4 := KeyCode.(260) Number4 := KeyCode.(32)
KeypadNumber5 := KeyCode.(261) Number5 := KeyCode.(33)
KeypadNumber6 := KeyCode.(262) Number6 := KeyCode.(34)
KeypadNumber7 := KeyCode.(263) Number7 := KeyCode.(35)
KeypadNumber8 := KeyCode.(264) Number8 := KeyCode.(36)
KeypadNumber9 := KeyCode.(265) Number9 := KeyCode.(37)
KeypadPeriod := KeyCode.(266) KeypadNumber0 := KeyCode.(38)
KeypadDivide := KeyCode.(267) KeypadNumber1 := KeyCode.(39)
KeypadMultiply := KeyCode.(268) KeypadNumber2 := KeyCode.(40)
KeypadMinus := KeyCode.(269) KeypadNumber3 := KeyCode.(41)
KeypadPlus := KeyCode.(270) KeypadNumber4 := KeyCode.(42)
KeypadEnter := KeyCode.(271) KeypadNumber5 := KeyCode.(43)
KeypadEquals := KeyCode.(272) KeypadNumber6 := KeyCode.(44)
KeypadNumber7 := KeyCode.(45)
KeypadNumber8 := KeyCode.(46)
KeypadNumber9 := KeyCode.(47)
NumLock := KeyCode.(300) KeypadPeriod := KeyCode.(48)
CapsLock := KeyCode.(301) KeypadDivide := KeyCode.(49)
ScrollLock := KeyCode.(302) KeypadMultiply := KeyCode.(50)
KeypadMinus := KeyCode.(51)
KeypadPlus := KeyCode.(52)
KeypadEnter := KeyCode.(53)
KeypadEquals := KeyCode.(54)
RightShift := KeyCode.(303) Delete := KeyCode.(55)
LeftShift := KeyCode.(304) /* Locking Keys */
NumLock := KeyCode.(56)
RightControl := KeyCode.(305) CapsLock := KeyCode.(57)
LeftControl := KeyCode.(306) ScrollLock := KeyCode.(58)
RightAlt := KeyCode.(307)
LeftAlt := KeyCode.(308)
RightMeta := KeyCode.(309)
LeftMeta := KeyCode.(310)
/* Left "Windows" key */
LeftSuper := KeyCode.(311)
/* Right "Windows" key */
RightSuper := KeyCode.(312)
/* "Alt Gr" key */ /* "Alt Gr" key */
Mode := KeyCode.(313) Mode := KeyCode.(59)
/* Multi-key compose key */ /* Multi-key compose key */
Compose := KeyCode.(314) 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)