My current custom Inkey$ function is thus:
Note: Inkey$ does not trap Keypad-5 or Ctrl-Keypad-5.
Code: (Select All)
Function INKEYz$
_Limit 100
X = _KeyHit
If X Then
If X < 0 Then
Select Case X
Case -12 ' keypad-5
INKEYz$ = Chr$(0) + Chr$(76)
KeyPressed = -1
Case -108 ' ctrl-keypad-5
INKEYz$ = Chr$(0) + Chr$(143)
KeyPressed = -1
End Select
Else
X$ = InKey$
If Len(X$) Then
INKEYz$ = X$
KeyPressed = -1
End If
End If
End If
End Function
Note: Inkey$ does not trap Keypad-5 or Ctrl-Keypad-5.