summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/query.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2016-07-26 00:58:43 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2016-07-26 00:58:43 (GMT)
commit17937832badd5cd97967ccc1fff3b4b45feeaba9 (patch)
tree5477999027cc252ef7381f435e2f023b6fcbf274 /Lib/idlelib/query.py
parent8e1d3a2d41b6f064b60e69b3432ed3a2692bd19f (diff)
downloadcpython-17937832badd5cd97967ccc1fff3b4b45feeaba9.zip
cpython-17937832badd5cd97967ccc1fff3b4b45feeaba9.tar.gz
cpython-17937832badd5cd97967ccc1fff3b4b45feeaba9.tar.bz2
Issue #27620: Escape key closes Query box as cancelled.
Diffstat (limited to 'Lib/idlelib/query.py')
-rw-r--r--Lib/idlelib/query.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/idlelib/query.py b/Lib/idlelib/query.py
index d2d1472..c4e2891 100644
--- a/Lib/idlelib/query.py
+++ b/Lib/idlelib/query.py
@@ -53,6 +53,7 @@ class Query(Toplevel):
self.transient(parent)
self.grab_set()
self.bind('<Key-Return>', self.ok)
+ self.bind('<Key-Escape>', self.cancel)
self.protocol("WM_DELETE_WINDOW", self.cancel)
self.parent = parent
self.message = message