Bind escape button to quit.
This commit is contained in:
parent
684dcbb234
commit
05d1eb745e
1 changed files with 4 additions and 0 deletions
4
PGUI.pyw
4
PGUI.pyw
|
@ -28,6 +28,7 @@ class PGUILauncher(tkinter.ttk.Frame):
|
|||
self.filter_entry = tkinter.Entry(self, textvariable=self.filter_var)
|
||||
self.filter_entry.grid(row=0, column=0, columnspan=999, sticky='ew')
|
||||
self.filter_entry.bind('<Return>', self.launch_filtered)
|
||||
self.filter_entry.bind('<Escape>', self.quit)
|
||||
self.filter_entry.focus()
|
||||
|
||||
x = 0
|
||||
|
@ -80,6 +81,9 @@ class PGUILauncher(tkinter.ttk.Frame):
|
|||
subprocess.Popen(command, shell=True)
|
||||
self.quit()
|
||||
|
||||
def quit(self, *args):
|
||||
return super().quit()
|
||||
|
||||
|
||||
def main(argv):
|
||||
root = tkinter.Tk()
|
||||
|
|
Loading…
Reference in a new issue