[iOS] Key code is 0 for many hardware keyboard keys
[WebKit-https.git] / Source / WebKit / UIProcess / ios / WKContentViewInteraction.mm
index 603af17..27d9792 100644 (file)
@@ -3748,7 +3748,7 @@ static NSString *contentTypeFromFieldName(WebCore::AutofillFieldName fieldName)
                                                            modifiers:event._modifierFlags
                                                          isRepeating:(event._inputFlags & kUIKeyboardInputRepeat)
                                                            withFlags:event._inputFlags
-                                                             keyCode:0
+                                                             keyCode:event._hidEvent ? ((UIPhysicalKeyboardEvent *)event)._keyCode : 0
                                                             isTabKey:[event._modifiedInput isEqualToString:@"\t"]
                                                         characterSet:WebEventCharacterSetUnicode] autorelease];
     webEvent.uiEvent = event;