From 591a792d1a074fefdb9321f547b9209ebfc9e85a Mon Sep 17 00:00:00 2001 From: "derat@chromium.org" Date: Fri, 29 Oct 2010 22:02:05 +0000 Subject: chromeos: Add Ctrl-/ accelerator for help app. This adds Ctrl-/ and Ctrl-Shift-/ (Ctrl-?) accelerators for the help command in Views GTK, updates the help URL for Chrome OS, and makes us print "/" explicitly in accelerator descriptions instead of "slash" (the string we get from GDK). BUG=chromium-os:7835 TEST=built and ran it Review URL: http://codereview.chromium.org/4156004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@64495 0039d316-1c4b-4281-b951-d872f2087c98 --- views/accelerator.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'views') diff --git a/views/accelerator.cc b/views/accelerator.cc index 6b80cc4..6eeddb5 100644 --- a/views/accelerator.cc +++ b/views/accelerator.cc @@ -84,7 +84,15 @@ std::wstring Accelerator::GetShortcutText() const { key = LOWORD(::MapVirtualKeyW(key_code_, MAPVK_VK_TO_CHAR)); shortcut += key; #elif defined(OS_LINUX) - gchar* name = gdk_keyval_name(gdk_keyval_to_lower(key_code_)); + const gchar* name = NULL; + switch (key_code_) { + case app::VKEY_OEM_2: + name = static_cast("/"); + break; + default: + name = gdk_keyval_name(gdk_keyval_to_lower(key_code_)); + break; + } if (name) { if (name[0] != 0 && name[1] == 0) shortcut += static_cast(g_ascii_toupper(name[0])); -- cgit v1.1