Skip to content
EspañolWorkspace →

PSeInt Esperar Tecla: wait for a key press

Stops the program until the person presses a key. Useful for moving between screens at their own pace.

Template
Esperar Tecla
Open it in Codoritmo

Opens the editor with this example loaded. Run it step by step and watch the flowchart.

Worked example

A complete algorithm, ready to copy and run.

esperar-tecla-wait-for-key.psc · 4 lines
Algoritmo Example    Escribir "Press a key to continue"    Esperar TeclaFinAlgoritmo

Output

The program waits until you press a key.

This is what the console shows when the example runs.

Press a key to continue

In a flowchart

This is how it appears in a flowchart, with the same shapes Codoritmo draws.

Esperar Tecla
In the flowchart. Flowchart: a process rectangle reading "Esperar Tecla", with one arrow in and one arrow out.
Draw the flowchart of your own algorithm →

Template

The general form. Replace what's inside < > with your own data.

Esperar Tecla · 1 line
Esperar Tecla

Examples that use it

Programs from the example library where it appears, from the simplest to the most complete.

  • Countdown

    A rocket launch countdown that ticks second by second.

    Beginner
See every Screen & waiting example →

More structures

Codoritmo is an independent, open-source project inspired by PSeInt and compatible with its syntax. It is not affiliated with the PSeInt project. Official PSeInt website.