summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authordolphin <dolphin@lindenlab.com>2014-10-09 16:10:00 -0700
committerdolphin <dolphin@lindenlab.com>2014-10-09 16:10:00 -0700
commitf9113c286fae143962f1d79663e66a303c46ce51 (patch)
tree9190363e14749efdb3f46de02c67c377a0b9718e /indra/llwindow
parent873a72fdbad8bca29cf8129b318719c1af5f8e9d (diff)
parent788ce7a8cdbbbf98566ce75ec281ec00c21dc6d8 (diff)
Merge
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/llopenglview-objc.mm28
1 files changed, 27 insertions, 1 deletions
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm
index 017ea3769c..f7031341eb 100644
--- a/indra/llwindow/llopenglview-objc.mm
+++ b/indra/llwindow/llopenglview-objc.mm
@@ -398,9 +398,35 @@ attributedStringInfo getSegments(NSAttributedString *str)
}
}
-- (void)flagsChanged:(NSEvent *)theEvent {
+- (void)flagsChanged:(NSEvent *)theEvent
+{
mModifiers = [theEvent modifierFlags];
callModifier([theEvent modifierFlags]);
+
+ NSInteger mask = 0;
+ switch([theEvent keyCode])
+ {
+ case 56:
+ mask = NSShiftKeyMask;
+ break;
+ case 58:
+ mask = NSAlternateKeyMask;
+ break;
+ case 59:
+ mask = NSControlKeyMask;
+ break;
+ default:
+ return;
+ }
+
+ if (mModifiers & mask)
+ {
+ callKeyDown([theEvent keyCode], 0);
+ }
+ else
+ {
+ callKeyUp([theEvent keyCode], 0);
+ }
}
- (BOOL) acceptsFirstResponder