diff options
author | Kevin Walzer <kw@codebykevin.com> | 2011-07-18 03:40:14 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2011-07-18 03:40:14 (GMT) |
commit | 07ec35d561f2b1def36a0a68325ca561055507d0 (patch) | |
tree | 80a62eff4cd3381373e71361095305c9fdfbc07e /macosx/tkMacOSXMenu.c | |
parent | 97936b2be7f8229e4bba82c31bf4c5cca36ec874 (diff) | |
download | tk-07ec35d561f2b1def36a0a68325ca561055507d0.zip tk-07ec35d561f2b1def36a0a68325ca561055507d0.tar.gz tk-07ec35d561f2b1def36a0a68325ca561055507d0.tar.bz2 |
Fix issue with shift key firing twice if bound to different procedure
Diffstat (limited to 'macosx/tkMacOSXMenu.c')
-rw-r--r-- | macosx/tkMacOSXMenu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/macosx/tkMacOSXMenu.c b/macosx/tkMacOSXMenu.c index 6877819..3ada6d7 100644 --- a/macosx/tkMacOSXMenu.c +++ b/macosx/tkMacOSXMenu.c @@ -280,7 +280,8 @@ static int ModifierCharWidth(Tk_Font tkfont); - (BOOL) menuHasKeyEquivalent: (NSMenu *) menu forEvent: (NSEvent *) event target: (id *) target action: (SEL *) action { - NSString *key = [event charactersIgnoringModifiers]; + /*Use lowercaseString to keep "shift" from firing twice if bound to different procedure.*/ + NSString *key = [[event charactersIgnoringModifiers] lowercaseString]; NSUInteger modifiers = [event modifierFlags] & NSDeviceIndependentModifierFlagsMask; |