From 316a99d78e9f8845ed44a6992587f385ec7ecf3e Mon Sep 17 00:00:00 2001 From: Muhammed AbuOdeh Date: Mon, 2 Sep 2024 17:16:27 +0400 Subject: [PATCH] fixed shortcuts, add morph and tag shortcuts --- keyboardShortcuts.js | 10 ++++++---- viewtree.html | 4 ++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/keyboardShortcuts.js b/keyboardShortcuts.js index 669aa4c..bfbf352 100644 --- a/keyboardShortcuts.js +++ b/keyboardShortcuts.js @@ -8,12 +8,14 @@ window.addEventListener('keydown', function(event) { }); window.addEventListener('keydown', function(event) { - if ((event.metaKey || event.ctrlKey) && event.shiftKey && event.key === 'l') {search(treesArray);} + if (event.ctrlKey && event.shiftKey && event.code == 'KeyL') {search(treesArray);} }); // file menu shortcuts window.addEventListener('keydown', function(event) { - if ((event.metaKey || event.ctrlKey) && event.shiftKey && event.key === 's') {saveTreeRemote();} - else if ((event.metaKey || event.ctrlKey) && event.shiftKey && event.key === 'r') {renameToggle();} - else if ((event.metaKey || event.ctrlKey) && event.shiftKey && event.key === 'd') {downloadToggle();} + if (event.ctrlKey && event.shiftKey && event.code === 'KeyS') {saveTreeRemote();} + else if (event.ctrlKey && event.shiftKey && event.code === 'KeyR') {renameToggle();} + else if (event.ctrlKey && event.shiftKey && event.code === 'KeyD') {downloadToggle();} + else if (event.ctrlKey && event.shiftKey && event.code === 'KeyM') {editToggle();} + else if (event.ctrlKey && event.shiftKey && event.code === 'KeyT') {tagsToggle()} }); \ No newline at end of file diff --git a/viewtree.html b/viewtree.html index 3390af0..e290fee 100644 --- a/viewtree.html +++ b/viewtree.html @@ -52,8 +52,8 @@