WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
48118
[WINCE] Implement EditorClient::handleKeyboardEvent
https://bugs.webkit.org/show_bug.cgi?id=48118
Summary
[WINCE] Implement EditorClient::handleKeyboardEvent
Patrick R. Gansterer
Reported
2010-10-22 03:09:56 PDT
see patch
Attachments
Patch
(13.90 KB, patch)
2010-10-22 03:14 PDT
,
Patrick R. Gansterer
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Patrick R. Gansterer
Comment 1
2010-10-22 03:14:50 PDT
Created
attachment 71541
[details]
Patch
Adam Roben (:aroben)
Comment 2
2010-10-22 09:40:23 PDT
Comment on
attachment 71541
[details]
Patch View in context:
https://bugs.webkit.org/attachment.cgi?id=71541&action=review
> WebKit/wince/WebCoreSupport/EditorClientWinCE.cpp:339 > + for (unsigned i = 0; i < _countof(keyDownEntries); i++) > + keyDownCommandsMap->set(keyDownEntries[i].modifiers << 16 | keyDownEntries[i].virtualKey, keyDownEntries[i].name); > + > + for (unsigned i = 0; i < _countof(keyPressEntries); i++) > + keyPressCommandsMap->set(keyPressEntries[i].modifiers << 16 | keyPressEntries[i].charCode, keyPressEntries[i].name); > + } > + > + unsigned modifiers = 0; > + if (event->shiftKey()) > + modifiers |= ShiftKey; > + if (event->altKey()) > + modifiers |= AltKey; > + if (event->ctrlKey()) > + modifiers |= CtrlKey; > + > + if (event->type() == eventNames().keydownEvent) { > + int mapKey = modifiers << 16 | event->keyCode(); > + return mapKey ? keyDownCommandsMap->get(mapKey) : 0; > + } > + > + int mapKey = modifiers << 16 | event->charCode(); > + return mapKey ? keyPressCommandsMap->get(mapKey) : 0; > +} > +
It would be nice if we had a function to take (modifiers, key/charCode) and turn it into a HashMap key.
WebKit Commit Bot
Comment 3
2010-10-22 09:58:11 PDT
Comment on
attachment 71541
[details]
Patch Clearing flags on attachment: 71541 Committed
r70313
: <
http://trac.webkit.org/changeset/70313
>
WebKit Commit Bot
Comment 4
2010-10-22 09:58:15 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug