diff --git a/raylib-input-system.md b/raylib-input-system.md index e749c7f..1fa3598 100644 --- a/raylib-input-system.md +++ b/raylib-input-system.md @@ -20,6 +20,7 @@ TOUCH | - | Not available by default. Mouse clicks are mapped to touch events us PLATFORM_WEB -------------- Some inputs in this platform are directly using GLFW3 because the library has been partially [ported to emscripten](https://github.com/emscripten-core/emscripten/blob/incoming/src/library_glfw.js). Despite that, gamepad and touch inputs are directly managed using emscripten API. + WARNING: In the current implementation of GLFW in javascript, events are not handled at `glfwPollEvents()`. Instead, keys down and the like are set directly when a key is pressed (which ordinarily will happen outside your game loop). This means that functions such as `GetKeyPressed()` will have somewhat different behaviour. Specifically, in your game loop, try not to read any events *after* EndDrawing(). This could have different behaviour on PLATFORM_WEB. Reading events *before* EndDrawing() should be fine though. Input | Library | Details