1010 * # CategoryKeycode
1111 *
1212 * Defines constants which identify keyboard keys and modifiers.
13+ *
14+ * Please refer to the Best Keyboard Practices document for details on what
15+ * this information means and how best to use it.
16+ *
17+ * https:// wiki.libsdl.org/SDL3/BestKeyboardPractices
1318 }
1419
1520{*
2328 * A special exception is the number keys at the top of the keyboard which map
2429 * to SDLK_0...SDLK_9 on AZERTY layouts.
2530 *
26- * \since This datatype is available since SDL 3.1.3 .
31+ * Keys with the `SDLK_EXTENDED_MASK` bit set do not map to a scancode or
32+ * unicode code point.
33+ *
34+ * \since This datatype is available since SDL 3.2.0 .
2735 }
2836type
2937 PPSDL_Keycode = ^PSDL_Keycode;
3038 PSDL_Keycode = ^TSDL_Keycode;
3139 TSDL_Keycode = type cuint32;
3240
3341const
42+ SDLK_EXTENDED_MASK = 1 shl 29 ;
3443 SDLK_SCANCODE_MASK = 1 shl 30 ;
3544function SDL_SCANCODE_TO_KEYCODE (X: TSDL_Scancode): TSDL_Keycode; {SDL3-for -Pascal: C Macro}
3645const
@@ -283,11 +292,18 @@ const
283292 SDLK_SOFTRIGHT = TSDL_Keycode($40000120 ); {*< SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_SOFTRIGHT) }
284293 SDLK_CALL = TSDL_Keycode($40000121 ); {*< SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_CALL) }
285294 SDLK_ENDCALL = TSDL_Keycode($40000122 ); {*< SDL_SCANCODE_TO_KEYCODE (SDL_SCANCODE_ENDCALL) }
295+ SDLK_LEFT_TAB = TSDL_Keycode($20000001 ); {*< Extended key Left Tab }
296+ SDLK_LEVEL5_SHIFT = TSDL_Keycode($20000002 ); {*< Extended key Level 5 Shift }
297+ SDLK_MULTI_KEY_COMPOSE = TSDL_Keycode($20000003 ); {*< Extended key Multi-key Compose }
298+ SDLK_LMETA = TSDL_Keycode($20000004 ); {*< Extended key Left Meta }
299+ SDLK_RMETA = TSDL_Keycode($20000005 ); {*< Extended key Right Meta }
300+ SDLK_LHYPER = TSDL_Keycode($20000006 ); {*< Extended key Left Hyper }
301+ SDLK_RHYPER = TSDL_Keycode($20000007 ); {*< Extended key Right Hyper }
286302
287303{*
288304 * Valid key modifiers (possibly OR' d together).
289305 *
290- * \s ince This datatype is available since SDL 3.1.3 .
306+ * \s ince This datatype is available since SDL 3.2.0 .
291307 }
292308type
293309 PPSDL_Keymod = ^PSDL_Keymod;
@@ -298,6 +314,7 @@ const
298314 SDL_KMOD_NONE = TSDL_Keymod($0000); {*< no modifier is applicable. }
299315 SDL_KMOD_LSHIFT = TSDL_Keymod($0001); {*< the left Shift key is down. }
300316 SDL_KMOD_RSHIFT = TSDL_Keymod($0002); {*< the right Shift key is down. }
317+ SDL_KMOD_LEVEL5 = TSDL_Keymod($0004); {*< the Level 5 Shift key is down. }
301318 SDL_KMOD_LCTRL = TSDL_Keymod($0040); {*< the left Ctrl (Control) key is down. }
302319 SDL_KMOD_RCTRL = TSDL_Keymod($0080); {*< the right Ctrl (Control) key is down. }
303320 SDL_KMOD_LALT = TSDL_Keymod($0100); {*< the left Alt key is down. }
0 commit comments