diff --git a/web/app.js b/web/app.js index 78aacbc98357f..8261040c0de87 100644 --- a/web/app.js +++ b/web/app.js @@ -2571,14 +2571,23 @@ function webViewerKeyDown(evt) { } } - if (typeof PDFJSDev === "undefined" || !PDFJSDev.test("MOZCENTRAL")) { + if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC || CHROME")) { + const { eventBus } = PDFViewerApplication; + // CTRL or META without shift if (cmd === 1 || cmd === 8) { switch (evt.keyCode) { case 83: // s - PDFViewerApplication.download(); + eventBus.dispatch("download", { source: window }); handled = true; break; + + case 79: // o + if (typeof PDFJSDev === "undefined" || PDFJSDev.test("GENERIC")) { + eventBus.dispatch("openfile", { source: window }); + handled = true; + } + break; } } }