From 3a114f80727376e9e600c13bcf547158c167399f Mon Sep 17 00:00:00 2001 From: Ronald Oussoren Date: Thu, 17 Nov 2022 15:20:33 +0100 Subject: [PATCH 1/2] GH-88564: Make sure IDLE keybindings are correctly shown on macOS On macOS the Ctrl+space and Ctrl+backslash shortcuts didn't show up correctly in the menu, they were shown as ^S and ^B respectively. With this changeset they are shown as ^space and ^\ as expected --- Lib/idlelib/editor.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index 08d6aa2efde22a..049916e25c423c 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -1645,6 +1645,12 @@ def get_accelerator(keydefs, eventname): s = re.sub("><", " ", s) s = re.sub("<", "", s) s = re.sub(">", "", s) + if macosx.isCocoaTk(): + # GH-88564: On macOS the keybindings + # for Ctrl+space and Ctrl+backslash need + # an adjustment to be shown. + s = re.sub('space', 'Space', s) + s = re.sub('backslash', '\\\\', s) return s From 6869b62c840ff7f5fd7c0ad9b2d9f448c601c977 Mon Sep 17 00:00:00 2001 From: "blurb-it[bot]" <43283697+blurb-it[bot]@users.noreply.github.com> Date: Thu, 17 Nov 2022 14:28:02 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=9C=F0=9F=A4=96=20Added=20by=20blu?= =?UTF-8?q?rb=5Fit.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../next/IDLE/2022-11-17-14-27-59.gh-issue-88564.YRJklV.rst | 1 + 1 file changed, 1 insertion(+) create mode 100644 Misc/NEWS.d/next/IDLE/2022-11-17-14-27-59.gh-issue-88564.YRJklV.rst diff --git a/Misc/NEWS.d/next/IDLE/2022-11-17-14-27-59.gh-issue-88564.YRJklV.rst b/Misc/NEWS.d/next/IDLE/2022-11-17-14-27-59.gh-issue-88564.YRJklV.rst new file mode 100644 index 00000000000000..dd78b207e197db --- /dev/null +++ b/Misc/NEWS.d/next/IDLE/2022-11-17-14-27-59.gh-issue-88564.YRJklV.rst @@ -0,0 +1 @@ +Fix the shortcuts shown in the IDLE menu for "Show Completions" and "Show Call Tip" on macOS.