Inputs

To check whether a key or a button is pressed you can use the pressed / typed methods of Game.

The mouse is tested with the mouse_pressed and mouse_typed methods.

To retrieve or set the mouse position, use the Mouse.pos static property.

The name of the input can be in upper or lower case, here is a list of all inputs :

Keys

Used for the keyboard.

Letters :

  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z

Digits :

  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9

Arrows :

  • left
  • up
  • right
  • down

Functions :

  • f1
  • f2
  • f3
  • f4
  • f5
  • f6
  • f7
  • f8
  • f9
  • f10
  • f11
  • f12
  • f13
  • f14
  • f15

Specials :

  • space
  • escape
  • enter
  • delete
  • shift
  • alt
  • control
  • tab

Buttons

Used for the mouse.

  • left
  • right
  • middle