Tecla Tipeada?
[▼] key typed?
es un bloque de código parte de Teclado cajón.
[▼] key typed?
is a code block part of the keyboard drawer.
Uso
[▼] key typed?
is a type of logic block that returns a boolean. A true is returned if a specific key denoted in the drop down is typed in the current tick.
Sintaxis
[Dropdown: Key] key typed?
Entradas:
- Seleccione una tecla del teclado del menú desplegable.
Example
In this version of the snake game, the direction the snake moves is determined by which key is typed. Since the snake is always moving forward, the player only needs to type an arrow key to change the snake’s direction.
Matices
Una diferencia importante entre [▼] key typed?
y [▼] key typed?
es eso [▼] key typed?
devuelve verdadero solo en ticks cuando se mantiene presionada la tecla específica y cuando no se mantuvo en el tick anterior.
Básicamente, [▼] key typed?
devuelve verdadero solo en el tick cuando el botón se presiona por primera vez y no en ticks consecutivos. [▼] key typed?
devuelve verdadero para siempre mientras se mantenga presionada la tecla específica.
A menudo utilizamos [▼] key typed?
en un bloque "si" para establecer una condición para una acción única que se puede repetir escribiendo la tecla varias veces.