Chromium Code Reviews
DescriptionForward edit commands to be executed for shortcuts which aren't handled by
javascript.
As a result, cocoa keybindings work.
The approach:
We instantiate a vanilla NSResponder, call interpretKeyEvents on it, and
record all of the selectors passed into doCommandBySelector while
interpreting the key event. The selectors are converted into edit commands
which can be passed to the render process.
Caveats:
- Shortcuts involving a sequence of key combinations (chords) don't work,
because we instantiate a new responder for each event.
- We ignore key combinations that don't include a modifier (ctrl, cmd, alt)
because this was causing strange behavior (e.g. tab always inserted a tab
rather than moving to the next field on the page).
BUG=12538
TEST=go to a page with a text field. make sure that ctrl-a moves cursor to beginning of line, ctrl-e goes to the end, ctrl-d deletes to the right, ctrl-h to the left, etc
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=26694
Patch Set 1 #Patch Set 2 : '' #
Total comments: 20
Patch Set 3 : '' #Patch Set 4 : '' #
Total comments: 1
Messages
Total messages: 5 (0 generated)
|
|||||||||||||||||||||||||||||||||||||