sdl3.c3l/sdl3_keycode.c3i

287 lines
16 KiB
Plaintext

module sdl3::sdl;
typedef Keycode = uint;
const Keycode K_EXTENDED_MASK @builtin = (1 << 29);
const Keycode K_SCANCODE_MASK @builtin = (1 << 30);
macro Keycode @scancode_to_keycode(Scancode $x) => ($x | K_SCANCODE_MASK);
const Keycode K_UNKNOWN @builtin = 0x00000000;
const Keycode K_RETURN @builtin = 0x0000000d;
const Keycode K_ESCAPE @builtin = 0x0000001b;
const Keycode K_BACKSPACE @builtin = 0x00000008;
const Keycode K_TAB @builtin = 0x00000009;
const Keycode K_SPACE @builtin = 0x00000020;
const Keycode K_EXCLAIM @builtin = 0x00000021;
const Keycode K_DBLAPOSTROPHE @builtin = 0x00000022;
const Keycode K_HASH @builtin = 0x00000023;
const Keycode K_DOLLAR @builtin = 0x00000024;
const Keycode K_PERCENT @builtin = 0x00000025;
const Keycode K_AMPERSAND @builtin = 0x00000026;
const Keycode K_APOSTROPHE @builtin = 0x00000027;
const Keycode K_LEFTPAREN @builtin = 0x00000028;
const Keycode K_RIGHTPAREN @builtin = 0x00000029;
const Keycode K_ASTERISK @builtin = 0x0000002a;
const Keycode K_PLUS @builtin = 0x0000002b;
const Keycode K_COMMA @builtin = 0x0000002c;
const Keycode K_MINUS @builtin = 0x0000002d;
const Keycode K_PERIOD @builtin = 0x0000002e;
const Keycode K_SLASH @builtin = 0x0000002f;
const Keycode K_0 @builtin = 0x00000030;
const Keycode K_1 @builtin = 0x00000031;
const Keycode K_2 @builtin = 0x00000032;
const Keycode K_3 @builtin = 0x00000033;
const Keycode K_4 @builtin = 0x00000034;
const Keycode K_5 @builtin = 0x00000035;
const Keycode K_6 @builtin = 0x00000036;
const Keycode K_7 @builtin = 0x00000037;
const Keycode K_8 @builtin = 0x00000038;
const Keycode K_9 @builtin = 0x00000039;
const Keycode K_COLON @builtin = 0x0000003a;
const Keycode K_SEMICOLON @builtin = 0x0000003b;
const Keycode K_LESS @builtin = 0x0000003c;
const Keycode K_EQUALS @builtin = 0x0000003d;
const Keycode K_GREATER @builtin = 0x0000003e;
const Keycode K_QUESTION @builtin = 0x0000003f;
const Keycode K_AT @builtin = 0x00000040;
const Keycode K_LEFTBRACKET @builtin = 0x0000005b;
const Keycode K_BACKSLASH @builtin = 0x0000005c;
const Keycode K_RIGHTBRACKET @builtin = 0x0000005d;
const Keycode K_CARET @builtin = 0x0000005e;
const Keycode K_UNDERSCORE @builtin = 0x0000005f;
const Keycode K_GRAVE @builtin = 0x00000060;
const Keycode K_A @builtin = 0x00000061;
const Keycode K_B @builtin = 0x00000062;
const Keycode K_C @builtin = 0x00000063;
const Keycode K_D @builtin = 0x00000064;
const Keycode K_E @builtin = 0x00000065;
const Keycode K_F @builtin = 0x00000066;
const Keycode K_G @builtin = 0x00000067;
const Keycode K_H @builtin = 0x00000068;
const Keycode K_I @builtin = 0x00000069;
const Keycode K_J @builtin = 0x0000006a;
const Keycode K_K @builtin = 0x0000006b;
const Keycode K_L @builtin = 0x0000006c;
const Keycode K_M @builtin = 0x0000006d;
const Keycode K_N @builtin = 0x0000006e;
const Keycode K_O @builtin = 0x0000006f;
const Keycode K_P @builtin = 0x00000070;
const Keycode K_Q @builtin = 0x00000071;
const Keycode K_R @builtin = 0x00000072;
const Keycode K_S @builtin = 0x00000073;
const Keycode K_T @builtin = 0x00000074;
const Keycode K_U @builtin = 0x00000075;
const Keycode K_V @builtin = 0x00000076;
const Keycode K_W @builtin = 0x00000077;
const Keycode K_X @builtin = 0x00000078;
const Keycode K_Y @builtin = 0x00000079;
const Keycode K_Z @builtin = 0x0000007a;
const Keycode K_LEFTBRACE @builtin = 0x0000007b;
const Keycode K_PIPE @builtin = 0x0000007c;
const Keycode K_RIGHTBRACE @builtin = 0x0000007d;
const Keycode K_TILDE @builtin = 0x0000007e;
const Keycode K_DELETE @builtin = 0x0000007f;
const Keycode K_PLUSMINUS @builtin = 0x000000b1;
const Keycode K_CAPSLOCK @builtin = 0x40000039;
const Keycode K_F1 @builtin = 0x4000003a;
const Keycode K_F2 @builtin = 0x4000003b;
const Keycode K_F3 @builtin = 0x4000003c;
const Keycode K_F4 @builtin = 0x4000003d;
const Keycode K_F5 @builtin = 0x4000003e;
const Keycode K_F6 @builtin = 0x4000003f;
const Keycode K_F7 @builtin = 0x40000040;
const Keycode K_F8 @builtin = 0x40000041;
const Keycode K_F9 @builtin = 0x40000042;
const Keycode K_F10 @builtin = 0x40000043;
const Keycode K_F11 @builtin = 0x40000044;
const Keycode K_F12 @builtin = 0x40000045;
const Keycode K_PRINTSCREEN @builtin = 0x40000046;
const Keycode K_SCROLLLOCK @builtin = 0x40000047;
const Keycode K_PAUSE @builtin = 0x40000048;
const Keycode K_INSERT @builtin = 0x40000049;
const Keycode K_HOME @builtin = 0x4000004a;
const Keycode K_PAGEUP @builtin = 0x4000004b;
const Keycode K_END @builtin = 0x4000004d;
const Keycode K_PAGEDOWN @builtin = 0x4000004e;
const Keycode K_RIGHT @builtin = 0x4000004f;
const Keycode K_LEFT @builtin = 0x40000050;
const Keycode K_DOWN @builtin = 0x40000051;
const Keycode K_UP @builtin = 0x40000052;
const Keycode K_NUMLOCKCLEAR @builtin = 0x40000053;
const Keycode K_KP_DIVIDE @builtin = 0x40000054;
const Keycode K_KP_MULTIPLY @builtin = 0x40000055;
const Keycode K_KP_MINUS @builtin = 0x40000056;
const Keycode K_KP_PLUS @builtin = 0x40000057;
const Keycode K_KP_ENTER @builtin = 0x40000058;
const Keycode K_KP_1 @builtin = 0x40000059;
const Keycode K_KP_2 @builtin = 0x4000005a;
const Keycode K_KP_3 @builtin = 0x4000005b;
const Keycode K_KP_4 @builtin = 0x4000005c;
const Keycode K_KP_5 @builtin = 0x4000005d;
const Keycode K_KP_6 @builtin = 0x4000005e;
const Keycode K_KP_7 @builtin = 0x4000005f;
const Keycode K_KP_8 @builtin = 0x40000060;
const Keycode K_KP_9 @builtin = 0x40000061;
const Keycode K_KP_0 @builtin = 0x40000062;
const Keycode K_KP_PERIOD @builtin = 0x40000063;
const Keycode K_APPLICATION @builtin = 0x40000065;
const Keycode K_POWER @builtin = 0x40000066;
const Keycode K_KP_EQUALS @builtin = 0x40000067;
const Keycode K_F13 @builtin = 0x40000068;
const Keycode K_F14 @builtin = 0x40000069;
const Keycode K_F15 @builtin = 0x4000006a;
const Keycode K_F16 @builtin = 0x4000006b;
const Keycode K_F17 @builtin = 0x4000006c;
const Keycode K_F18 @builtin = 0x4000006d;
const Keycode K_F19 @builtin = 0x4000006e;
const Keycode K_F20 @builtin = 0x4000006f;
const Keycode K_F21 @builtin = 0x40000070;
const Keycode K_F22 @builtin = 0x40000071;
const Keycode K_F23 @builtin = 0x40000072;
const Keycode K_F24 @builtin = 0x40000073;
const Keycode K_EXECUTE @builtin = 0x40000074;
const Keycode K_HELP @builtin = 0x40000075;
const Keycode K_MENU @builtin = 0x40000076;
const Keycode K_SELECT @builtin = 0x40000077;
const Keycode K_STOP @builtin = 0x40000078;
const Keycode K_AGAIN @builtin = 0x40000079;
const Keycode K_UNDO @builtin = 0x4000007a;
const Keycode K_CUT @builtin = 0x4000007b;
const Keycode K_COPY @builtin = 0x4000007c;
const Keycode K_PASTE @builtin = 0x4000007d;
const Keycode K_FIND @builtin = 0x4000007e;
const Keycode K_MUTE @builtin = 0x4000007f;
const Keycode K_VOLUMEUP @builtin = 0x40000080;
const Keycode K_VOLUMEDOWN @builtin = 0x40000081;
const Keycode K_KP_COMMA @builtin = 0x40000085;
const Keycode K_KP_EQUALSAS400 @builtin = 0x40000086;
const Keycode K_ALTERASE @builtin = 0x40000099;
const Keycode K_SYSREQ @builtin = 0x4000009a;
const Keycode K_CANCEL @builtin = 0x4000009b;
const Keycode K_CLEAR @builtin = 0x4000009c;
const Keycode K_PRIOR @builtin = 0x4000009d;
const Keycode K_RETURN2 @builtin = 0x4000009e;
const Keycode K_SEPARATOR @builtin = 0x4000009f;
const Keycode K_OUT @builtin = 0x400000a0;
const Keycode K_OPER @builtin = 0x400000a1;
const Keycode K_CLEARAGAIN @builtin = 0x400000a2;
const Keycode K_CRSEL @builtin = 0x400000a3;
const Keycode K_EXSEL @builtin = 0x400000a4;
const Keycode K_KP_00 @builtin = 0x400000b0;
const Keycode K_KP_000 @builtin = 0x400000b1;
const Keycode K_THOUSANDSSEPARATOR @builtin = 0x400000b2;
const Keycode K_DECIMALSEPARATOR @builtin = 0x400000b3;
const Keycode K_CURRENCYUNIT @builtin = 0x400000b4;
const Keycode K_CURRENCYSUBUNIT @builtin = 0x400000b5;
const Keycode K_KP_LEFTPAREN @builtin = 0x400000b6;
const Keycode K_KP_RIGHTPAREN @builtin = 0x400000b7;
const Keycode K_KP_LEFTBRACE @builtin = 0x400000b8;
const Keycode K_KP_RIGHTBRACE @builtin = 0x400000b9;
const Keycode K_KP_TAB @builtin = 0x400000ba;
const Keycode K_KP_BACKSPACE @builtin = 0x400000bb;
const Keycode K_KP_A @builtin = 0x400000bc;
const Keycode K_KP_B @builtin = 0x400000bd;
const Keycode K_KP_C @builtin = 0x400000be;
const Keycode K_KP_D @builtin = 0x400000bf;
const Keycode K_KP_E @builtin = 0x400000c0;
const Keycode K_KP_F @builtin = 0x400000c1;
const Keycode K_KP_XOR @builtin = 0x400000c2;
const Keycode K_KP_POWER @builtin = 0x400000c3;
const Keycode K_KP_PERCENT @builtin = 0x400000c4;
const Keycode K_KP_LESS @builtin = 0x400000c5;
const Keycode K_KP_GREATER @builtin = 0x400000c6;
const Keycode K_KP_AMPERSAND @builtin = 0x400000c7;
const Keycode K_KP_DBLAMPERSAND @builtin = 0x400000c8;
const Keycode K_KP_VERTICALBAR @builtin = 0x400000c9;
const Keycode K_KP_DBLVERTICALBAR @builtin = 0x400000ca;
const Keycode K_KP_COLON @builtin = 0x400000cb;
const Keycode K_KP_HASH @builtin = 0x400000cc;
const Keycode K_KP_SPACE @builtin = 0x400000cd;
const Keycode K_KP_AT @builtin = 0x400000ce;
const Keycode K_KP_EXCLAM @builtin = 0x400000cf;
const Keycode K_KP_MEMSTORE @builtin = 0x400000d0;
const Keycode K_KP_MEMRECALL @builtin = 0x400000d1;
const Keycode K_KP_MEMCLEAR @builtin = 0x400000d2;
const Keycode K_KP_MEMADD @builtin = 0x400000d3;
const Keycode K_KP_MEMSUBTRACT @builtin = 0x400000d4;
const Keycode K_KP_MEMMULTIPLY @builtin = 0x400000d5;
const Keycode K_KP_MEMDIVIDE @builtin = 0x400000d6;
const Keycode K_KP_PLUSMINUS @builtin = 0x400000d7;
const Keycode K_KP_CLEAR @builtin = 0x400000d8;
const Keycode K_KP_CLEARENTRY @builtin = 0x400000d9;
const Keycode K_KP_BINARY @builtin = 0x400000da;
const Keycode K_KP_OCTAL @builtin = 0x400000db;
const Keycode K_KP_DECIMAL @builtin = 0x400000dc;
const Keycode K_KP_HEXADECIMAL @builtin = 0x400000dd;
const Keycode K_LCTRL @builtin = 0x400000e0;
const Keycode K_LSHIFT @builtin = 0x400000e1;
const Keycode K_LALT @builtin = 0x400000e2;
const Keycode K_LGUI @builtin = 0x400000e3;
const Keycode K_RCTRL @builtin = 0x400000e4;
const Keycode K_RSHIFT @builtin = 0x400000e5;
const Keycode K_RALT @builtin = 0x400000e6;
const Keycode K_RGUI @builtin = 0x400000e7;
const Keycode K_MODE @builtin = 0x40000101;
const Keycode K_SLEEP @builtin = 0x40000102;
const Keycode K_WAKE @builtin = 0x40000103;
const Keycode K_CHANNEL_INCREMENT @builtin = 0x40000104;
const Keycode K_CHANNEL_DECREMENT @builtin = 0x40000105;
const Keycode K_MEDIA_PLAY @builtin = 0x40000106;
const Keycode K_MEDIA_PAUSE @builtin = 0x40000107;
const Keycode K_MEDIA_RECORD @builtin = 0x40000108;
const Keycode K_MEDIA_FAST_FORWARD @builtin = 0x40000109;
const Keycode K_MEDIA_REWIND @builtin = 0x4000010a;
const Keycode K_MEDIA_NEXT_TRACK @builtin = 0x4000010b;
const Keycode K_MEDIA_PREVIOUS_TRACK @builtin = 0x4000010c;
const Keycode K_MEDIA_STOP @builtin = 0x4000010d;
const Keycode K_MEDIA_EJECT @builtin = 0x4000010e;
const Keycode K_MEDIA_PLAY_PAUSE @builtin = 0x4000010f;
const Keycode K_MEDIA_SELECT @builtin = 0x40000110;
const Keycode K_AC_NEW @builtin = 0x40000111;
const Keycode K_AC_OPEN @builtin = 0x40000112;
const Keycode K_AC_CLOSE @builtin = 0x40000113;
const Keycode K_AC_EXIT @builtin = 0x40000114;
const Keycode K_AC_SAVE @builtin = 0x40000115;
const Keycode K_AC_PRINT @builtin = 0x40000116;
const Keycode K_AC_PROPERTIES @builtin = 0x40000117;
const Keycode K_AC_SEARCH @builtin = 0x40000118;
const Keycode K_AC_HOME @builtin = 0x40000119;
const Keycode K_AC_BACK @builtin = 0x4000011a;
const Keycode K_AC_FORWARD @builtin = 0x4000011b;
const Keycode K_AC_STOP @builtin = 0x4000011c;
const Keycode K_AC_REFRESH @builtin = 0x4000011d;
const Keycode K_AC_BOOKMARKS @builtin = 0x4000011e;
const Keycode K_SOFTLEFT @builtin = 0x4000011f;
const Keycode K_SOFTRIGHT @builtin = 0x40000120;
const Keycode K_CALL @builtin = 0x40000121;
const Keycode K_ENDCALL @builtin = 0x40000122;
const Keycode K_LEFT_TAB @builtin = 0x20000001;
const Keycode K_LEVEL5_SHIFT @builtin = 0x20000002;
const Keycode K_MULTI_KEY_COMPOSE @builtin = 0x20000003;
const Keycode K_LMETA @builtin = 0x20000004;
const Keycode K_RMETA @builtin = 0x20000005;
const Keycode K_LHYPER @builtin = 0x20000006;
const Keycode K_RHYPER @builtin = 0x20000007;
typedef Keymod = ushort;
const Keymod KMOD_NONE @builtin = 0x0000;
const Keymod KMOD_LSHIFT @builtin = 0x0001;
const Keymod KMOD_RSHIFT @builtin = 0x0002;
const Keymod KMOD_LEVEL5 @builtin = 0x0004;
const Keymod KMOD_LCTRL @builtin = 0x0040;
const Keymod KMOD_RCTRL @builtin = 0x0080;
const Keymod KMOD_LALT @builtin = 0x0100;
const Keymod KMOD_RALT @builtin = 0x0200;
const Keymod KMOD_LGUI @builtin = 0x0400;
const Keymod KMOD_RGUI @builtin = 0x0800;
const Keymod KMOD_NUM @builtin = 0x1000;
const Keymod KMOD_CAPS @builtin = 0x2000;
const Keymod KMOD_MODE @builtin = 0x4000;
const Keymod KMOD_SCROLL @builtin = 0x8000;
const Keymod KMOD_CTRL @builtin = (KMOD_LCTRL | KMOD_RCTRL);
const Keymod KMOD_SHIFT @builtin = (KMOD_LSHIFT | KMOD_RSHIFT);
const Keymod KMOD_ALT @builtin = (KMOD_LALT | KMOD_RALT);
const Keymod KMOD_GUI @builtin = (KMOD_LGUI | KMOD_RGUI);