-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Emscripten input callbacks #10292
Comments
We can definitely add a hint for this. |
You should be able to use an existing hint. Just call... SDL_SetHint(SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT, "some-element-id-that-doesnt-exist-on-the-page"); ...any time before SDL_CreateWindow, and it won't register an input callback at all. |
Okay, I've updated it so setting SDL_HINT_EMSCRIPTEN_KEYBOARD_ELEMENT to "" will stop SDL from setting those input callbacks at all, so no weird hacks with bogus element names. |
This is used to say "don't even try to listen for keypresses," for apps that are managing this outside of SDL. Fixes #10292.
I switched it to "#none". We use "" everywhere else as synonymous with NULL. |
Could there be an option to disable these emscripten input callbacks from getting registered. They're causing a lot of issues when trying to mess with html elements.
emscripten_set_keydown_callback,
emscripten_set_keyup_callback,
emscripten_set_keypress_callback
These are the main part of my issue since they just make emscripten to call event.preventDefault() for every html element with input.
The text was updated successfully, but these errors were encountered: