Re: INKEY$

 BBS: Inland Empire Archive
Date: 01-27-93 (18:22)             Number: 325
From: BOB PERKINS                  Refer#: NONE
  To: FRED PREUETT                  Recvd: NO  
Subj: Re: INKEY$                     Conf: (2) Quik_Bas
 FP> I am trying to use inkey$ to trap the pressing of the
 FP> inverted T cursor keys and cannot get it to work
 FP> right. Can any one help ?

  I assume you mean the "gray" cursor keys.  This'll work
for both sets of keys.

  'Assign the key values..
  null$ = CHR$(0)
  Rt$ = null$ + "M"
  Lft$ = null$ + "K"
  Up$ = null$ + "H"
  Dwn$ = null$ + "P"
  'test for which key pressed..
  DO
    a$ = INKEY$
    IF LEN(a$) THEN
      SELECT CASE a$
        CASE Up$: PRINT "Up Arrow Key"
        CASE Rt$: PRINT "Right Arrow Key"
        CASE Lft$: PRINT "Left Arrow Key"
        CASE Dwn$: PRINT "Down Arrow Key"
      END SELECT
    END IF
  LOOP UNTIL a$ = CHR$(27)
  END


--- Msg V4.5
 * Origin: Reciprocity Failure  (1:124/4115.236)
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