Touch Develop retirement postponed until June 22, 2019. Sign-in and access to cloud assets to be removed on May 23, 2018.Learn More..


The senses→is key pressed and senses→on key pressed actions allow you to handle the keyboard in your games and apps.

key pressed state

In game, you may want to read the state of the keyboard in your game loop. You can do this using senses→is key pressed to test if a key is pressed.
if senses → is key pressed("space") then
Turbo boost!
else ... end if


You can also react to key strokes by using senses→on key pressed. In which case, your code will run when the specified key is pressed.
senses → on key pressed("space", handler)
where handler() is


When the user keeps the key down, the senses→on key pressed event will automatically be called repeatedly.