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

Unified Diff: third_party/google_input_tools/third_party/closure_library/closure/goog/events/keycodes.js

Issue 1257313003: Update Google Input Tools (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Free up grd resources. Created 5 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
Index: third_party/google_input_tools/third_party/closure_library/closure/goog/events/keycodes.js
diff --git a/third_party/google_input_tools/third_party/closure_library/closure/goog/events/keycodes.js b/third_party/google_input_tools/third_party/closure_library/closure/goog/events/keycodes.js
index d0ad82c4958ec5e277303586afb8d29baa1b1708..4fccde6de2d69bf24ccf75e58447f07aed7524e5 100644
--- a/third_party/google_input_tools/third_party/closure_library/closure/goog/events/keycodes.js
+++ b/third_party/google_input_tools/third_party/closure_library/closure/goog/events/keycodes.js
@@ -23,6 +23,8 @@ goog.provide('goog.events.KeyCodes');
goog.require('goog.userAgent');
+goog.forwardDeclare('goog.events.BrowserEvent');
+
/**
* Key codes for common characters.
@@ -152,6 +154,10 @@ goog.events.KeyCodes = {
MAC_WK_CMD_RIGHT: 93, // WebKit Right Command key fired, different from META
WIN_IME: 229,
+ // "Reserved for future use". Some programs (e.g. the SlingPlayer 2.4 ActiveX
+ // control) fire this as a hacky way to disable screensavers.
+ VK_NONAME: 252,
+
// We've seen users whose machines fire this keycode at regular one
// second intervals. The common thread among these users is that
// they're all using Dell Inspiron laptops, so we suspect that this
@@ -201,6 +207,7 @@ goog.events.KeyCodes.isTextModifyingKeyEvent = function(e) {
case goog.events.KeyCodes.SCROLL_LOCK:
case goog.events.KeyCodes.SHIFT:
case goog.events.KeyCodes.UP:
+ case goog.events.KeyCodes.VK_NONAME:
case goog.events.KeyCodes.WIN_KEY:
case goog.events.KeyCodes.WIN_KEY_RIGHT:
return false;
@@ -242,7 +249,7 @@ goog.events.KeyCodes.isTextModifyingKeyEvent = function(e) {
*/
goog.events.KeyCodes.firesKeyPressEvent = function(keyCode, opt_heldKeyCode,
opt_shiftKey, opt_ctrlKey, opt_altKey) {
- if (!goog.userAgent.IE &&
+ if (!goog.userAgent.IE && !goog.userAgent.EDGE &&
!(goog.userAgent.WEBKIT && goog.userAgent.isVersionOrHigher('525'))) {
return true;
}
@@ -271,7 +278,8 @@ goog.events.KeyCodes.firesKeyPressEvent = function(keyCode, opt_heldKeyCode,
}
// Some keys with Ctrl/Shift do not issue keypress in WEBKIT.
- if (goog.userAgent.WEBKIT && opt_ctrlKey && opt_shiftKey) {
+ if ((goog.userAgent.WEBKIT || goog.userAgent.EDGE) &&
+ opt_ctrlKey && opt_shiftKey) {
switch (keyCode) {
case goog.events.KeyCodes.BACKSLASH:
case goog.events.KeyCodes.OPEN_SQUARE_BRACKET:
@@ -299,7 +307,7 @@ goog.events.KeyCodes.firesKeyPressEvent = function(keyCode, opt_heldKeyCode,
case goog.events.KeyCodes.ENTER:
return true;
case goog.events.KeyCodes.ESC:
- return !goog.userAgent.WEBKIT;
+ return !(goog.userAgent.WEBKIT || goog.userAgent.EDGE);
}
return goog.events.KeyCodes.isCharacterKey(keyCode);
@@ -330,7 +338,7 @@ goog.events.KeyCodes.isCharacterKey = function(keyCode) {
}
// Safari sends zero key code for non-latin characters.
- if (goog.userAgent.WEBKIT && keyCode == 0) {
+ if ((goog.userAgent.WEBKIT || goog.userAgent.EDGE) && keyCode == 0) {
return true;
}

Powered by Google App Engine
This is Rietveld 408576698