Do not trigger esc when modifier keys are pressed

This commit is contained in:
DarkPhoenix
2019-05-12 17:08:41 +03:00
parent 51e8713cd6
commit 5b52da737a
12 changed files with 31 additions and 14 deletions

View File

@@ -276,7 +276,8 @@ class DmgPatternEditorDlg(wx.Dialog):
def kbEvent(self, event):
keycode = event.GetKeyCode()
if keycode == wx.WXK_ESCAPE:
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
self.closeWindow()
return
event.Skip()