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

@@ -105,7 +105,9 @@ class NavigationPanel(SFItem.SFBrowserItem):
self.BrowserSearchBox.Show(False)
def OnBrowserSearchBoxKeyPress(self, event):
if event.GetKeyCode() == wx.WXK_ESCAPE:
keycode = event.GetKeyCode()
mstate = wx.GetMouseState()
if keycode == wx.WXK_ESCAPE and mstate.GetModifiers() == wx.MOD_NONE:
self.BrowserSearchBox.Show(False)
elif event.RawControlDown() and event.GetKeyCode() == wx.WXK_BACK:
HandleCtrlBackspace(self.BrowserSearchBox)