See if it's possible to forward all and/or capture some keyboard events in the outer (wrapper) window /quiver-bee/index.html
Opened this issue · 0 comments
First notice that Ctrl-Z as well as other keyboard commands will stop working if your current focus changes to outside of the iframe that embeds quiver core. To test this:
- Draw an arrow.
- Immediately press Ctrl+Z
- Immediately Ctrl+Y to get back the arrow.
This means our Ctrl+Z shortcut is already tied to undo/redo by quiver core.
However, change focus to our outer iframe; one way is to click the "Save" button. Now immediately press Ctrl+Z, and it does work.
There are perhaps three solutions (if they exist):
- Forward all keyboard events to the inner iframe.
- Capture appropriate events in /quiver-bee/index.html (the parent of the inner iframe), so that we can programmatically call the appropriate action.
- Do both: capture some events (meant for us for later as a method to add more shortcuts into the GUI), and forward the rest to the inner iframe.
On the third one, these shortcuts must not conflict with quiver core's shortcuts. To see quiver core's shortcuts goto https://q.uiver.app and click the button upper right and it will pop up a dialog with shortcuts listed.
I prefer third option if possible, in case we add in more shortcuts at our level of the GUI.