Pardon the mess, Play My Code is in beta!

READY TO PLAY?
CLICK TO LOG IN!

sign up - lost password

getKeysDown

.getKeysDown()

Returns an array listing of all of the keys currently pressed down. Each item in the list is a String, describing the key pressed.

// displays all keys current down, vertically
onEachFrame() do
    fill( :black )
    
    down = getControls().getKeysDown().join('\n')
    
    fillText( down, 10, 10, :left, :top )
end

See Also