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

Unified Diff: ui/file_manager/video_player/js/video_player.js

Issue 1994563002: Remove the use of KeyEvent.keyIdentifier. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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: ui/file_manager/video_player/js/video_player.js
diff --git a/ui/file_manager/video_player/js/video_player.js b/ui/file_manager/video_player/js/video_player.js
index b7defccbbbcb18112b90a4f5da3d86c0aa3e9a4b..48a7d1c8a5bd7f2f524354bb1388bf30c4e4da83 100644
--- a/ui/file_manager/video_player/js/video_player.js
+++ b/ui/file_manager/video_player/js/video_player.js
@@ -30,50 +30,50 @@ function FullWindowVideoControls(
this.onFullScreenChanged.bind(this, false));
document.addEventListener('keydown', function(e) {
this.inactivityWatcher_.kick();
- switch (util.getKeyModifiers(e) + e.keyIdentifier) {
+ switch (util.getKeyModifiers(e) + e.key) {
// Handle debug shortcut keys.
- case 'Ctrl-Shift-U+0049': // Ctrl+Shift+I
+ case 'Ctrl-Shift-I': // Ctrl+Shift+I
chrome.fileManagerPrivate.openInspector('normal');
break;
- case 'Ctrl-Shift-U+004A': // Ctrl+Shift+J
+ case 'Ctrl-Shift-J': // Ctrl+Shift+J
chrome.fileManagerPrivate.openInspector('console');
break;
- case 'Ctrl-Shift-U+0043': // Ctrl+Shift+C
+ case 'Ctrl-Shift-C': // Ctrl+Shift+C
chrome.fileManagerPrivate.openInspector('element');
break;
- case 'Ctrl-Shift-U+0042': // Ctrl+Shift+B
+ case 'Ctrl-Shift-B': // Ctrl+Shift+B
chrome.fileManagerPrivate.openInspector('background');
break;
- case 'U+0020': // Space
- case 'U+004B': // K
+ case ' ': // Space
+ case 'k':
case 'MediaPlayPause':
if (!e.target.classList.contains('menu-button'))
this.togglePlayStateWithFeedback();
break;
- case 'U+001B': // Escape
+ case 'Escape':
util.toggleFullScreen(
chrome.app.window.current(),
false); // Leave the full screen mode.
break;
- case 'MediaNextTrack':
+ case 'MediaTrackNext':
player.advance_(1);
break;
- case 'MediaPreviousTrack':
+ case 'MediaTrackPrevious':
player.advance_(0);
break;
- case 'Right':
+ case 'ArrowRight':
if (!e.target.classList.contains('volume'))
this.smallSkip(true);
break;
- case 'Left':
+ case 'ArrowLeft':
if (!e.target.classList.contains('volume'))
this.smallSkip(false);
break;
- case 'U+004C': // L
+ case 'l':
this.bigSkip(true);
break;
- case 'U+004A': // J
+ case 'j':
this.bigSkip(false);
break;
case 'MediaStop':

Powered by Google App Engine
This is Rietveld 408576698