Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(281)

Unified Diff: chrome/browser/views/location_bar_view.cc

Issue 113971: IE and Firefox always translate (alt+numpad 7) as an accelerator. We should ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | views/controls/textfield/textfield.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/views/location_bar_view.cc
===================================================================
--- chrome/browser/views/location_bar_view.cc (revision 17014)
+++ chrome/browser/views/location_bar_view.cc (working copy)
@@ -891,8 +891,9 @@
#if defined(OS_WIN)
int c = e.GetCharacter();
// We don't process ALT + numpad digit as accelerators, they are used for
- // entering special characters.
- if (e.IsAltDown() && win_util::IsNumPadDigit(c, e.IsExtendedKey()))
+ // entering special characters. We do translate alt-home.
+ if (e.IsAltDown() && (c != VK_HOME) &&
+ win_util::IsNumPadDigit(c, e.IsExtendedKey()))
return true;
// Skip accelerators for key combinations omnibox wants to crack. This list
@@ -903,27 +904,27 @@
// accelerators (e.g., F5 for reload the page should work even when the
// Omnibox gets focused).
switch (c) {
- case VK_RETURN:
- return true;
+ case VK_RETURN:
+ return true;
- case VK_UP:
- case VK_DOWN:
- return !e.IsAltDown();
+ case VK_UP:
+ case VK_DOWN:
+ return !e.IsAltDown();
- case VK_DELETE:
- case VK_INSERT:
- return !e.IsAltDown() && e.IsShiftDown();
+ case VK_DELETE:
+ case VK_INSERT:
+ return !e.IsAltDown() && e.IsShiftDown();
- case 'X':
- case 'V':
- return !e.IsAltDown() && e.IsControlDown();
+ case 'X':
+ case 'V':
+ return !e.IsAltDown() && e.IsControlDown();
- case VK_BACK:
- case 0xbb:
- return true;
+ case VK_BACK:
+ case 0xbb:
+ return true;
- default:
- return false;
+ default:
+ return false;
}
#else
NOTIMPLEMENTED();
« no previous file with comments | « no previous file | views/controls/textfield/textfield.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698