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

Unified Diff: chrome/browser/ui/views/keyboard_overlay_dialog_view.cc

Issue 10538098: Disable Shift+Alt while KeyboardOverlayDialogView is shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comment Created 8 years, 6 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/keyboard_overlay_dialog_view.cc
diff --git a/chrome/browser/ui/views/keyboard_overlay_dialog_view.cc b/chrome/browser/ui/views/keyboard_overlay_dialog_view.cc
index db2149c90667504d862c9ff35887e3ce9eb34bbf..1d682b05b068d11ebd7b7aa346bed4c0f6250a7f 100644
--- a/chrome/browser/ui/views/keyboard_overlay_dialog_view.cc
+++ b/chrome/browser/ui/views/keyboard_overlay_dialog_view.cc
@@ -15,6 +15,10 @@
#include "ui/views/widget/widget.h"
#include "ui/web_dialogs/web_dialog_delegate.h"
+#if defined(OS_CHROMEOS)
+#include "chrome/browser/chromeos/input_method/input_method_manager.h"
+#endif
+
using ui::WebDialogDelegate;
namespace {
@@ -36,6 +40,12 @@ void KeyboardOverlayDialogView::ShowDialog() {
if (g_instance)
return;
+#if defined(OS_CHROMEOS)
+ // Temporarily disable all accelerators for IME switching including Shift+Alt
+ // since the user might press Shift+Alt to remember an accelerator that starts
+ // with Shift+Alt (e.g. Shift+Alt+Tab for moving focus backwards).
+ chromeos::input_method::InputMethodManager::GetInstance()->DisableHotkeys();
+#endif
KeyboardOverlayDelegate* delegate = new KeyboardOverlayDelegate(
l10n_util::GetStringUTF16(IDS_KEYBOARD_OVERLAY_TITLE));
KeyboardOverlayDialogView* view = new KeyboardOverlayDialogView(
@@ -64,5 +74,9 @@ void KeyboardOverlayDialogView::ShowDialog() {
}
void KeyboardOverlayDialogView::WindowClosing() {
+#if defined(OS_CHROMEOS)
+ // Re-enable the IME accelerators. See the comment in ShowDialog() above.
+ chromeos::input_method::InputMethodManager::GetInstance()->EnableHotkeys();
+#endif
g_instance = NULL;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698