diff options
author | klink@google.com <klink@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-26 18:21:24 +0000 |
---|---|---|
committer | klink@google.com <klink@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-08-26 18:21:24 +0000 |
commit | 1881f514b3d764da8c76861c5fc90d954675579c (patch) | |
tree | ccfb6e8d5d1f454f6983604f497e7c20c108f442 /chrome/views/base_button.cc | |
parent | 46c62a04ce7d06f46d85d8ed4c80dac96ec31009 (diff) | |
download | chromium_src-1881f514b3d764da8c76861c5fc90d954675579c.zip chromium_src-1881f514b3d764da8c76861c5fc90d954675579c.tar.gz chromium_src-1881f514b3d764da8c76861c5fc90d954675579c.tar.bz2 |
Extends the toolbar keyboard support. Adds skipping of unavailable elements of the toolbar, to accomodate for quicker keyboard traversal. Fixes tooltip display on initial focusing of the toolbar. Also fixes the support for VK_SPACE and VK_ENTER.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@1388 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/views/base_button.cc')
-rw-r--r-- | chrome/views/base_button.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/chrome/views/base_button.cc b/chrome/views/base_button.cc index 50359a2..59b49ef 100644 --- a/chrome/views/base_button.cc +++ b/chrome/views/base_button.cc @@ -224,7 +224,7 @@ void BaseButton::NotifyClick(int mouse_event_flags) { bool BaseButton::OnKeyPressed(const KeyEvent& e) { if (state_ != BS_DISABLED) { - if ((e.GetCharacter() == L' ') || (e.GetCharacter() == L'\n')) { + if ((e.GetCharacter() == VK_SPACE) || (e.GetCharacter() == VK_RETURN)) { SetState(BS_PUSHED); return true; } @@ -234,7 +234,7 @@ bool BaseButton::OnKeyPressed(const KeyEvent& e) { bool BaseButton::OnKeyReleased(const KeyEvent& e) { if (state_ != BS_DISABLED) { - if ((e.GetCharacter() == L' ') || (e.GetCharacter() == L'\n')) { + if ((e.GetCharacter() == VK_SPACE) || (e.GetCharacter() == VK_RETURN)) { SetState(BS_NORMAL); NotifyClick(0); return true; |