Refactored code to send scancodes for an ASCII on-screen keyboard key

This commit is contained in:
Sam Lantinga 2022-06-29 17:26:09 -07:00
parent a054a5f7f2
commit 0ad65277ce
7 changed files with 205 additions and 405 deletions

View file

@ -47,6 +47,11 @@ extern void SDL_SetScancodeName(SDL_Scancode scancode, const char *name);
/* Set the keyboard focus window */
extern void SDL_SetKeyboardFocus(SDL_Window * window);
/* Send a character from an on-screen keyboard as scancode and modifier key events,
currently assuming ASCII characters on a US keyboard layout
*/
extern int SDL_SendKeyboardUnicodeKey(Uint32 ch);
/* Send a keyboard key event */
extern int SDL_SendKeyboardKey(Uint8 state, SDL_Scancode scancode);
extern int SDL_SendKeyboardKeyAutoRelease(SDL_Scancode scancode);