From 239cacacb51c0d1fb8751059c0a0b324c02f3dde Mon Sep 17 00:00:00 2001 From: dominiksta Date: Fri, 30 Aug 2024 16:13:45 +0200 Subject: [PATCH] fix: toast display on mark current page --- src/renderer/index.ts | 9 --------- src/renderer/wournal.ts | 8 ++++---- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/renderer/index.ts b/src/renderer/index.ts index d1435c3..1b51ee4 100644 --- a/src/renderer/index.ts +++ b/src/renderer/index.ts @@ -168,15 +168,6 @@ async function main() { } }); - document.addEventListener('keyup', e => { - if (!e.altKey) return; - switch (e.key) { - case 'ArrowLeft': wournal.api.jumplistPrev(); break; - case 'ArrowRight': wournal.api.jumplistNext(); break; - case 'ArrowDown': wournal.api.jumplistMark(); break; - } - }); - document.body.appendChild(wournal); maybeLoadArgvDoc(wournal, await ApiClient["process:argv"](), true); LOG.info('Startup Complete') diff --git a/src/renderer/wournal.ts b/src/renderer/wournal.ts index 53adde6..0b5c76b 100644 --- a/src/renderer/wournal.ts +++ b/src/renderer/wournal.ts @@ -1124,20 +1124,20 @@ export default class Wournal extends Component { 'jumplist_prev': { human_name: 'Jump to Previous Marked Position', func: () => this.api.jumplistPrev(), - shortcut: 'Alt+LeftArrow', + shortcut: 'Alt+ArrowLeft', }, 'jumplist_next': { human_name: 'Jump to Next Marked Position', func: () => this.api.jumplistNext(), - shortcut: 'Alt+RightArrow', + shortcut: 'Alt+ArrowRight', }, 'jumplist_mark': { human_name: 'Mark Current Position', func: () => { - this.toast.open('Current Position Marked'); this.api.jumplistMark(); + this.toast.open('Current Position Marked'); }, - shortcut: 'Alt+DownArrow', + shortcut: 'Alt+ArrowDown', }, 'tab_next': {