summaryrefslogtreecommitdiffstats
path: root/Lib/idlelib/keybindingDialog.py
diff options
context:
space:
mode:
authorSteven M. Gava <elguavas@python.net>2002-03-05 00:25:58 (GMT)
committerSteven M. Gava <elguavas@python.net>2002-03-05 00:25:58 (GMT)
commitf31eec0e2ee3f27951693e7478c5650f64971b3c (patch)
tree9b86aef6ced7bed5be5b33f8a0a6e8520e5d005c /Lib/idlelib/keybindingDialog.py
parenta8e1d81bdc9cb45cc071eff2991a1e96d4b22e7c (diff)
downloadcpython-f31eec0e2ee3f27951693e7478c5650f64971b3c.zip
cpython-f31eec0e2ee3f27951693e7478c5650f64971b3c.tar.gz
cpython-f31eec0e2ee3f27951693e7478c5650f64971b3c.tar.bz2
further work on new config system
Diffstat (limited to 'Lib/idlelib/keybindingDialog.py')
-rw-r--r--Lib/idlelib/keybindingDialog.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/Lib/idlelib/keybindingDialog.py b/Lib/idlelib/keybindingDialog.py
index 3b1ddba..f99e452 100644
--- a/Lib/idlelib/keybindingDialog.py
+++ b/Lib/idlelib/keybindingDialog.py
@@ -142,7 +142,8 @@ class GetKeysDialog(Toplevel):
if modifiers: modifiers[0]='<'+modifiers[0]
keyList=keyList+modifiers
if finalKey:
- if (not modifiers) and (finalKey in self.functionKeys):
+ if (not modifiers) and (finalKey not
+ in self.alphanumKeys+self.punctuationKeys):
finalKey='<'+self.TranslateKey(finalKey)
else:
finalKey=self.TranslateKey(finalKey)
@@ -225,16 +226,18 @@ class GetKeysDialog(Toplevel):
tkMessageBox.showerror(title='Key Sequence Error',
message='No final key specified.')
keysOk=0
- elif (not modifiers) and (finalKey not in self.functionKeys):
- #modifier required if not a function key
+ elif (not modifiers) and (finalKey in
+ self.alphanumKeys+self.punctuationKeys):
+ #modifier required
tkMessageBox.showerror(title='Key Sequence Error',
message='No modifier key(s) specified.')
keysOk=0
- elif (modifiers==['Shift']) and (finalKey not in self.functionKeys):
+ elif (modifiers==['Shift']) and (finalKey not
+ in self.functionKeys+('Tab',)):
#shift alone is only a useful modifier with a function key
tkMessageBox.showerror(title='Key Sequence Error',
- message='Shift alone is only a useful modifier '+
- 'when used with a function key.')
+ message='Shift alone is not a useful modifier '+
+ 'when used with this final key key.')
keysOk=0
elif keySequence in self.currentKeySequences: #keys combo already in use
tkMessageBox.showerror(title='Key Sequence Error',