From 14b4aee07dc3f69ad75518cf04cafe416e06f0c7 Mon Sep 17 00:00:00 2001 From: toasted-nutbread Date: Sun, 17 Jan 2021 16:55:45 -0500 Subject: Hotkey forwarding support (#1263) * Add support for allowing HotkeyHandler to forward hotkeys * Update hotkey registration * Pass HotkeyHandler instance into Display* constructor * Implement hotkey forwarding --- ext/fg/js/float-main.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'ext/fg') diff --git a/ext/fg/js/float-main.js b/ext/fg/js/float-main.js index f220385e..2b81a08a 100644 --- a/ext/fg/js/float-main.js +++ b/ext/fg/js/float-main.js @@ -19,6 +19,7 @@ * Display * DisplayProfileSelection * DocumentFocusController + * HotkeyHandler * JapaneseUtil * api */ @@ -32,7 +33,11 @@ await yomichan.backendReady(); const japaneseUtil = new JapaneseUtil(null); - const display = new Display('popup', japaneseUtil, documentFocusController); + + const hotkeyHandler = new HotkeyHandler(); + hotkeyHandler.prepare(); + + const display = new Display('popup', japaneseUtil, documentFocusController, hotkeyHandler); await display.prepare(); const displayProfileSelection = new DisplayProfileSelection(display); displayProfileSelection.prepare(); -- cgit v1.2.3