User Tools

Site Tools


ugbasic:user:kw:keyget
Translations of this page:


ugBASIC User Manual

KEYGET

SYNTAX

   KEYGET variable

PURPOSE

The KEYGET' capture a single character typed by the user without having to press enter. In other words, the program is “listening” to the keyboard and, as soon as a key is pressed, “captures” it and stores it in a variable given as parameter. Unlike the INPUT command, which requires the user to press enter after typing, KEYGET reads the character as soon as it is pressed. If no key has been pressed, KEYGET'' will wait. Finally, the captured character is stored in a string variable.

EXAMPLE

  KEYGET var$
  PRINT var$;" pressed"

ABBREVIATION

 Kyg

AVAILABLE ON

SEE ALSO

ANY PROBLEM?

If you have encountered a problem using this command, if you think there is a bug or the explanation is unclear, please open an issue for this keyword on GitHub. Thank you!

POWERED BY