| Index: ui/file_manager/audio_player/js/audio_player.js
|
| diff --git a/ui/file_manager/audio_player/js/audio_player.js b/ui/file_manager/audio_player/js/audio_player.js
|
| index a00929193a904480abad9b7a9b6579a9ed8576f7..1646ff1a135ab8395234f4aed7f98fceea8b38f0 100644
|
| --- a/ui/file_manager/audio_player/js/audio_player.js
|
| +++ b/ui/file_manager/audio_player/js/audio_player.js
|
| @@ -67,6 +67,7 @@ function AudioPlayer(container) {
|
| this.onExternallyUnmounted_.bind(this));
|
|
|
| window.addEventListener('resize', this.onResize_.bind(this));
|
| + document.addEventListener('keydown', this.onKeyDown_.bind(this));
|
|
|
| // Show the window after DOM is processed.
|
| var currentWindow = chrome.app.window.current();
|
| @@ -291,6 +292,30 @@ AudioPlayer.prototype.onResize_ = function(event) {
|
| }
|
| };
|
|
|
| +/**
|
| + * Handles keydown event to open inspector with shortcut keys.
|
| + *
|
| + * @param {Event} event KeyDown event.
|
| + * @private
|
| + */
|
| +AudioPlayer.prototype.onKeyDown_ = function(event) {
|
| + switch (util.getKeyModifiers(event) + event.keyIdentifier) {
|
| + // Handle debug shortcut keys.
|
| + case 'Ctrl-Shift-U+0049': // Ctrl+Shift+I
|
| + chrome.fileManagerPrivate.openInspector('normal');
|
| + break;
|
| + case 'Ctrl-Shift-U+004A': // Ctrl+Shift+J
|
| + chrome.fileManagerPrivate.openInspector('console');
|
| + break;
|
| + case 'Ctrl-Shift-U+0043': // Ctrl+Shift+C
|
| + chrome.fileManagerPrivate.openInspector('element');
|
| + break;
|
| + case 'Ctrl-Shift-U+0042': // Ctrl+Shift+B
|
| + chrome.fileManagerPrivate.openInspector('background');
|
| + break;
|
| + }
|
| +};
|
| +
|
| /* Keep the below constants in sync with the CSS. */
|
|
|
| /**
|
|
|