diff options
author | Geenz <geenz@geenzo.com> | 2013-06-17 07:52:19 -0400 |
---|---|---|
committer | Geenz <geenz@geenzo.com> | 2013-06-17 07:52:19 -0400 |
commit | f8abfb63c32a0926a393a4359c6f387482d2448e (patch) | |
tree | a16e1d04cdceaf405d73ca8bc3560a62f3f9f673 /indra/llwindow/llopenglview-objc.mm | |
parent | 0af636e63270047a61ced51b7f3b22f45003120a (diff) |
This brings us to feature parity with CHUI for IME support.
Diffstat (limited to 'indra/llwindow/llopenglview-objc.mm')
-rw-r--r-- | indra/llwindow/llopenglview-objc.mm | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 17e8c3e3cc..b431321da6 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -313,12 +313,13 @@ attributedStringInfo getSegments(NSAttributedString *str) - (void) keyDown:(NSEvent *)theEvent { - [[self inputContext] handleEvent:theEvent]; if (!mHasMarkedText) { uint keycode = [theEvent keyCode]; - callKeyDown(keycode, mModifiers); - + if (callKeyDown(keycode, mModifiers)) + { + [[self inputContext] handleEvent:theEvent]; + } // 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. @@ -461,12 +462,11 @@ attributedStringInfo getSegments(NSAttributedString *str) - (void)insertText:(id)aString replacementRange:(NSRange)replacementRange { - bool success = false; if (!mHasMarkedText) { for (NSInteger i = 0; i < [aString length]; i++) { - success = callUnicodeCallback([aString characterAtIndex:i], mModifiers); + callUnicodeCallback([aString characterAtIndex:i], mModifiers); } } else { // We may never get this point since unmarkText may be called before insertText ever gets called once we submit our text. @@ -475,12 +475,10 @@ attributedStringInfo getSegments(NSAttributedString *str) for (NSInteger i = 0; i < [aString length]; i++) { - success = handleUnicodeCharacter([aString characterAtIndex:i]); + handleUnicodeCharacter([aString characterAtIndex:i]); } mHasMarkedText = FALSE; } - - NSLog(@"Successful text input: %d", success); } - (void) insertNewline:(id)sender |