summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorOz Linden <oz@lindenlab.com>2014-10-13 17:13:15 -0400
committerOz Linden <oz@lindenlab.com>2014-10-13 17:13:15 -0400
commit852426d71e5b192a003d01d128799c2b702c69b1 (patch)
tree66a31f735c3dd92f557a9026cf359ef000d548e9 /indra/llwindow
parent08a4d7a27743792a644c46f8163d973d0524cd79 (diff)
parent788ce7a8cdbbbf98566ce75ec281ec00c21dc6d8 (diff)
merge changes for 3.7.17-release
Diffstat (limited to 'indra/llwindow')
-rw-r--r--indra/llwindow/llopenglview-objc.mm31
1 files changed, 31 insertions, 0 deletions
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm
index b5983504f5..14b0a847f8 100644
--- a/indra/llwindow/llopenglview-objc.mm
+++ b/indra/llwindow/llopenglview-objc.mm
@@ -403,6 +403,37 @@ attributedStringInfo getSegments(NSAttributedString *str)
}
}
+- (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
{
return YES;