Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trapping two keys
#11
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.
Of all the places on Earth, and all the planets in the Universe, I'd rather live here (Perth, W.A.) Big Grin
Please visit my Website at: http://oldendayskids.blogspot.com/
Reply


Messages In This Thread
Trapping two keys - by PhilOfPerth - 10-01-2022, 01:52 AM
RE: Trapping two keys - by bplus - 10-01-2022, 01:59 AM
RE: Trapping two keys - by PhilOfPerth - 10-01-2022, 02:08 AM
RE: Trapping two keys - by bplus - 10-01-2022, 02:26 AM
RE: Trapping two keys - by Pete - 10-01-2022, 02:38 AM
RE: Trapping two keys - by PhilOfPerth - 10-01-2022, 08:05 AM
RE: Trapping two keys - by Pete - 10-01-2022, 01:07 PM
RE: Trapping two keys - by bplus - 10-01-2022, 03:33 PM
RE: Trapping two keys - by Pete - 10-01-2022, 04:19 PM
RE: Trapping two keys - by PhilOfPerth - 10-01-2022, 11:24 PM
RE: Trapping two keys - by PhilOfPerth - 10-02-2022, 12:04 AM
RE: Trapping two keys - by bplus - 10-02-2022, 01:41 AM
RE: Trapping two keys - by Pete - 10-02-2022, 02:00 AM
RE: Trapping two keys - by PhilOfPerth - 10-02-2022, 02:34 AM
RE: Trapping two keys - by bplus - 10-02-2022, 05:20 PM
RE: Trapping two keys - by mnrvovrfc - 10-02-2022, 07:51 PM
RE: Trapping two keys - by Pete - 10-02-2022, 05:51 PM
RE: Trapping two keys - by James D Jarvis - 10-02-2022, 07:56 PM
RE: Trapping two keys - by bplus - 10-02-2022, 07:58 PM



Users browsing this thread: 9 Guest(s)