diff options
author | terryjreedy <tjreedy@udel.edu> | 2017-06-27 05:58:18 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-27 05:58:18 (GMT) |
commit | 93b88e995373c48713c9f7d4b32fe1d0166709e5 (patch) | |
tree | 449663573f7826b13477c329e2316c161080396c /Lib/idlelib/config_key.py | |
parent | 8bdc3bd3d66fefdc07d32bd19c41c6f902f16111 (diff) | |
download | cpython-93b88e995373c48713c9f7d4b32fe1d0166709e5.zip cpython-93b88e995373c48713c9f7d4b32fe1d0166709e5.tar.gz cpython-93b88e995373c48713c9f7d4b32fe1d0166709e5.tar.bz2 |
[3.6] bpo-21519: IDLE basic custom key entry better detects duplicates. (GH-2428) (#2433)
Original patch by Saimadhav Heblikar.
(cherry picked from commit 44913e5)
Diffstat (limited to 'Lib/idlelib/config_key.py')
-rw-r--r-- | Lib/idlelib/config_key.py | 6 |
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: |