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()
评论列表
文章目录