Module dsdl2.keyboard

Functions

NameDescription
clearComposition() Wraps SDL_ClearComposition (from SDL 2.0.22) which clears any composition in the text input
getKeyboardFocusedWindow() Wraps SDL_GetKeyboardFocus which gets the keyboard-focused window
getKeyboardState() Wraps SDL_GetKeyboardState which gets the current key states of the keyboard
getModState() Wraps SDL_GetModState which gets the current modifier key states
hasScreenKeyboardSupport() Wraps SDL_HasScreenKeyboardSupport which checks whether screen keyboard is supported
isTextInputActive() Wraps SDL_IsTextInputActive which checks whether text input is active
isTextInputShown() Wraps SDL_IsTextInputShown (from SDL 2.0.22) which checks whether the text input IME is shown
keycodeToScancode(keycode) Wraps SDL_GetScancodeFromKey which gets the dsdl2.Scancode from a dsdl2.Keycode
resetKeyboard() Wraps SDL_ResetKeyboard (from SDL 2.24) which resets the entire keyboard state
scancodeToKeycode(scancode) Wraps SDL_GetKeyFromScancode which gets the dsdl2.Keycode from a dsdl2.Scancode
setTextInputRect(rect) Wraps SDL_SetTextInputRect which sets the text input rectangle
startTextInput() Wraps SDL_StartTextInput which starts text input, invoking the IME if available
stopTextInput() Wraps SDL_StopTextInput which stops text input, closing the IME if invoked prior

Structs

NameDescription
Keymod D struct that wraps SDL_Keymod containing modifier key states

Enums

NameDescription
Keycode D enum that wraps SDL_Keycode defining virtual keys
Scancode D enum that wraps SDL_Scancode defining keyboard scancodes