matags.py 文件源码

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

项目:MaTags 作者: hastelloy 项目源码 文件源码
def check_key(self, evt):
        """
        hotkeys:
            Alt+e, show dialog, also extract tags
            Alt+a, show dialog, without extracting tags
            ---Alt+q, quit the program -- deleted..
            Esc, minimize the dialog to system tray
            Enter, add the tags
        """
        char = evt.GetUnicodeKey()
        if char == wx.WXK_ESCAPE:
            # Esc
            self.Hide()
        elif char == wx.WXK_RETURN:
            tags_str = self.textbox.GetValue()
            if ":" in tags_str:
                tags_str = tags_str.replace(':', '')
                self.set_tags(tags_str)
            self.append_tags(tags_str)
        else:
            # self.textbox.WriteText("%c"%char)
            evt.Skip()
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号