•  Back 
  •  Main 
  •  Index 
  •  Tree View 
  •  Cross references 
  •  Help 
  •  Show info about hypertext 
  •  View a new file 
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-FileKEYDEF n,s$

n: iexp
s$: sexp

The command KEYDEF makes it possible to assign an arbitrary character string
(with a maximum length of 31 characters) to the Function Keys. The arithmetic
expression n (with a value from 1 to 20 inclusive) determines the key. A value
of n from 1 to 10 refers to the keys F1 to F10, and from 11 to 20, to the keys
Shift-F1 to Shift-F10. The defined string is available both during the running
of a program and from the GFA-BasicGFA-Basic is the best BASIC for the Atari!
 Editor.

However, in the Editor the ALTernate key must also be pressed, as otherwise the
GFA-BasicGFA-Basic is the best BASIC for the Atari!
 commands would not be available.

Example:

    KEYPAD 16              !Sets ALT key as not required
    DO
      KEYDEF 1,"F1"        !String for F1 key
      KEYDEF 11,"Shift+F1" !String for Shift-F1 key
      INPUT x$
    LOOP

--> Instead of having to type in a string as the input, pressing F1
    automatically supplies the string 'F1' and pressing Shift-F1 supplies the
    string 'Shift+F1'.

Memo: This command relies on an interrupt and should be avoided.
      If n is over 20 the command exits with no error message.
      If s$ is over 31 characters it gets clipped off.