]> granicus.if.org Git - python/commitdiff
Bind ESC to close-window.
authorGuido van Rossum <guido@python.org>
Mon, 11 Jan 1999 14:46:55 +0000 (14:46 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 11 Jan 1999 14:46:55 +0000 (14:46 +0000)
Tools/idle/Debugger.py

index 24a7376cd4b650a76d99a2a15ce82148378e0ea5..d155ec8b41aca1d79f0b98c9aa37d7363dd4da58 100644 (file)
@@ -18,7 +18,7 @@ class Debugger(bdb.Bdb):
         self.pyshell = pyshell
         self.make_gui()
 
-    def close(self):
+    def close(self, event=None):
         if self.interacting:
             self.top.bell()
             return
@@ -51,6 +51,7 @@ class Debugger(bdb.Bdb):
         self.top.wm_title("Debug Control")
         self.top.wm_iconname("Debug")
         top.wm_protocol("WM_DELETE_WINDOW", self.close)
+        self.top.bind("<Escape>", self.close)
         #
         self.bframe = bframe = Frame(top)
         self.bframe.pack(anchor="w")