From bb2f47deb2d2a60d13247c069201f27ed35b8604 Mon Sep 17 00:00:00 2001 From: azivner Date: Tue, 19 Dec 2017 19:54:55 -0500 Subject: [PATCH] alt-left and alt-right navigation also for electron --- public/javascripts/note_tree.js | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/public/javascripts/note_tree.js b/public/javascripts/note_tree.js index b6031678f..25a2f5007 100644 --- a/public/javascripts/note_tree.js +++ b/public/javascripts/note_tree.js @@ -678,6 +678,20 @@ const noteTree = (function() { activateNode(notePath); }); + if (isElectron()) { + $(document).bind('keydown', 'alt+left', e => { + window.history.back(); + + e.preventDefault(); + }); + + $(document).bind('keydown', 'alt+right', e => { + window.history.forward(); + + e.preventDefault(); + }); + } + return { reload, collapseTree,