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

Unified Diff: chrome/browser/resources/chromeos/keyboard_overlay.js

Issue 10825026: Make accelerators not to work when the keyboard overlay is shown. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 5 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 | « ash/wm/partial_screenshot_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/resources/chromeos/keyboard_overlay.js
diff --git a/chrome/browser/resources/chromeos/keyboard_overlay.js b/chrome/browser/resources/chromeos/keyboard_overlay.js
index 2a90c1b15772928ebae791d5ea31ccbdcbcf070b..15aa6d32b4bb899dbcc48aa2a2b70abfd3b05d2f 100644
--- a/chrome/browser/resources/chromeos/keyboard_overlay.js
+++ b/chrome/browser/resources/chromeos/keyboard_overlay.js
@@ -308,20 +308,6 @@ function getKeyLabel(keyData, modifiers) {
}
/**
- * Returns the label corresponding to the key code.
- * @param {string} keyCode Key code
- * @return {string} Label of the key code.
- */
-function getKeyLabelFromKeyCode(keyCode) {
- if ('0'.charCodeAt(0) <= keyCode && keyCode <= 'Z'.charCodeAt(0))
- return String.fromCharCode(keyCode).toLowerCase();
- var label = KEYCODE_TO_LABEL[keyCode];
- if (label)
- return label;
- return '';
-}
-
-/**
* Returns a normalized string used for a key of shortcutData.
*
* Examples:
@@ -448,15 +434,7 @@ function handleKeyEvent(e) {
if (!getKeyboardOverlayId()) {
return;
}
- var label = getKeyLabelFromKeyCode(e.keyCode);
var modifiers = getModifiers(e);
- var shortcutData = getShortcutData();
- var action = getAction(label, modifiers);
- if (e.type == 'keydown' &&
- (contains(CLOSE_LABELS, label) || shortcutData[action])) {
- chrome.send('DialogClose');
- return;
- }
update(modifiers);
KeyboardOverlayAccessibilityHelper.maybeSpeakAllShortcuts(modifiers);
e.preventDefault();
« no previous file with comments | « ash/wm/partial_screenshot_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698