Skip to content

Conversation

sbc100
Copy link
Collaborator

@sbc100 sbc100 commented Nov 13, 2024

Prior to this change any unrecognized DOM keyCode would be directly passed through with the DOM keyCode used as an SDL keycode.

This strange behavior is what allowed test_sdl_key_proxy to use SDL key codes when generating new KeyboardEvents. The number previously hardcoded in the test (1248, 1249, 1250) correspond to (SDLK_LCTRL, SDLK_LSHIFT, SDLK_LALT) but don't make any sense as DOM keyboard codes.

@sbc100 sbc100 requested a review from kripken November 13, 2024 21:31
@sbc100 sbc100 force-pushed the sdl_keycodes branch 3 times, most recently from 96f9ec6 to 17f7fb2 Compare November 13, 2024 22:46
@sbc100 sbc100 enabled auto-merge (squash) November 13, 2024 23:06
Prior to this change any unrecognized DOM keyCode would be directly
passed through with the DOM keyCode used as an SDL keycode.

This strange behavior is what allowed `test_sdl_key_proxy` to use
SDL key codes when generating new `KeyboardEvent`s.  The number
previously hardcoded in the test (1248, 1249, 1250) correspond to
(SDLK_LCTRL, SDLK_LSHIFT, SDLK_LALT) but don't make any sense as DOM
keyboard codes.
@sbc100 sbc100 merged commit 4a4e165 into emscripten-core:main Nov 15, 2024
28 checks passed
@sbc100 sbc100 deleted the sdl_keycodes branch November 15, 2024 02:18
uysalibov pushed a commit to uysalibov/emscripten that referenced this pull request Nov 15, 2024
Prior to this change any unrecognized DOM keyCode would be directly
passed through with the DOM keyCode used as an SDL keycode.

This strange behavior is what allowed `test_sdl_key_proxy` to use SDL
key codes when generating new `KeyboardEvent`s. The number previously
hardcoded in the test (1248, 1249, 1250) correspond to (SDLK_LCTRL,
SDLK_LSHIFT, SDLK_LALT) but don't make any sense as DOM keyboard codes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants