From 35abb445cc0e26766cb8ea7beebbb4ee9abb3e8a Mon Sep 17 00:00:00 2001 From: Wim Brand Date: Wed, 19 Sep 2018 23:31:51 +0200 Subject: [PATCH] fix file viewer intercepting shortcuts --- res/static/res/script/Keyboard.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/res/static/res/script/Keyboard.js b/res/static/res/script/Keyboard.js index 06d58f7..ac95b71 100644 --- a/res/static/res/script/Keyboard.js +++ b/res/static/res/script/Keyboard.js @@ -1,6 +1,10 @@ /* global ListNavigator, Toolbar */ $(document).keydown(function(event){ + if (event.ctrlKey || event.altKey) { + return // prevent custom shortcuts from interfering with system shortcuts + } + if(event.which === 65 || event.which === 37){ // A or left arrow key go to previous file ListNavigator.previousItem(); }else if(event.which === 68 || event.which === 39){ // D or right arrow key go to next file @@ -14,4 +18,4 @@ $(document).keydown(function(event){ }else if(event.which === 73){ // I to open info window DetailsWindow.toggle(); } -}); \ No newline at end of file +});