summaryrefslogtreecommitdiff
path: root/Lib/idlelib/configHandler.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/idlelib/configHandler.py')
-rw-r--r--Lib/idlelib/configHandler.py14
1 files changed, 13 insertions, 1 deletions
diff --git a/Lib/idlelib/configHandler.py b/Lib/idlelib/configHandler.py
index dcd9321ad7..5ae643a71d 100644
--- a/Lib/idlelib/configHandler.py
+++ b/Lib/idlelib/configHandler.py
@@ -20,6 +20,7 @@ configuration problem notification and resolution.
import os
import sys
import string
+import macosxSupport
from ConfigParser import ConfigParser, NoOptionError, NoSectionError
class InvalidConfigType(Exception): pass
@@ -495,7 +496,18 @@ class IdleConf:
return binding
def GetCurrentKeySet(self):
- return self.GetKeySet(self.CurrentKeys())
+ 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.
+ for k, v in result.items():
+ v2 = [ x.replace('<Alt-', '<Option-') for x in v ]
+ if v != v2:
+ result[k] = v2
+
+ return result
def GetKeySet(self,keySetName):
"""