diff options
author | Geenz <geenz@geenzo.com> | 2013-06-27 13:48:44 -0400 |
---|---|---|
committer | Geenz <geenz@geenzo.com> | 2013-06-27 13:48:44 -0400 |
commit | 860b86e3d1c61c18be99301ea1c5027058a8353d (patch) | |
tree | c1821622735a65eebce63aa1d23cd0d297aab871 /indra | |
parent | 90e511bbdf9e08059180218e47350e4d2b431b68 (diff) |
Fix for down key presses not opening up the IME character selection window, and inadvertently being handled while marked text is selected.
Diffstat (limited to 'indra')
-rw-r--r-- | indra/llwindow/llopenglview-objc.mm | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index aa7df2c985..7803d78862 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -316,12 +316,16 @@ attributedStringInfo getSegments(NSAttributedString *str) - (void) keyDown:(NSEvent *)theEvent { uint keycode = [theEvent keyCode]; - bool acceptsText = callKeyDown(keycode, mModifiers); + bool acceptsText = mHasMarkedText ? false : callKeyDown(keycode, mModifiers); if (acceptsText && !mMarkedTextAllowed && ![(LLAppDelegate*)[NSApp delegate] romanScript] && [[theEvent charactersIgnoringModifiers] characterAtIndex:0] != NSDeleteCharacter && - [[theEvent charactersIgnoringModifiers] characterAtIndex:0] != NSBackspaceCharacter) + [[theEvent charactersIgnoringModifiers] characterAtIndex:0] != NSBackspaceCharacter && + [[theEvent charactersIgnoringModifiers] characterAtIndex:0] != NSDownArrowFunctionKey && + [[theEvent charactersIgnoringModifiers] characterAtIndex:0] != NSUpArrowFunctionKey && + [[theEvent charactersIgnoringModifiers] characterAtIndex:0] != NSLeftArrowFunctionKey && + [[theEvent charactersIgnoringModifiers] characterAtIndex:0] != NSRightArrowFunctionKey) { [(LLAppDelegate*)[NSApp delegate] showInputWindow:true withEvent:theEvent]; } else @@ -339,7 +343,7 @@ attributedStringInfo getSegments(NSAttributedString *str) // 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) + if (mModifiers & NSCommandKeyMask && !mHasMarkedText) { callKeyUp([theEvent keyCode], mModifiers); } |