key  ( -- c )

published: 29 January 2023 / updated 30 January 2023

Lire cette page en français

 

vocabulary: forth

Waits for a key to be pressed. Pressing a key returns its ASCII code.

Example:

key .    \ display 97 if key "a" is active 
key .    \ affiche 65 if key "A" is active