summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/configHandler.py
diff options
context:
space:
mode:
authorNed Deily <nad@acm.org>2014-03-28 03:49:14 (GMT)
committerNed Deily <nad@acm.org>2014-03-28 03:49:14 (GMT)
commitb7601676b07c7c8e79af9e7818a783b966612c34 (patch)
tree7a3d48649890a9901747b98df2a9ed13ac13d2db /Lib/idlelib/configHandler.py
parente7d532fbc9c13e00b1e5c6c0db2dba31d1212de7 (diff)
downloadcpython-b7601676b07c7c8e79af9e7818a783b966612c34.zip
cpython-b7601676b07c7c8e79af9e7818a783b966612c34.tar.gz
cpython-b7601676b07c7c8e79af9e7818a783b966612c34.tar.bz2
Issue #17654: Ensure IDLE menus are customized properly on OS X for
non-framework builds and for all variants of Tk.
Diffstat (limited to 'Lib/idlelib/configHandler.py')
-rw-r--r--Lib/idlelib/configHandler.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py
index ea2010e..8608f7c 100644
--- a/Lib/idlelib/configHandler.py
+++ b/Lib/idlelib/configHandler.py
@@ -20,7 +20,6 @@ configuration problem notification and resolution.
import os
import sys
-from idlelib import macosxSupport
from configparser import ConfigParser, NoOptionError, NoSectionError
class InvalidConfigType(Exception): pass
@@ -527,10 +526,13 @@ class IdleConf:
def GetCurrentKeySet(self):
result = self.GetKeySet(self.CurrentKeys())
- if macosxSupport.runningAsOSXApp():
- # We're using AquaTk, replace all keybingings that use the
- # Alt key by ones that use the Option key because the former
- # don't work reliably.
+ if sys.platform == "darwin":
+ # OS X Tk variants do not support the "Alt" keyboard modifier.
+ # So replace all keybingings that use "Alt" with ones that
+ # use the "Option" keyboard modifier.
+ # TO DO: the "Option" modifier does not work properly for
+ # Cocoa Tk and XQuartz Tk so we should not use it
+ # in default OS X KeySets.
for k, v in result.items():
v2 = [ x.replace('<Alt-', '<Option-') for x in v ]
if v != v2: