Mac uses CMD+Left, CMD+Right for history navigation, closes #376

This commit is contained in:
azivner 2019-01-23 20:15:33 +01:00
parent 1a9a49b739
commit 4d0e46021b

View file

@ -61,9 +61,16 @@ function registerEntrypoints() {
$("#history-back-button").click(window.history.back);
$("#history-forward-button").click(window.history.forward);
if (utils.isMac()) {
// Mac has a different history navigation shortcuts - https://github.com/zadam/trilium/issues/376
utils.bindShortcut('meta+left', window.history.back);
utils.bindShortcut('meta+right', window.history.forward);
}
else {
utils.bindShortcut('alt+left', window.history.back);
utils.bindShortcut('alt+right', window.history.forward);
}
}
utils.bindShortcut('alt+m', e => {
$(".hide-toggle").toggle();