diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-12-14 20:49:56 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-12-16 16:31:42 +0200 |
commit | 07baa83ef273f41135b886363b34c423a566bffc (patch) | |
tree | 18c6a1d963f6b5a380603f93467237a1c91074ab | |
parent | f836194516d3ddf0bb8d63bf4b58b6add6387d2d (diff) |
SL-18384 Fix NSException for keyboard handling
Affects accent keys for diacritical marks
-rw-r--r-- | indra/llwindow/llopenglview-objc.mm | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 049226db65..7936245744 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -495,7 +495,12 @@ attributedStringInfo getSegments(NSAttributedString *str) // e.g. OS Window for upload something or Input Window... // mModifiers instance variable is for insertText: or insertText:replacementRange: (by Pell Smit) mModifiers = [theEvent modifierFlags]; - unichar ch = [[theEvent charactersIgnoringModifiers] characterAtIndex:0]; + NSString *str_no_modifiers = [theEvent charactersIgnoringModifiers]; + unichar ch = 0; + if (str_no_modifiers.length) + { + ch = [str_no_modifiers characterAtIndex:0]; + } bool acceptsText = mHasMarkedText ? false : callKeyDown(&eventData, keycode, mModifiers, ch); if (acceptsText && |