{{htmlmetatags>metatag-robots=()
metatag-title=(KEYGET | ugBASIC User Manual)
metatag-keywords=(ugBASIC,Commodore 64,Commodore PLUS/4,ZX Spectrum)
metatag-description=(Manual page for KEYGET)
metatag-media-og:image=(:ugbasic:logo-ugbasic-fb.png)
metatag-og:title=(KEYGET | ugBASIC User Manual)
metatag-og:description=(Manual page for KEYGET)
}}
====== 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 ====
[[INKEY]]
==== ANY PROBLEM? ====
If you have encountered a problem using this command, if you think there is a bug or the explanation is unclear, please [[https://github.com/spotlessmind1975/ugbasic/issues/new?title=ISSUE ON KEYGET|open an issue]] for this keyword on GitHub. Thank you!===== POWERED BY =====
[[:ugbasic:user:index|{{ :ugbasic:user:logo-ugbasic.png?nolink&600 |}}]]