Return true if any key is pressed.
true if any key is pressed.
Return true if any key is released.
true if any key is released.
Clears all stored pressed keys without making the keys go through the release state.
Update and return the array containing the identifiers of all touches.
Get the cursor X position. The cursor is moved by mouse and touch events.
the cursor X position, relative to the game view.
Get the cursor Y position. The cursor is moved by mouse and touch events.
the cursor Y position, relative to the game view.
Return the location-aware code of the last key that was pressed.
The location-aware code of the last key pressed.
Return the mouse wheel delta
Get the mouse X position.
the mouse X position, relative to the game view.
Get the mouse Y position.
the mouse Y position, relative to the game view.
Get a touch X position.
the touch X position, relative to the game view.
Get a touch Y position.
the touch Y position, relative to the game view.
the touch identifier
true if the touch has just ended.
Return true if the key corresponding to the location-aware keyCode is pressed.
The location-aware key code to be tested.
Return true if the mouse button corresponding to buttonCode is pressed.
The mouse button code (0: Left button, 1: Right button).
Return true if the mouse button corresponding to buttonCode was just released.
The mouse button code (0: Left button, 1: Right button).
true when the mouse is inside the canvas.
Return true if the mouse wheel scroll to down
Return true if the mouse wheel scroll to up
true if the touch events are used to simulate mouse events.
Notify the input manager that the frame ended, so anything that last only for one frame (started/ended touches) should be reset.
This method should be called in the game loop (see gdjs.RuntimeGame.startGameLoop
).
You don't need to call it otherwise.
Should be called whenever a key is pressed. The location corresponds to KeyboardEvent.location, which should be 0 for standard keys, 1 for left keys, 2 for right keys, and 3 for numpad keys.
The raw key code associated to the key press.
The location of the event.
Should be called whenever a key is released. The location corresponds to KeyboardEvent.location, which should be 0 for standard keys, 1 for left keys, 2 for right keys, and 3 for numpad keys.
The raw key code associated to the key release.
The location of the event.
Should be called whenever a mouse button is pressed.
The mouse button code associated to the event. See InputManager.MOUSE_LEFT_BUTTON, InputManager.MOUSE_RIGHT_BUTTON, InputManager.MOUSE_MIDDLE_BUTTON
Should be called whenever a mouse button is released.
The mouse button code associated to the event. (see onMouseButtonPressed)
Should be called when the mouse enter the canvas.
Should be called when the mouse leave the canvas.
Should be called when the mouse is moved.
Please note that the coordinates must be expressed relative to the view position.
The mouse new X position
The mouse new Y position
Should be called whenever the mouse wheel is used
The mouse wheel delta
Set if touch events should simulate mouse events.
If true, any touch will move the mouse position and set mouse buttons as pressed/released.
true to simulate mouse events, false to disable it.
Return true if the key corresponding to the location-aware keyCode was released during the last frame.
The location-aware key code to be tested.
Add 2 to the identifier to avoid identifiers taking the GDevelop default variable value which is 0 and reserve 1 for the mouse.
The identifier given by the browser.
The identifier used in events.
Generated using TypeDoc
Store input made on a canvas: mouse position, key pressed and touches states.