kripken/emscripten — pull request #2310 by usagi (2014-04-24 06:36:18+00:00)
Title: Fix test related sdl get keyboard state fix

Related: #2297 Fix sdl get keyboard state not based on scan code bug

This is two fix up related #2297:

1. Fix test code `tests/sdl_pumpevents.c`. The test code was assumed buggy behavior as SDL_GetKeyboardState return SDL-KeyCode. It fix for currently no buggy behavior as it return SDL-ScanCode. Then, test `browser.test_sdl_pumpevents` is OK.

2. Fix library code `src/library_sdl.js`. I was fix SDL_GetKeyboardState behavior in #2297 but the fix is not follow SDL.modState as mod keys state. It fix SDL.modState correctly for after #2297 behavior, and add support L/R distinction and numlock, capslock, mode keys in passing. Then, test `browser.test_sdl_key_proxy` and `browser.test_sdl_key` is OK.