GetKey
Library: #include <keys.bas>
Wait for a key to be pressed (using INKEY$), and return its ASCII Code.
Syntax
GetKey()
Waits for a key pressed and returns its ASCII code. It cannot detect multiple keys pressed. This is useful, for example, to program options menus in games were only a single option can be selected.
Examples
Will print the key pressed. Unlike INKEY$ it returns an Ubyte (ASCII code) which is more efficient that working with strings.See also
Back to parent page: Keys library