summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/config_key.py
diff options
context:
space:
mode:
authorterryjreedy <tjreedy@udel.edu>2017-06-27 05:23:55 (GMT)
committerGitHub <noreply@github.com>2017-06-27 05:23:55 (GMT)
commit44913e584bcf4e2a0e1a6372c304c2d5ea521fc6 (patch)
tree5018d181ec979f5783b782b6f00b263cd87ed744 /Lib/idlelib/config_key.py
parent213ce12adfc9281c6f381bb45d132e9de8ffd450 (diff)
downloadcpython-44913e584bcf4e2a0e1a6372c304c2d5ea521fc6.zip
cpython-44913e584bcf4e2a0e1a6372c304c2d5ea521fc6.tar.gz
cpython-44913e584bcf4e2a0e1a6372c304c2d5ea521fc6.tar.bz2
bpo-21519: IDLE basic custom key entry better detects duplicates. (#2428)
Diffstat (limited to 'Lib/idlelib/config_key.py')
-rw-r--r--Lib/idlelib/config_key.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/idlelib/config_key.py b/Lib/idlelib/config_key.py
index 8d575ec..fc6e341 100644
--- a/Lib/idlelib/config_key.py
+++ b/Lib/idlelib/config_key.py
@@ -250,10 +250,10 @@ class GetKeysDialog(Toplevel):
'''
finalKey = self.listKeysFinal.get(ANCHOR)
modifiers = self.GetModifiers()
- # create a key sequence list for overlap check:
- keySequence = keys.split()
keysOK = False
title = self.keyerror_title
+ key_sequences = [key for keylist in self.currentKeySequences
+ for key in keylist]
if not keys.endswith('>'):
self.showerror(title, parent=self,
message='Missing the final Key')
@@ -267,7 +267,7 @@ class GetKeysDialog(Toplevel):
msg = 'The shift modifier by itself may not be used with'\
' this key symbol.'
self.showerror(title=title, parent=self, message=msg)
- elif keySequence in self.currentKeySequences:
+ elif keys in key_sequences:
msg = 'This key combination is already in use.'
self.showerror(title=title, parent=self, message=msg)
else: