Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
INKEY$ doesn't work with fixed length strings
#3
Works as expected. Try this:

Code: (Select All)
TYPE tt
' Use 2 bytes to capture 2 byte combinations
'k AS STRING ' Works
k AS STRING * 2 ' Does Not work
END TYPE

DIM AS tt t

DO
t.k = INKEY$
PRINT "k:"; t.k
_limit 10
LOOP


The issue is you're printing it in an loop. You press "A", it pops up on the screen for a poop, and then the loop just keeps repeating, and it's replaced almost instantly by nothing as it waits for the next keypress to poop up the next key being processed.
Reply


Messages In This Thread
RE: INKEY$ doesn't work with fixed length strings - by SMcNeill - 07-28-2024, 04:07 PM



Users browsing this thread: 3 Guest(s)