Example #1
0
 def _get_bind_keys(self):
     return [(ctrl_or_cmd(), ord('c'), self.OnCopy),
             (ctrl_or_cmd(), ord('x'), self.OnCut),
             (ctrl_or_cmd(), ord('v'), self.OnPaste),
             (ctrl_or_cmd(), ord('z'), self.OnUndo),
             (ctrl_or_cmd(), ord('a'), self.OnSelectAll),
             (wx.ACCEL_NORMAL, wx.WXK_DELETE, self.OnDelete)]
Example #2
0
 def _get_bind_keys(self):
     return [(ctrl_or_cmd(), ord('c'), self.OnCopy),
             (ctrl_or_cmd(), ord('x'), self.OnCut),
             (ctrl_or_cmd(), ord('v'), self.OnPaste),
             (ctrl_or_cmd(), ord('z'), self.OnUndo),
             (ctrl_or_cmd(), ord('a'), self.OnSelectAll),
             (wx.ACCEL_NORMAL, wx.WXK_DELETE, self.OnDelete)]
Example #3
0
 def _get_bind_keys(self):
     bindings = [
         (ctrl_or_cmd(), wx.WXK_UP, self._tree.OnMoveUp),
         (ctrl_or_cmd(), wx.WXK_DOWN, self._tree.OnMoveDown),
         (wx.ACCEL_NORMAL, wx.WXK_F2, self._tree.label_editor.OnLabelEdit),
         (wx.ACCEL_NORMAL, wx.WXK_WINDOWS_MENU, self._tree.OnRightClick),
         (ctrl_or_cmd() | wx.ACCEL_SHIFT, ord('d'),
          lambda event: self._expanded_handler().OnSafeDelete(event)),
         (ctrl_or_cmd() | wx.ACCEL_SHIFT, ord('f'),
          lambda event: self._expanded_handler().OnNewSuite(event)),
         (ctrl_or_cmd() | wx.ACCEL_SHIFT, ord('k'),
          lambda event: self._expanded_handler().OnNewUserKeyword(event)),
         (ctrl_or_cmd() | wx.ACCEL_SHIFT, ord('t'),
          lambda event: self._expanded_handler().OnNewTestCase(event)),
         (ctrl_or_cmd() | wx.ACCEL_SHIFT, ord('v'),
          lambda event: self._expanded_handler().OnNewScalar(event)),
         (ctrl_or_cmd() | wx.ACCEL_SHIFT, ord('l'),
          lambda event: self._expanded_handler().OnNewListVariable(event)),
         (ctrl_or_cmd() | wx.ACCEL_SHIFT, ord('c'),
          lambda event: self._expanded_handler().OnCopy(event))
     ]
     if not IS_WINDOWS:
         bindings.append(
             (wx.ACCEL_NORMAL, wx.WXK_LEFT, self._tree.OnLeftArrow))
     return bindings
Example #4
0
 def _get_bind_keys(self):
     bindings = [
         (ctrl_or_cmd(), wx.WXK_UP, self._tree.OnMoveUp),
         (ctrl_or_cmd(), wx.WXK_DOWN, self._tree.OnMoveDown),
         (wx.ACCEL_NORMAL, wx.WXK_F2, self._tree.label_editor.OnLabelEdit),
         (wx.ACCEL_NORMAL, wx.WXK_WINDOWS_MENU, self._tree.OnRightClick),
         (ctrl_or_cmd() | wx.ACCEL_SHIFT, ord("d"), lambda event: self._expanded_handler().OnSafeDelete(event)),
         (ctrl_or_cmd() | wx.ACCEL_SHIFT, ord("f"), lambda event: self._expanded_handler().OnNewSuite(event)),
         (ctrl_or_cmd() | wx.ACCEL_SHIFT, ord("k"), lambda event: self._expanded_handler().OnNewUserKeyword(event)),
         (ctrl_or_cmd() | wx.ACCEL_SHIFT, ord("t"), lambda event: self._expanded_handler().OnNewTestCase(event)),
         (ctrl_or_cmd() | wx.ACCEL_SHIFT, ord("v"), lambda event: self._expanded_handler().OnNewScalar(event)),
         (ctrl_or_cmd() | wx.ACCEL_SHIFT, ord("l"), lambda event: self._expanded_handler().OnNewListVariable(event)),
         (ctrl_or_cmd() | wx.ACCEL_SHIFT, ord("c"), lambda event: self._expanded_handler().OnCopy(event)),
     ]
     if not IS_WINDOWS:
         bindings.append((wx.ACCEL_NORMAL, wx.WXK_LEFT, self._tree.OnLeftArrow))
     return bindings
Example #5
0
 def _get_bind_keys(self):
     return [(ctrl_or_cmd(), wx.WXK_UP, self.OnMoveUp),
             (ctrl_or_cmd(), wx.WXK_DOWN, self.OnMoveDown),
             (wx.ACCEL_NORMAL, wx.WXK_WINDOWS_MENU, self.OnRightClick),
             (wx.ACCEL_NORMAL, wx.WXK_DELETE, self.OnDelete)]
Example #6
0
 def _get_bind_keys(self):
     return [(ctrl_or_cmd(), wx.WXK_UP, self.OnMoveUp),
             (ctrl_or_cmd(), wx.WXK_DOWN, self.OnMoveDown),
             (wx.ACCEL_NORMAL, wx.WXK_WINDOWS_MENU, self.OnRightClick),
             (wx.ACCEL_NORMAL, wx.WXK_DELETE, self.OnDelete)]
 def test_ctrlcmd(self):
     self._test([('Ctrlcmd-Alt-A', (ctrl_or_cmd() + wx.ACCEL_ALT, 65))])
Example #8
0
 def test_ctrlcmd(self):
     self._test([('Ctrlcmd-Alt-A', (ctrl_or_cmd()+wx.ACCEL_ALT, 65))])