.
contact contact

ON KEYBD#

 
.
 

Title: ON KEYBD#
Document: 983907364
Author: Michael Marxmeier (mike@marxmeier.com)
Keywords: KEYBD,LASTKEY


Q: Is there any function similar to CURKEY for the ON KEYBD# to know the last pressed key ?

A: The LASTKEY function returns the keycode of the last pressed key. Please have a look at the example program and program output below:

  ON KEYBD #97,#120 GOTO X
  DISP "Press 'a' or 'x'"
  WAIT
X: !
  DISP "CURKEY=";CURKEY
  DISP "You entered a '";CHR$(LASTKEY);"'"
  STOP

RUN
Press a or x
CURKEY= 55
You entered a 'x'
 
 
.
 
 
  Privacy | Webmaster | Terms of use | Impressum Revision:   
  Copyright © 1995-2002 Marxmeier Software AG