diff --git a/Pilz.UI/PaintingControl/PaintingControl.vb b/Pilz.UI/PaintingControl/PaintingControl.vb index e1a7890..669815f 100644 --- a/Pilz.UI/PaintingControl/PaintingControl.vb +++ b/Pilz.UI/PaintingControl/PaintingControl.vb @@ -129,10 +129,16 @@ Public Class PaintingControl Refresh() End Sub - Private Sub CheckKeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown, Me.KeyUp - pressedShift = e.Shift - pressedControl = e.Control - pressedAlt = e.Alt + Private Sub CheckKeyDown(sender As Object, e As KeyEventArgs) Handles Me.KeyDown + If e.Shift Then pressedShift = True + If e.Control Then pressedControl = True + If e.Alt Then pressedAlt = True + End Sub + + Private Sub CheckKeyUp(sender As Object, e As KeyEventArgs) Handles Me.KeyUp + If e.Shift Then pressedShift = False + If e.Control Then pressedControl = False + If e.Alt Then pressedAlt = False End Sub Friend ReadOnly Property AreaSelectionRectangle As RectangleF