Quantcast
Channel: Xojo Programming Forum - Latest topics
Viewing all articles
Browse latest Browse all 3773

Canvas keyUp

$
0
0

How to detect a keys combination on a Canvas keyUp event?

The code detects either “R” or OptionKey but no way of detect both.
if Keyboard.OptionKey then delta is -60 but then key is not R and, vice versa if R is checked first

Var delta As Integer
delta = 60
If Keyboard.OptionKey Then
  delta = - 60
End If

If key = "R" Then
  RotateDegrees = RotateDegrees + delta
  If RotateDegrees > 300 Or RotateDegrees < 0 Then
    RotateDegrees = 0
  End If
End If

DegreeLabel.Text = RotateDegrees.ToString
Refresh

7 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 3773

Trending Articles