Topic : The GFA-Basic Compendium Author : GFA Systemtechnik GmbH Version : GFABasic.HYP v2.98 (12/31/2023) Subject : Documentation/Programming Nodes : 899 Index Size : 28056 HCP-Version : 3 Compiled on : Atari @charset : atarist @lang : @default : Document not found @help : Help @options : +g -i -s +z @width : 75 @hostname : STRNGSRV @hostname : CAB @hostname : HIGHWIRE @hostname : THING View Ref-FileKEYPRESS n n: iexp The command KEYPRESS simulates the pressing of a key. That is, the character with the ASCII code contained in the lowest-order 8 bits of n is added to the keyboard buffer. Additionally, the state of the Control, Shift, and Alternate keys may be passed in the highest-order byte, as defined by KEYGET. If the ASCII code given is zero, a scan code may be passed in bits 16 to 23, e.g. KEYPRESS &H3B0000 presses F1. Examples: FOR i&=65 TO 90 !Simulates the pressing KEYPRESS i& !of the keys A-Z .... NEXT i& KEYPRESS 13 !.... followed by a Carriage Return INPUT a$ !Characters are taken up to the first Carriage Return PRINT a$ --> The letters from A to Z are printed. KEYDEF 1,"Hello"+CHR$(13) KEYPRESS &H83B0000 PAUSE 1 LINE INPUT a$ PRINT a$ -->A string to be produced by pressing ALT-F1 is defined, then a press of this key is simulated, followed by a slight pause to give the associated interrupt routine time to process it. The word "Hello" is then taken as the inputted a$. Iorec()+