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

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/ShortcutRegistry.js

Issue 2033403005: Eradicate keyIndentifier from devtools/* (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Call KeyCodeToKeyIdentifier for unhandle key events Created 4 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
Index: third_party/WebKit/Source/devtools/front_end/ui/ShortcutRegistry.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/ShortcutRegistry.js b/third_party/WebKit/Source/devtools/front_end/ui/ShortcutRegistry.js
index ae3e4b3622630a6b86e95eec201f592c56004c31..604bf2cfc493402f94174c142da0822c82dbe14e 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/ShortcutRegistry.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/ShortcutRegistry.js
@@ -76,15 +76,15 @@ WebInspector.ShortcutRegistry.prototype = {
*/
handleShortcut: function(event)
{
- this.handleKey(WebInspector.KeyboardShortcut.makeKeyFromEvent(event), event.keyIdentifier, event);
+ this.handleKey(WebInspector.KeyboardShortcut.makeKeyFromEvent(event), event.key, event);
},
/**
* @param {number} key
- * @param {string} keyIdentifier
+ * @param {string} domKey
* @param {!KeyboardEvent=} event
*/
- handleKey: function(key, keyIdentifier, event)
+ handleKey: function(key, domKey, event)
{
var keyModifiers = key >> 8;
var actions = this._applicableActions(key);
@@ -123,7 +123,7 @@ WebInspector.ShortcutRegistry.prototype = {
*/
function isPossiblyInputKey()
{
- if (!event || !WebInspector.isEditing() || /^F\d+|Control|Shift|Alt|Meta|Win|U\+001B$/.test(keyIdentifier))
+ if (!event || !WebInspector.isEditing() || /^F\d+|Control|Shift|Alt|Meta|Escape|Win|U\+001B$/.test(domKey))
return false;
if (!keyModifiers)

Powered by Google App Engine
This is Rietveld 408576698