From 4307b1f827aa9fe1595afed79303873a0d1b47ef Mon Sep 17 00:00:00 2001 From: Serghey Rodin Date: Thu, 15 Oct 2015 15:12:49 +0300 Subject: [PATCH] FM HotKeys --- web/templates/footer.html | 42 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/web/templates/footer.html b/web/templates/footer.html index 97a900854..77b4b0acf 100644 --- a/web/templates/footer.html +++ b/web/templates/footer.html @@ -472,6 +472,46 @@ } ); + shortcut.add("Left", function(){ + VE.navigation.move_focus_left(); + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("Right", function(){ + VE.navigation.move_focus_right(); + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("Enter", function(){ + VE.navigation.enter_focused(); + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + + shortcut.add("Tab", function(){ + VE.navigation.switch_menu(); + }, { + 'type': 'keydown', + 'propagate': false, + 'disable_in_input': true, + 'target': document + } + ); + $('.shortcuts .close').click(function(){ $('.shortcuts').hide(); @@ -482,6 +522,8 @@ }); + VE.navigation.init(); + VE.core.register(); if (location.href.search(/list/) != -1) { var shift_select_ref = $('body').finderSelect({