Module keyboard
Available on crate feature
dep_sdl3
only.Expand description
SDL keyboard management.
Please refer to the Best Keyboard Practices document for details on how best to accept keyboard input in various types of programs:
Structs§
- SDL_
Capitalization - Auto capitalization type.
- SDL_
Text Input Type - Text input type.
Constants§
- SDL_
CAPITALIZE_ LETTERS - All letters will be capitalized
- SDL_
CAPITALIZE_ NONE - No auto-capitalization will be done
- SDL_
CAPITALIZE_ SENTENCES - The first letter of sentences will be capitalized
- SDL_
CAPITALIZE_ WORDS - The first letter of words will be capitalized
- SDL_
PROP_ TEXTINPUT_ ANDROID_ INPUTTYPE_ NUMBER - SDL_
PROP_ TEXTINPUT_ AUTOCORRECT_ BOOLEAN - SDL_
PROP_ TEXTINPUT_ CAPITALIZATION_ NUMBER - SDL_
PROP_ TEXTINPUT_ MULTILINE_ BOOLEAN - SDL_
PROP_ TEXTINPUT_ TYPE_ NUMBER - SDL_
TEXTINPUT_ TYPE_ NUMBER - The input is a number
- SDL_
TEXTINPUT_ TYPE_ NUMBER_ PASSWORD_ HIDDEN - The input is a secure PIN that is hidden
- SDL_
TEXTINPUT_ TYPE_ NUMBER_ PASSWORD_ VISIBLE - The input is a secure PIN that is visible
- SDL_
TEXTINPUT_ TYPE_ TEXT - The input is text
- SDL_
TEXTINPUT_ TYPE_ TEXT_ EMAIL - The input is an e-mail address
- SDL_
TEXTINPUT_ TYPE_ TEXT_ NAME - The input is a person’s name
- SDL_
TEXTINPUT_ TYPE_ TEXT_ PASSWORD_ HIDDEN - The input is a secure password that is hidden
- SDL_
TEXTINPUT_ TYPE_ TEXT_ PASSWORD_ VISIBLE - The input is a secure password that is visible
- SDL_
TEXTINPUT_ TYPE_ TEXT_ USERNAME - The input is a username
Functions§
- SDL_
Clear ⚠Composition - Dismiss the composition window/IME without disabling the subsystem.
- SDL_
GetKey ⚠From Name - Get a key code from a human-readable name.
- SDL_
GetKey ⚠From Scancode - Get the key code corresponding to the given scancode according to the current keyboard layout.
- SDL_
GetKey ⚠Name - Get a human-readable name for a key.
- SDL_
GetKeyboard ⚠Focus - Query the window which currently has keyboard focus.
- SDL_
GetKeyboard ⚠Name ForID - Get the name of a keyboard.
- SDL_
GetKeyboard ⚠State - Get a snapshot of the current state of the keyboard.
- SDL_
GetKeyboards ⚠ - Get a list of currently connected keyboards.
- SDL_
GetMod ⚠State - Get the current key modifier state for the keyboard.
- SDL_
GetScancode ⚠From Key - Get the scancode corresponding to the given key code according to the current keyboard layout.
- SDL_
GetScancode ⚠From Name - Get a scancode from a human-readable name.
- SDL_
GetScancode ⚠Name - Get a human-readable name for a scancode.
- SDL_
GetText ⚠Input Area - Get the area used to type Unicode text input.
- SDL_
HasKeyboard ⚠ - Return whether a keyboard is currently connected.
- SDL_
HasScreen ⚠Keyboard Support - Check whether the platform has screen keyboard support.
- SDL_
Reset ⚠Keyboard - Clear the state of the keyboard.
- SDL_
Screen ⚠Keyboard Shown - Check whether the screen keyboard is shown for given window.
- SDL_
SetMod ⚠State - Set the current key modifier state for the keyboard.
- SDL_
SetScancode ⚠Name - Set a human-readable name for a scancode.
- SDL_
SetText ⚠Input Area - Set the area used to type Unicode text input.
- SDL_
Start ⚠Text Input - Start accepting Unicode text input events in a window.
- SDL_
Start ⚠Text Input With Properties - Start accepting Unicode text input events in a window, with properties describing the input.
- SDL_
Stop ⚠Text Input - Stop receiving any text input events in a window.
- SDL_
Text ⚠Input Active - Check whether or not Unicode text input events are enabled for a window.
Type Aliases§
- SDL_
KeyboardID - This is a unique ID for a keyboard for the time it is connected to the system, and is never reused for the lifetime of the application.