From 0a50a27eaeb42b30699b597fa723c7fcda323452 Mon Sep 17 00:00:00 2001 From: Terry Jan Reedy Date: Wed, 23 Nov 2022 22:47:26 -0500 Subject: [PATCH] GH-88564: IDLE - fix 2 menu hotkey displays On Mac Cocoa, ^+backspace and ^+space were misdisplayed as ^B and ^S. Replace 'backslash' with '\' everywhere, just as 'slash', for example, is replaced with '/'. On Mac Cocoa, change'space' to 'Space', which then displays as 'Space' instead of 'S'. ('Space' is also used for the Mac-specific Emoji & Symbols entry.) --- Lib/idlelib/editor.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Lib/idlelib/editor.py b/Lib/idlelib/editor.py index 08d6aa2efde22a..543882a4b568a8 100644 --- a/Lib/idlelib/editor.py +++ b/Lib/idlelib/editor.py @@ -1624,6 +1624,8 @@ def prepstr(s): 'bracketleft': '[', 'bracketright': ']', 'slash': '/', + 'backslash': '\\', + 'space': 'Space' if macosx.isCocoaTk() else 'space', # GH-88564. } def get_accelerator(keydefs, eventname):