aboutsummaryrefslogtreecommitdiff
path: root/AppKit/GTMNSAnimation+Duration.m
diff options
context:
space:
mode:
Diffstat (limited to 'AppKit/GTMNSAnimation+Duration.m')
-rw-r--r--AppKit/GTMNSAnimation+Duration.m13
1 files changed, 12 insertions, 1 deletions
diff --git a/AppKit/GTMNSAnimation+Duration.m b/AppKit/GTMNSAnimation+Duration.m
index c47772b..02f2b67 100644
--- a/AppKit/GTMNSAnimation+Duration.m
+++ b/AppKit/GTMNSAnimation+Duration.m
@@ -29,7 +29,18 @@ NSTimeInterval GTMModifyDurationBasedOnCurrentState(NSTimeInterval duration,
if (!(modifiers & (NSAlternateKeyMask |
NSCommandKeyMask))) {
if (modifiers & NSShiftKeyMask) {
- duration *= 5.0;
+ // 25 is the ascii code generated for a shift-tab (End-of-message)
+ // The shift modifier is ignored if it is applied to a Tab key down.
+ // Tab and shift-tab are often used for navigating around UI elements,
+ // and in the majority of cases slowing down the animations while
+ // navigating around UI elements is not desired.
+ if ((eventMask & NSKeyDownMask)
+ && ([[event characters] length])
+ && ([[event characters] characterAtIndex:0] == 25)) {
+ duration = duration;
+ } else {
+ duration *= 5.0;
+ }
}
// These are additive, so shift+control returns 10 * duration.
if (modifiers & NSControlKeyMask) {