The Any Key

2025-11-28

A simple utility to return the ASCII integer code corresponding to the key that was pressed. This is useful if you don't know what the code for, say, one of the arrow keys or something is.


print "press any key"
mainloop:
  a$ = inkey$
  if a$="" then goto mainloop
  
  print "key pressed: " asc(a$)
  
  goto mainloop