Skip to content

Commit

Permalink
fixed shortcuts, add morph and tag shortcuts
Browse files Browse the repository at this point in the history
  • Loading branch information
muhammed-abuodeh committed Sep 2, 2024
1 parent 0e619c4 commit 316a99d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions keyboardShortcuts.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()}
});
4 changes: 2 additions & 2 deletions viewtree.html
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
<p onClick="editToggle()">Edit Morphology</p>
<p onClick="tagsToggle()">Edit Tags</p>
<p onClick="editToggle()">Edit Morphology (ctrl + shift + m)</p>
<p onClick="tagsToggle()">Edit Tags (ctrl + shift + t)</p>
<p onClick="addNewTree()">Add New Tree</p>
<p onClick="deleteCurrentTree()">Delete Current Tree</p>
</div>
Expand Down

0 comments on commit 316a99d

Please sign in to comment.