From 6c200a94f705667201bcaf0753986da90a2748eb Mon Sep 17 00:00:00 2001 From: Geenz Date: Sat, 23 Mar 2013 01:05:21 -0400 Subject: Fix for command key presses + a letter not triggering keyUp. Fix by Katharine Berry. --- indra/llwindow/llopenglview-objc.mm | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'indra/llwindow') diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index ca00185dff..de159816e0 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -283,6 +283,14 @@ [[self inputContext] handleEvent:theEvent]; uint keycode = [theEvent keyCode]; callKeyDown(keycode, mModifiers); + + // OS X intentionally does not send us key-up information on cmd-key combinations. + // This behaviour is not a bug, and only applies to cmd-combinations (no others). + // Since SL assumes we receive those, we fake it here. + if (mModifiers & NSCommandKeyMask) + { + callKeyUp([theEvent keyCode], mModifiers); + } } - (void)flagsChanged:(NSEvent *)theEvent { -- cgit v1.2.3