change in default keyboard shortcuts

This commit is contained in:
azivner
2017-12-18 23:41:13 -05:00
parent 35912f325b
commit 0d6ccd7f61
6 changed files with 48 additions and 16 deletions

View File

@@ -1,22 +1,27 @@
"use strict";
// hot keys are active also inside inputs and content editables
jQuery.hotkeys.options.filterInputAcceptingElements = true;
jQuery.hotkeys.options.filterContentEditable = true;
jQuery.hotkeys.options.filterInputAcceptingElements = false;
jQuery.hotkeys.options.filterContentEditable = false;
jQuery.hotkeys.options.filterTextInputs = false;
$(document).bind('keydown', 'alt+m', () => {
$(document).bind('keydown', 'alt+m', e => {
const toggle = $(".hide-toggle");
const hidden = toggle.css('visibility') === 'hidden';
toggle.css('visibility', hidden ? 'visible' : 'hidden');
e.preventDefault();
});
// hide (toggle) everything except for the note content for distraction free writing
$(document).bind('keydown', 'alt+t', () => {
$(document).bind('keydown', 'alt+t', e => {
const date = new Date();
const dateString = formatDateTime(date);
link.addTextToEditor(dateString);
e.preventDefault();
});
$(document).bind('keydown', 'f5', () => {