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