Title: [245644] trunk/Source/WebCore
Revision
245644
Author
[email protected]
Date
2019-05-22 13:58:32 -0700 (Wed, 22 May 2019)

Log Message

WebKit does not generate an ESC key event for CMD+.
https://bugs.webkit.org/show_bug.cgi?id=198137
<rdar://problem/51038641>

Patch by Daniel Bates <[email protected]> on 2019-05-22
Reviewed by Brent Fulgham.

This patch maps the Command + '.' keystroke to the 'Escape'. This also requires a change to UIKit to properly pass
the key state to WebKit (see <rdar://problem/46431552>).

* platform/ios/WebEvent.mm:
(-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:withInputManagerHint:keyCode:isTabKey:]):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (245643 => 245644)


--- trunk/Source/WebCore/ChangeLog	2019-05-22 20:34:55 UTC (rev 245643)
+++ trunk/Source/WebCore/ChangeLog	2019-05-22 20:58:32 UTC (rev 245644)
@@ -1,3 +1,17 @@
+2019-05-22  Daniel Bates  <[email protected]>
+
+        WebKit does not generate an ESC key event for CMD+.
+        https://bugs.webkit.org/show_bug.cgi?id=198137
+        <rdar://problem/51038641>
+
+        Reviewed by Brent Fulgham.
+
+        This patch maps the Command + '.' keystroke to the 'Escape'. This also requires a change to UIKit to properly pass
+        the key state to WebKit (see <rdar://problem/46431552>).
+
+        * platform/ios/WebEvent.mm:
+        (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:withInputManagerHint:keyCode:isTabKey:]):
+
 2019-05-22  Ali Juma  <[email protected]>
 
         Intersection Observer: bounding client rect is wrong for an inline element

Modified: trunk/Source/WebCore/platform/ios/WebEvent.mm (245643 => 245644)


--- trunk/Source/WebCore/platform/ios/WebEvent.mm	2019-05-22 20:34:55 UTC (rev 245643)
+++ trunk/Source/WebCore/platform/ios/WebEvent.mm	2019-05-22 20:58:32 UTC (rev 245644)
@@ -193,6 +193,11 @@
     }
 
     if (!(_keyboardFlags & WebEventKeyboardInputModifierFlagsChanged)) {
+        // Map Command + . to Escape since Apple Smart Keyboards lack an Escape key.
+        if ([charactersIgnoringModifiers isEqualToString:@"."] && (modifiers & WebEventFlagMaskCommandKey)) {
+            keyCode = kHIDUsage_KeyboardEscape;
+            _modifierFlags &= ~WebEventFlagMaskCommandKey;
+        }
         _characters = [normalizedStringWithAppKitCompatibilityMapping(characters, keyCode) retain];
         _charactersIgnoringModifiers = [normalizedStringWithAppKitCompatibilityMapping(charactersIgnoringModifiers, keyCode) retain];
         _tabKey = tabKey;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to