•  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-FileON MENU KEY GOSUB proc

proc: procedure name

This command enables the monitoring of the keyboad. The parameter proc is the
name of a procedure to which the program branches, if a key was pressed during
an ON MENU command.

Example:

    ON MENU KEY GOSUB key_output
    REPEAT
      ON MENU
    UNTIL MOUSEK=2
    '
    PROCEDURE key_output
      PRINT "keyboard shift keys: ";MENU(13)
      PRINT "ASCII-code: ";BYTE(MENU(14))
      PRINT "Scan-code: ";SHR(MENU(14),8)
      PRINT
    RETURN

--> With the press of a key the current condition of the keyboard modifier keys
    (Shift, Control, Alternate) is displayed as well as the ASCII code and Scan
    Code of the pressed key. A press of the right mouse button terminates the
    program. For the meaning of MENU(13) and MENU(14) see function MENU().

Memo: If the procedure used with ON MENU KEY is undefined the compiler
      will not issue and error message.  Instead the compiler writes a bad
      binary where ON MENU KEY is translated into JSR 0.l!

evnt_keybd()+