示例#1
0
    def onKeyDown(self, vk, mod):

        try:
            func = self.keymap.table[ckit.KeyEvent(vk, mod)]
        except KeyError:
            return

        func()

        return True
示例#2
0
    def onKeyDown(self, vk, mod):

        if self.keydown_hook:
            if self.keydown_hook(vk, mod):
                return True

        try:
            func = self.keymap.table[ckit.KeyEvent(vk, mod)]
        except KeyError:
            return

        self.result_mod = mod
        func()

        return True