diff options
author | Geenz <geenz@geenzo.com> | 2013-03-23 01:05:21 -0400 |
---|---|---|
committer | Geenz <geenz@geenzo.com> | 2013-03-23 01:05:21 -0400 |
commit | 6c200a94f705667201bcaf0753986da90a2748eb (patch) | |
tree | 9c0af3950c78f8d7fca44f53001870feefbe6271 /indra/llwindow | |
parent | 64c0455db568e6818c483785cff0fcd9cfa47aff (diff) |
Fix for command key presses + a letter not triggering keyUp. Fix by Katharine Berry.
Diffstat (limited to 'indra/llwindow')
-rw-r--r-- | indra/llwindow/llopenglview-objc.mm | 8 |
1 files changed, 8 insertions, 0 deletions
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 { |