Index: chrome/views/accelerator.cc |
=================================================================== |
--- chrome/views/accelerator.cc (revision 10268) |
+++ chrome/views/accelerator.cc (working copy) |
@@ -52,7 +52,15 @@ |
std::wstring shortcut; |
if (!string_id) { |
// Our fallback is to try translate the key code to a regular char. |
- wchar_t key = LOWORD(::MapVirtualKeyW(key_code_, MAPVK_VK_TO_CHAR)); |
+ wchar_t key; |
+ // Special-case digits. Some keyboard layouts (e.g. French) |
+ // have characters other than digits assigned in an unshifted mode. |
+ // For display in the menu (e.g. Ctrl-0 for the default zoom level), we |
+ // still want to show digits. |
+ if (key_code_ >= '0' && key_code_ <= '9') |
+ key = key_code_; |
+ else |
+ key = LOWORD(::MapVirtualKeyW(key_code_, MAPVK_VK_TO_CHAR)); |
shortcut += key; |
} else { |
shortcut = l10n_util::GetString(string_id); |