Skip to content

Commit 1005b1a

Browse files
committed
Allow closing with Alt+F4. Closes #407
1 parent 993d3e5 commit 1005b1a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CompactGUI/Views/MainWindow.xaml.vb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,11 @@ Class MainWindow
3535

3636
Private Sub Window_PreviewKeyDown(sender As Object, e As KeyEventArgs)
3737

38-
If e.Key = Key.System Then e.Handled = True
38+
If e.Key = Key.System AndAlso e.SystemKey = Key.F4 Then
39+
Return
40+
ElseIf e.Key = Key.System Then
41+
e.Handled = True
42+
End If
3943

4044
End Sub
4145

0 commit comments

Comments
 (0)