diff --git a/twander.py b/twander.py index 7591198..57572f4 100755 --- a/twander.py +++ b/twander.py @@ -4,7 +4,7 @@ # For Updates See: http://www.tundraware.com/Software/twander PROGNAME = "twander" -RCSID = "$Id: twander.py,v 2.45 2003/01/05 16:56:23 tundra Exp $" +RCSID = "$Id: twander.py,v 2.46 2003/01/05 23:27:25 tundra Exp $" VERSION = RCSID.split()[2] @@ -1128,6 +1128,14 @@ def KeystrokeHandler(event): + # We *only* want to handle simple single-character + # keystrokes. This means that there must be a character + # present and that the only state modifier permitted + # is the Shift key + + if not event.char or (event.state and event.state != 1): + return + # If the key pressed is a command key (i.e., it is in the table of # defined commands), get its associated string and execute the command. @@ -1977,6 +1985,7 @@ pass event.char = cmdkey + event.state = 0 KeystrokeHandler(event) # End Of 'CommandMenuSelection()'