diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-12-14 20:49:56 +0200 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2022-12-14 20:55:22 +0200 |
commit | 796d97d1903fb27628a47db447f3463219b649bd (patch) | |
tree | 9bc74df06b6211563d6a48bb13597aa9654aabc7 /indra/llwindow | |
parent | 0ffe9ff0ae610a568b01b3d8d9684b8b6aeecdf2 (diff) |
SL-18384 Fix NSException for keyboard handling
Affects accent keys for diacritical marks
Diffstat (limited to 'indra/llwindow')
-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 && |