Changeset 245644 in webkit


Ignore:
Timestamp:
May 22, 2019 1:58:32 PM (5 years ago)
Author:
commit-queue@webkit.org
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 <dabates@apple.com> 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:]):

Location:
trunk/Source/WebCore
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r245642 r245644  
     12019-05-22  Daniel Bates  <dabates@apple.com>
     2
     3        WebKit does not generate an ESC key event for CMD+.
     4        https://bugs.webkit.org/show_bug.cgi?id=198137
     5        <rdar://problem/51038641>
     6
     7        Reviewed by Brent Fulgham.
     8
     9        This patch maps the Command + '.' keystroke to the 'Escape'. This also requires a change to UIKit to properly pass
     10        the key state to WebKit (see <rdar://problem/46431552>).
     11
     12        * platform/ios/WebEvent.mm:
     13        (-[WebEvent initWithKeyEventType:timeStamp:characters:charactersIgnoringModifiers:modifiers:isRepeating:withFlags:withInputManagerHint:keyCode:isTabKey:]):
     14
    1152019-05-22  Ali Juma  <ajuma@chromium.org>
    216
  • trunk/Source/WebCore/platform/ios/WebEvent.mm

    r242915 r245644  
    194194
    195195    if (!(_keyboardFlags & WebEventKeyboardInputModifierFlagsChanged)) {
     196        // Map Command + . to Escape since Apple Smart Keyboards lack an Escape key.
     197        if ([charactersIgnoringModifiers isEqualToString:@"."] && (modifiers & WebEventFlagMaskCommandKey)) {
     198            keyCode = kHIDUsage_KeyboardEscape;
     199            _modifierFlags &= ~WebEventFlagMaskCommandKey;
     200        }
    196201        _characters = [normalizedStringWithAppKitCompatibilityMapping(characters, keyCode) retain];
    197202        _charactersIgnoringModifiers = [normalizedStringWithAppKitCompatibilityMapping(charactersIgnoringModifiers, keyCode) retain];
Note: See TracChangeset for help on using the changeset viewer.