Because you use INKEY$ many times. Eliminate the 2 ElseIF's. That is just repetition.
To best read one press, use an INKEY$ variable. Like K$ = INKEY$ at start of loop. Then use the variable in the 2 keypress statements. INKEY$ only holds a keypress until it is read once!
'
' goo1
'
DEFINT A-Z
Main:
CLS
'-- To add or delete items from the array you only need to
' modify the data statement and do two things...
'
' 1. Change the first data statement to the number of
' elements in the array.
'
' 2. Add the row, col, and text anywhere below the first
' data statement.
'
'
' ****************************************************************
' NOTE: NO NEED TO MODIFY THIS CODE, JUST THE DATA STATEMENTS.
' ****************************************************************
RESTORE
READ NumItems
REDIM Item$(1 TO NumItems), Row(1 TO NumItems), Col(1 TO NumItems)
FOR i = 1 TO NumItems
READ Row(i), Col(i), Item$(i)
LOCATE Row(i), Col(i)
PRINT Item$(i)
NEXT
'--
LastChoice = 0
Choice = 1
DO
IF LastChoice <> Choice THEN
'-- This removes the previous pointer
IF LastChoice > 0 THEN
LOCATE LastChoice, 8: PRINT " "
END IF
LOCATE Choice, 8: PRINT ">"
LastChoice = Choice
END IF
'--
SELECT CASE INKEY$
CASE CHR$(27) 'escape
Choice = 0
EXIT DO
CASE CHR$(13) 'enter
EXIT DO
CASE CHR$(0) + CHR$(71) 'home
Choice = 1
CASE CHR$(0) + CHR$(79) 'end
Choice = NumItems
CASE CHR$(0) + CHR$(72) 'up
IF Choice > 1 THEN
Choice = Choice - 1
ELSE
Choice = NumItems
END IF
CASE CHR$(0) + CHR$(80) 'down
IF Choice < NumItems THEN
Choice = Choice + 1
ELSE
Choice = 1
END IF
END SELECT
LOOP
'--
CLS
IF Choice > 0 THEN
PRINT "You selected item"; Choice
ELSE
PRINT "You made no selection!"
END IF
END
DATA 5
DATA 1, 10, "orange"
DATA 2, 10, "pear"
DATA 3, 10, "apple"
DATA 4, 10, "peach"
DATA 5, 10, "banana"