Summary: | [WINCE] Implement EditorClient::handleKeyboardEvent | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Patrick R. Gansterer <paroga> | ||||
Component: | Platform | Assignee: | Patrick R. Gansterer <paroga> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | aroben, commit-queue | ||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | Other | ||||||
OS: | Other | ||||||
Attachments: |
|
Description
Patrick R. Gansterer
2010-10-22 03:09:56 PDT
Created attachment 71541 [details]
Patch
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. Comment on attachment 71541 [details] Patch Clearing flags on attachment: 71541 Committed r70313: <http://trac.webkit.org/changeset/70313> All reviewed patches have been landed. Closing bug. |