Input
Input helpers expose keyboard, mouse, and touch state for the current frame. Pressed and released helpers return true for one frame; down and up helpers describe continuous state.
Keyboard
is_key_pressed(key: int) -> boolis_key_down(key: int) -> boolis_key_released(key: int) -> boolis_key_up(key: int) -> boolget_key_pressed() -> intKEY_AthroughKEY_Z,KEY_SPACE, arrows, numbers, and Raylib-compatible control keys.
Mouse And Touch
get_mouse_x() -> intget_mouse_y() -> intget_mouse_position() -> tuple[int, int]is_mouse_button_pressed(button: int) -> boolis_mouse_button_down(button: int) -> boolis_mouse_button_released(button: int) -> boolis_mouse_button_up(button: int) -> boolMOUSE_BUTTON_LEFT,MOUSE_BUTTON_RIGHT,MOUSE_BUTTON_MIDDLEget_touch_x() -> intget_touch_y() -> intget_touch_position() -> tuple[int, int]
from conjure import *
init_window(360, 640, "Input")
x = 180
while not window_should_close():
if is_key_down(KEY_LEFT):
x -= 4
if is_key_down(KEY_RIGHT):
x += 4
begin_drawing()
clear_background(WHITE)
draw_circle(x, 320, 30, BLUE)
end_drawing()For score-driven games, combine input with leaderboards.