浏览代码

wxGUI: search modules - fix numpad enter

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58222 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 11 年之前
父节点
当前提交
7c68394a01
共有 2 个文件被更改,包括 3 次插入2 次删除
  1. 2 1
      gui/wxpython/gui_core/menu.py
  2. 1 1
      gui/wxpython/gui_core/widgets.py

+ 2 - 1
gui/wxpython/gui_core/menu.py

@@ -218,7 +218,8 @@ class SearchModuleWindow(wx.Panel):
 
     def OnKeyUp(self, event):
         """!Key or key combination pressed"""
-        if event.ControlDown() and event.GetKeyCode() == wx.WXK_RETURN:
+        if event.ControlDown() and \
+                event.GetKeyCode() in (wx.WXK_RETURN, wx.WXK_NUMPAD_ENTER):
             self.Run()
         
     def OnItemSelected(self, node):

+ 1 - 1
gui/wxpython/gui_core/widgets.py

@@ -848,7 +848,7 @@ class SearchModuleWidget(wx.Panel):
 
     def OnKeyUp(self, event):
         """!Key or key combination pressed"""
-        if event.GetKeyCode() == wx.WXK_RETURN and not event.ControlDown():
+        if event.GetKeyCode() in (wx.WXK_RETURN, wx.WXK_NUMPAD_ENTER) and not event.ControlDown():
             if self._results:
                 self._resultIndex += 1
                 if self._resultIndex == len(self._results):