Skip to content
Snippets Groups Projects
Commit 796d97d1 authored by Andrey Kleshchev's avatar Andrey Kleshchev
Browse files

SL-18384 Fix NSException for keyboard handling

Affects accent keys for diacritical marks
parent 0ffe9ff0
No related branches found
No related tags found
2 merge requests!3Update to main branch,!2Rebase onto current main branch
......@@ -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 &&
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment