10-02-2022, 12:04 AM
(This post was last modified: 10-02-2022, 12:55 AM by PhilOfPerth.)
Bingo !!! This does everything I needed:
Print "Press any single or combo of cursor arrow keys...": Print
Do
ky = _KeyHit
_Limit 30
Select Case ky
Case Is = 18432 ' Up-arrow
If _KeyDown(19200) Then
Print "Up-arrow and Left-arrow"
ElseIf _KeyDown(19712) Then
Print "Up-arrow and Right-arrow"
Else Print "Up-arrow"
End If
Case Is = 19200 ' Left-arrow
If _KeyDown(18432) Then
Print "Left-arrow and Up-arrow"
ElseIf _KeyDown(20480) Then
Print "left-arrow and Down-arrow"
Else Print "Left-arrow"
End If
Case Is = 19712 ' Right-arrow
If _KeyDown(18432) Then
Print "Right-arrow and Up-arrow"
ElseIf _KeyDown(20480) Then
Print "Right-arrow and Down-arrow"
Else Print "Right-arrow"
End If
Case Is = 20480 ' Down-arrow
If _KeyDown(19200) Then
Print "Down-arrow and Left-arrow"
ElseIf _KeyDown(19712) Then
Print "Down-arrow and Right-arrow"
Else Print "Down-arrow"
End If
End Select
_KeyClear
Sleep 1: Cls
Loop
Thanks for the help bplus and Pete
Edit: I see that there are two reports for each double-combination, but don't see how to avoid this - yet.
Print "Press any single or combo of cursor arrow keys...": Print
Do
ky = _KeyHit
_Limit 30
Select Case ky
Case Is = 18432 ' Up-arrow
If _KeyDown(19200) Then
Print "Up-arrow and Left-arrow"
ElseIf _KeyDown(19712) Then
Print "Up-arrow and Right-arrow"
Else Print "Up-arrow"
End If
Case Is = 19200 ' Left-arrow
If _KeyDown(18432) Then
Print "Left-arrow and Up-arrow"
ElseIf _KeyDown(20480) Then
Print "left-arrow and Down-arrow"
Else Print "Left-arrow"
End If
Case Is = 19712 ' Right-arrow
If _KeyDown(18432) Then
Print "Right-arrow and Up-arrow"
ElseIf _KeyDown(20480) Then
Print "Right-arrow and Down-arrow"
Else Print "Right-arrow"
End If
Case Is = 20480 ' Down-arrow
If _KeyDown(19200) Then
Print "Down-arrow and Left-arrow"
ElseIf _KeyDown(19712) Then
Print "Down-arrow and Right-arrow"
Else Print "Down-arrow"
End If
End Select
_KeyClear
Sleep 1: Cls
Loop
Thanks for the help bplus and Pete
Edit: I see that there are two reports for each double-combination, but don't see how to avoid this - yet.
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.)
Please visit my Website at: http://oldendayskids.blogspot.com/
Please visit my Website at: http://oldendayskids.blogspot.com/