PUT KEY string
The PUT KEY
command allows you to simulate pressing a key on your computer
keyboard. Basically, you enter a string of characters and ugBASIC will use
it as if they were typed one after the other. This can be very useful for
automating certain actions, such as automatically entering your password
or emulating keystrokes.
This can be used to automatically enters a password into a game or application, or to simulate an user interaction with the program itself, such as pressing a button or selecting a menu. It can help to create sequences of commands that are executed automatically, such as a macro.
The maximum length of the string you can enter depends on the keyboard buffer, but normally is up to 10 characters.
Please note that this feature is available with the “asynchronous” keyboard
reading mechanism or in some specific, selected targets. To enable this
keyboard reading mode you must use the DEFINE KEYBOARD ASYNC
.
PUT KEY "yes"
PuKy
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!