getKeysPressed
.getKeysPressed()
Returns an Array containing each of the keys that were pressed, on this frame. Each of these keys are a String, naming the key that has been pressed.
It will not include any keys which were pressed on previous frames, even if they are still down.
// Vertically lists keys pressed,
// as they are hit.
y = 10
inc = 32
onEachFrame() do |delta|
// a low alpha, so values fade out from previous frames
fill( :black, delta/20.0 )
getControls().getKeysPressed().each() do |key|
fillText( key, 10, y, :left, :top )
y = (y + inc) % getScreenHeight()
end
endSee Also
A link which will reset your password has been sent to your email address.
This link will be active for up to 24 hours.