def on_run(self, event):
code = event.GetKeyCode()
title = self.buf[event.GetIndex()][0]
txt = self.buf[event.GetIndex()][1]
if code == wx.WXK_DELETE:
txt = ''
elif code == wx.WXK_CONTROL:
txt = self.ist(txt, 'Ctrl')
elif code == wx.WXK_ALT:
txt = self.ist(txt, 'Alt')
elif code == wx.WXK_SHIFT:
txt = self.ist(txt, 'Shift')
elif code in range(340,352):
fs = ['F'+str(i) for i in range(1,13)]
txt = self.ist(txt, fs[code-340])
elif code<100:
txt = self.ist(txt, chr(event.GetKeyCode()))
if len(txt)>0 and txt[-1]=='-':txt=txt[:-1]
self.buf[event.GetIndex()][1] = txt
self.lst_plgs.RefreshItem(event.GetIndex())
if txt=='':ShotcutManager.rm(title)
ShotcutManager.set(title, txt)
#PluginsManager.plgs[self.buf[event.GetIndex()][0]]().start()
评论列表
文章目录