diff --git a/res/include/script/home_plain.js b/res/include/script/home_plain.js index 596e664..3aeadda 100644 --- a/res/include/script/home_plain.js +++ b/res/include/script/home_plain.js @@ -92,6 +92,14 @@ function shareButton() { }); } +document.addEventListener("keydown", function(event){ + if (event.ctrlKey || event.altKey) { + return // prevent custom shortcuts from interfering with system shortcuts + } + if (event.which == 67 && !uploader.uploading()) { // C to copy to clipboard + copyLink(); + } +}); function copyLink() { if(copyText(shareLink)) { console.log('Text copied'); diff --git a/res/template/file_viewer.html b/res/template/file_viewer.html index 0a5ad96..a988d8b 100644 --- a/res/template/file_viewer.html +++ b/res/template/file_viewer.html @@ -103,7 +103,7 @@