summaryrefslogtreecommitdiff
path: root/indra/llwindow
diff options
context:
space:
mode:
authorGraham Linden <none@none>2014-09-25 09:20:01 -0700
committerGraham Linden <none@none>2014-09-25 09:20:01 -0700
commit9f4788d7a8a924de654d55bfb102a81f797a9cf9 (patch)
tree742fb8127dc84052265647ed110e8a6446253103 /indra/llwindow
parent6004ad167458914c3b85438b96e81ea8796e368b (diff)
parent499f5aa9a4b46d61ee94b26d5c86bc032766af70 (diff)
Merge viewer-release 3.7.17
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