changeset: 102452:352fc11b9fd2 user: Terry Jan Reedy date: Mon Jul 25 20:58:43 2016 -0400 files: Lib/idlelib/idle_test/htest.py Lib/idlelib/query.py description: Issue #27620: Escape key closes Query box as cancelled. diff -r 8cc06070e98b -r 352fc11b9fd2 Lib/idlelib/idle_test/htest.py --- a/Lib/idlelib/idle_test/htest.py Mon Jul 25 13:54:51 2016 -0400 +++ b/Lib/idlelib/idle_test/htest.py Mon Jul 25 20:58:43 2016 -0400 @@ -175,8 +175,8 @@ "'' and file does not exist are invalid path items.\n" "Any url ('www...', 'http...') is accepted.\n" "Test Browse with and without path, as cannot unittest.\n" - "A valid entry will be printed to shell with [0k]\n" - "or . [Cancel] will print None to shell" + "[Ok] or prints valid entry to shell\n" + "[Cancel] or prints None to shell" } _io_binding_spec = { @@ -245,7 +245,7 @@ '_htest': True}, 'msg': "Enter with or [Ok]. Print valid entry to Shell\n" "Blank line, after stripping, is ignored\n" - "Close dialog with valid entry, [Cancel] or [X]" + "Close dialog with valid entry, , [Cancel], [X]" } diff -r 8cc06070e98b -r 352fc11b9fd2 Lib/idlelib/query.py --- a/Lib/idlelib/query.py Mon Jul 25 13:54:51 2016 -0400 +++ b/Lib/idlelib/query.py Mon Jul 25 20:58:43 2016 -0400 @@ -53,6 +53,7 @@ self.transient(parent) self.grab_set() self.bind('', self.ok) + self.bind('', self.cancel) self.protocol("WM_DELETE_WINDOW", self.cancel) self.parent = parent self.message = message