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 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.