Beispiel #1
0
 def hotkeyend(self, event):
     event.widget.unbind("<KeyPress>")
     event.widget.unbind("<KeyRelease>")
     hotkeymgr.acquire_stop()  # in case focus was lost while in the middle of acquiring
     event.widget.delete(0, tk.END)
     self.hotkey_text.insert(
         0, self.hotkey_code and hotkeymgr.display(self.hotkey_code, self.hotkey_mods) or _("None")
     )  # No hotkey/shortcut currently defined
Beispiel #2
0
 def hotkeyend(self, event):
     event.widget.unbind('<KeyPress>')
     event.widget.unbind('<KeyRelease>')
     hotkeymgr.acquire_stop(
     )  # in case focus was lost while in the middle of acquiring
     event.widget.delete(0, tk.END)
     self.hotkey_text.insert(
         0, self.hotkey_code
         and hotkeymgr.display(self.hotkey_code, self.hotkey_mods)
         or _('None'))  # No hotkey/shortcut currently defined