Show how to link user defined methods to user defined keys.

An example of this is the facility provided by emacs for key bindings.

These key bindings may be application-specific or system-wide; state which you have done.




      *KEY 1 |!|A
      *KEY 2 |!|B
      REPEAT
        key% = INKEY(1)
        CASE key% OF
          WHEN &81: PROCmethod1
          WHEN &82: PROCmethod2
        ENDCASE
      UNTIL FALSE
      END
 
      DEF PROCmethod1
      PRINT "You pressed F1"
      ENDPROC
 
      DEF PROCmethod2
      PRINT "You pressed F2"
      ENDPROC