Qbasicnews.com

Full Version: Using the F Keys
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I just have not worked out how I can make use of the F-keys. Can anyone show me a simple example they I can work on please
use Inkey$ or INP(&H60) to get the value of it, then so a select case or if...then to see if it occurs.

That said, I don't know if INKEY$ will read function keys, though they should have ASCII codes so yeah...

Hail.
Look up KEY in the help files, there are examples in there also. The function keys can be used as combination keys.
ON KEY is a bad idea, avoid it.

I believe the function keys are the same as the arrows... The INKEY$ variable contains two characters, the first of which is CHR$(0), and the second is an ascii value. You can make a simple proc to trap it:
Code:
DO
  DO: I$ = INKEY$: LOOP UNTIL I$ <> ""
  PRINT I$;
  FOR a = 1 TO LEN(I$)
    PRINT ASC(MID$(I$, a, 1));
  NEXT
  PRINT
LOOP
'untested
of you may have been in existence. The FBI hasn't come after me yet. Should I head for Cuba?


"ON KEY is a bad idea, avoid it. "
you can hide, but you can't run?
we are following you everywhere...
.
Wow... people fleeing from America to Cuba??? :rotfl:
...I guess the economy's worse than I thought...
Pages: 1 2