Changeset 50887 in webkit


Ignore:
Timestamp:
Nov 12, 2009 10:46:20 AM (14 years ago)
Author:
eric@webkit.org
Message:

2009-11-12 Nicolas Weber <thakis@chromium.org>

Reviewed by Dimitri Glazkov.

Send |keypress()| events for keys with cmd down, like safari.
Test: Hit cmd-shift-a on unixpapa.com/js/testkey.html , should show a
keypress() event.

  • src/mac/WebInputEventFactory.mm: (WebKit::WebInputEventFactory::keyboardEvent):
Location:
trunk/WebKit/chromium
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/chromium/ChangeLog

    r50849 r50887  
     12009-11-12  Nicolas Weber  <thakis@chromium.org>
     2
     3        Reviewed by Dimitri Glazkov.
     4
     5        Send |keypress()| events for keys with cmd down, like safari.
     6        Test: Hit cmd-shift-a on unixpapa.com/js/testkey.html , should show a
     7        keypress() event.
     8
     9        * src/mac/WebInputEventFactory.mm:
     10        (WebKit::WebInputEventFactory::keyboardEvent):
     11
    1122009-11-11  Jeremy Orlow  <jorlow@chromium.org>
    213
  • trunk/WebKit/chromium/src/mac/WebInputEventFactory.mm

    r50750 r50887  
    948948    result.unmodifiedText[0] = character;
    949949
    950     // Windows and Linux set |isSystemKey| if alt is down. WebKit looks at this
    951     // flag to decide if it should handle a key or not. E.g. alt-left/right
    952     // shouldn't be used by WebKit to scroll the current page, because we want
    953     // to get that key back for it to do history navigation. Hence, the
    954     // corresponding situation on OS X is to set this for cmd key presses.
    955     if (result.modifiers & WebInputEvent::MetaKey)
    956         result.isSystemKey = true;
     950    // Do not set |isSystemKey| in this constructor. This constructor is used
     951    // to build key events that eventually become js |keypress()| events, which
     952    // do not fire if |isSystemKey| is set. Since we trigger shortcuts after
     953    // |keydown()|, it is ok to not set this anyway.
    957954
    958955    return result;
Note: See TracChangeset for help on using the changeset viewer.