Take modifier key info from event where possible
This commit is contained in:
@@ -281,9 +281,7 @@ class DmgPatternEditor(AuxiliaryFrame):
|
||||
self.stNotice.SetLabel("Patterns exported to clipboard")
|
||||
|
||||
def kbEvent(self, event):
|
||||
keycode = event.GetKeyCode()
|
||||
mstate = wx.GetMouseState()
|
||||
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
|
||||
if event.GetKeyCode() == wx.WXK_ESCAPE and event.GetModifiers() == wx.MOD_NONE:
|
||||
self.Close()
|
||||
return
|
||||
event.Skip()
|
||||
|
||||
Reference in New Issue
Block a user