Commit badbc03
committed
Ignore unknown keyCodes in library_sdl.js
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.1 parent 82a8f2d commit badbc03
2 files changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
823 | 823 | | |
824 | 824 | | |
825 | 825 | | |
826 | | - | |
| 826 | + | |
827 | 827 | | |
828 | 828 | | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
| 832 | + | |
829 | 833 | | |
830 | | - | |
| 834 | + | |
831 | 835 | | |
832 | | - | |
833 | 836 | | |
834 | 837 | | |
835 | 838 | | |
| |||
854 | 857 | | |
855 | 858 | | |
856 | 859 | | |
| 860 | + | |
| 861 | + | |
857 | 862 | | |
858 | 863 | | |
859 | 864 | | |
| |||
938 | 943 | | |
939 | 944 | | |
940 | 945 | | |
| 946 | + | |
| 947 | + | |
941 | 948 | | |
942 | 949 | | |
943 | 950 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
990 | 990 | | |
991 | 991 | | |
992 | 992 | | |
993 | | - | |
994 | | - | |
| 993 | + | |
| 994 | + | |
995 | 995 | | |
996 | 996 | | |
997 | 997 | | |
| |||
0 commit comments