Comment #49 on issue 12557 by [email protected]: Back/forward via  
keyboard shortcuts (command-left/right and backspace/delete) not working
http://code.google.com/p/chromium/issues/detail?id=12557

The following revision refers to this bug:
     http://src.chromium.org/viewvc/chrome?view=rev&revision=28505

------------------------------------------------------------------------
r28505 | [email protected] | 2009-10-08 18:26:20 -0700 (Thu, 08 Oct 2009)  
| 19 lines
Changed paths:
    M  
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/cocoa/chrome_browser_window.h?r1=28505&r2=28504
    M  
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/cocoa/chrome_browser_window.mm?r1=28505&r2=28504
    M  
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/global_keyboard_shortcuts_mac.h?r1=28505&r2=28504
    M  
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/global_keyboard_shortcuts_mac.mm?r1=28505&r2=28504
    M  
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/global_keyboard_shortcuts_mac_unittest.cc?r1=28505&r2=28504
    M  
http://src.chromium.org/viewvc/chrome/trunk/src/chrome/browser/tab_contents/tab_contents_view_mac.mm?r1=28505&r2=28504

Support cmd-left/right for history.

Since cmd-left/right should not do history if the omnibox is focussed, but  
cmd-1-9 should work if the omnibox is focussed, we have to differentiate  
between window- and browser-level shortcuts.

(Because performKeyEquivalent bubbles up from the window -- and if we let  
it bubble up to the omnibox, then the omnibox handles cmd-left/right just  
fine, but it swallows cmd-1 and doesn't give us a chance to intercept this.  
That means cmd-left doesn't work if you hit cmd-l tab, which focusses  
something that's neither omnibox nor tab contents. This behavior is  
consistent with safari and camino, and I think it's the best we can do  
without rewriting event dispatching.

Camino does this here:
http://mxr.mozilla.org/seamonkey/source/camino/src/browser/BrowserWindow.mm#128
http://mxr.mozilla.org/seamonkey/source/camino/src/browser/BrowserWrapper.mm#1031

)

BUG=12557
TEST=Focus text box on a web page. cmd-left/right should go to start/end of  
text. Focus webpage background. cmd-left/right \
should go history back/forward. When the omnibox is focussed,  
cmd-left/right should move the caret, but cmd-1-9 should still switch tabs.

Note that shortcuts still don't work if a subwindow (e.g. find bar,  
bookmark bubble) has focus.

Review URL: http://codereview.chromium.org/251069
------------------------------------------------------------------------


--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--~--~---------~--~----~------------~-------~--~----~
Automated mail from issue updates at http://crbug.com/
Subscription options: http://groups.google.com/group/chromium-bugs
-~----------~----~----~----~------~----~------~--~---

Reply via email to