matags.py 文件源码

python
阅读 20 收藏 0 点赞 0 评论 0

项目:MaTags 作者: hastelloy 项目源码 文件源码
def reg_hot_keys(self):
        """
        hotkeys:
            Alt+e, show dialog, also extract tags
            Alt+a, show dialog, without extracting tags
            Alt+q, quit the program
            Esc, minimize the dialog to system tray
            Enter, add the tags
        """
        self.hotkeys = {'extract_tag': (
                            wx.NewId(), wx.MOD_ALT, 0x45), # alt+e
                        'activate': (
                            wx.NewId(), wx.MOD_ALT, 0x41), # alt+a
                        'refresh': (
                            wx.NewId(), wx.MOD_ALT, 0x52), # alt+r
                        'quit': (
                            wx.NewId(), wx.MOD_ALT, 0x51), # alt+q
                        }
        # https://msdn.microsoft.com/en-us/library/windows/desktop/ms646309(v=vs.85).aspx
        # https://msdn.microsoft.com/en-us/library/windows/desktop/dd375731(v=vs.85).aspx
        for _, key in self.hotkeys.items():
            # print(_, key)
            self.RegisterHotKey(*key)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号