diff options
| author | toasted-nutbread <toasted-nutbread@users.noreply.github.com> | 2021-01-17 16:55:45 -0500 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-17 16:55:45 -0500 | 
| commit | 14b4aee07dc3f69ad75518cf04cafe416e06f0c7 (patch) | |
| tree | 407918a74817284cd9f1d474a6c7783033e7a4c6 /ext/fg/js | |
| parent | 8ec48456e6d73e10239469c39e7862365db43739 (diff) | |
Hotkey forwarding support (#1263)
* Add support for allowing HotkeyHandler to forward hotkeys
* Update hotkey registration
* Pass HotkeyHandler instance into Display* constructor
* Implement hotkey forwarding
Diffstat (limited to 'ext/fg/js')
| -rw-r--r-- | ext/fg/js/float-main.js | 7 | 
1 files changed, 6 insertions, 1 deletions
| 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(); |