Re: onkey trapping

 BBS: Inland Empire Archive
Date: 06-23-92 (07:51)             Number: 1171
From: FRANCOIS ROY                 Refer#: NONE
  To: BILL CAMPBELL                 Recvd: NO  
Subj: Re: onkey trapping             Conf: (2) Quik_Bas
 BC> Very much appreciated, your response. However, no books of mine tell me
 BC> what the code for the arrows are.

 I got them from the GW-Basic reference, but they also appear in Appendix A.1
 of the QB 4.0 reference.  To make it short:

 C$ = ""
 WHILE LEN(C$) <> 2     ' All keypad strokes return an "extended" code
   C$ = INKEY$
   WEND
 C% = RIGHT$(C$,1)
 SELECT CASE C%
   CASE 72      ' Up arrow
     ...
   CASE 80      ' Down arrow
     ...
   CASE 75      ' Left arrow
     ...
   CASE 77      ' Right arrow
     ...
   CASE ELSE
     PRINT "Bzzzt!"
 END SELECT

 Just make sure the "NumLock" key is not active if you want the arrows on the
 numeric keypad to behave like the stand-alone arrows...


--- ME2_1104
 * Origin: Out of String Space - the Final Frontier (Fidonet 1:163/506.2)
Outer Court
Echo Basic Postings

Books at Amazon:

Back to BASIC: The History, Corruption, and Future of the Language

Hackers: Heroes of the Computer Revolution (including Tiny BASIC)

Go to: The Story of the Math Majors, Bridge Players, Engineers, Chess Wizards, Scientists and Iconoclasts who were the Hero Programmers of the Software Revolution

The Advent of the Algorithm: The Idea that Rules the World

Moths in the Machine: The Power and Perils of Programming

Mastering Visual Basic .NET