Next: Window Manipulation, Previous: The Game Loop, Up: Kernel [Contents][Index]
While run-game
provides hooks for mouse/keyboard/controller
input events, it is often necessary to query input devices for their
current state. For example, it could be desirable to query the state
of the arrow keys every time the update hook is called to determine
which direction the player should move that frame.
Return #t
if key is currently being pressed.
Return #t
if key is not currently being pressed.
Return the current X coordinate of the mouse cursor.
Return the current Y coordinate of the mouse cursor.
Return #t
if button is currently being pressed.
Return #t
if button is not currently being
pressed.
Return a floating point value in the range [-1, 1] corresponding to how much axis (an analog stick or trigger) is being pushed on controller. 0 is returned if axis is not being pushed at all.
Return the name of controller.
Return #t
if button on controller is currently
being pressed.
Return #t
if button on controller is not
currently being pressed.