diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 23:42:11 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-05-28 23:42:11 +0000 |
commit | 7c687b4d471e4f0847c3d720a66270df845e4f5f (patch) | |
tree | ef0be272df49aa165a8da5f7a5c966068b3a0dba /views/controls/textfield | |
parent | d5ce9f68f2cac24a08e62afd245357ff636a66d1 (diff) | |
download | chromium_src-7c687b4d471e4f0847c3d720a66270df845e4f5f.zip chromium_src-7c687b4d471e4f0847c3d720a66270df845e4f5f.tar.gz chromium_src-7c687b4d471e4f0847c3d720a66270df845e4f5f.tar.bz2 |
IE and Firefox always translate (alt+numpad 7) as an accelerator. We should too.
BUG=5372
TEST=Navigate somewhere, focus the omnibox, and hit alt+numpad 7. You should navigate to your home page (by default, the new tab page).
Review URL: http://codereview.chromium.org/113971
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17134 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/controls/textfield')
-rw-r--r-- | views/controls/textfield/textfield.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/views/controls/textfield/textfield.cc b/views/controls/textfield/textfield.cc index 68afc91..79237f8 100644 --- a/views/controls/textfield/textfield.cc +++ b/views/controls/textfield/textfield.cc @@ -197,13 +197,14 @@ bool Textfield::SkipDefaultKeyEventProcessing(const KeyEvent& e) { #if defined(OS_WIN) // TODO(hamaji): Figure out which keyboard combinations we need to add here, // similar to LocationBarView::SkipDefaultKeyEventProcessing. - if (e.GetCharacter() == VK_BACK) + const int c = e.GetCharacter(); + if (c == VK_BACK) return true; // We'll handle BackSpace ourselves. // We don't translate accelerators for ALT + NumPad digit, they are used for - // entering special characters. - if (e.IsAltDown() && - win_util::IsNumPadDigit(e.GetCharacter(), e.IsExtendedKey())) + // entering special characters. We do translate alt-home. + if (e.IsAltDown() && (c != VK_HOME) && + win_util::IsNumPadDigit(c, e.IsExtendedKey())) return true; #endif return false; |