(This is the legacy documentation for SDL2, the previous stable version; SDL3 is the current stable version.)
SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT
override the binding element for keyboard inputs for Emscripten builds
Defined in SDL_hints.h
Syntax
#define SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT "SDL_EMSCRIPTEN_KEYBOARD_ELEMENT"
This hint only applies to the emscripten platform.
The variable can be one of:
- "#window": the javascript window object (this is the default)
- "#document": the javascript document object
- "#screen": the javascript window.screen object
- "#canvas": the WebGL canvas element
Any other string without a leading # sign applies to the element on the page with that ID.
CategoryAPI, CategoryAPIMacro, CategoryHints