fix crash when pressing dead keys on physical keyboard

This commit is contained in:
Jesús A. Álvarez 2020-04-03 12:35:55 +02:00
parent 3af32e9acc
commit 4d397d9c94

View File

@ -82,7 +82,7 @@ static int8_t usb_to_adb_scancode[] = {
}
- (void)_updateCapsLockStatus:(UIPhysicalKeyboardEvent *)event {
if (event._modifierFlags == 0 && event._unmodifiedInput.length == 1) {
if (event._modifierFlags == 0 && event._unmodifiedInput.length == 1 && event._modifiedInput.length == 1) {
unichar unmodifiedChar = [event._unmodifiedInput characterAtIndex:0];
unichar modifiedChar = [event._modifiedInput characterAtIndex:0];
if ([[NSCharacterSet lowercaseLetterCharacterSet] characterIsMember:unmodifiedChar]) {