This is not a bug report but I was about to declare an error.
This code contains 2 ways to trap the F1 key:
The difference is between soft key and scan key when key is set
(has nothing to do with Key On or Key Off)..
This code contains 2 ways to trap the F1 key:
The difference is between soft key and scan key when key is set
(has nothing to do with Key On or Key Off)..
Code: (Select All)
' Ways to trap function keys.
f$ = "EDIT"
KEY 1, f$ ' activate soft key.
Print "Press F1:"
Do
x$ = InKey$
If Len(x$) Then
q$ = q$ + x$
Else
If Len(q$) Then
Exit Do
End If
End If
Loop
If q$ = f$ Then
Print "F1 pressed. (equals:"; q$; ")"
End If
KEY 1, "" ' decativate soft key.
Print "Press F1:"
Do
x$ = InKey$
If x$ = Chr$(0) + Chr$(59) Then
Print "F1 pressed. (equals:"; Asc(Right$(x$, 1)); ")"
Exit Do
End If
Loop
End