diff options
author | Guido van Rossum <guido@python.org> | 1999-06-02 18:18:57 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-06-02 18:18:57 (GMT) |
commit | 094189f10846112494ded420e5232ee9343f01c4 (patch) | |
tree | dbea22fed149063cc2aa40f4b0e732115aa45046 /Tools/idle | |
parent | 6290dabdbbf19f2ad93bd7800226f2c6761c61b1 (diff) | |
download | cpython-094189f10846112494ded420e5232ee9343f01c4.zip cpython-094189f10846112494ded420e5232ee9343f01c4.tar.gz cpython-094189f10846112494ded420e5232ee9343f01c4.tar.bz2 |
My fix to Mark's code: restore the universal check on <KeyRelease>.
Always cancel on <Key-Escape> or <ButtonPress>.
Diffstat (limited to 'Tools/idle')
-rw-r--r-- | Tools/idle/CallTips.py | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/Tools/idle/CallTips.py b/Tools/idle/CallTips.py index 0ff9a63..33d1290 100644 --- a/Tools/idle/CallTips.py +++ b/Tools/idle/CallTips.py @@ -2,18 +2,6 @@ import string import sys import types -# These keys check if cancellation is nesessary. -_check_cancel_keys = ["Left", "Right"] - -# These keys (with the modifiers) call cancel unconditionally. -_cancel_keys_base = ["Up", "Down", "Next", "Prior", "Home"] -_cancel_keys_modifiers = ['Key-', 'Control-', 'Shift-', 'Control-Shift-'] - -_cancel_keys = [] -for key in _cancel_keys_base: - for mod in _cancel_keys_modifiers: - _cancel_keys.append(mod+key) - class CallTips: menudefs = [ @@ -22,8 +10,8 @@ class CallTips: keydefs = { '<<paren-open>>': ['<Key-parenleft>'], '<<paren-close>>': ['<Key-parenright>'], - '<<check-calltip-cancel>>': map(lambda key: "<Key-%s>" % key, _check_cancel_keys), - '<<calltip-cancel>>': map(lambda key: "<%s>" % key, _cancel_keys), + '<<check-calltip-cancel>>': ['<KeyRelease>'], + '<<calltip-cancel>>': ['<ButtonPress>', '<Key-Escape>'], } windows_keydefs = { |