Is it possible to have a plugin execute code when a keyboard shortcut is pressed (as opposed to a slash command)? I’ve looked through the API and can’t seem to find a way to listen to keyboard events. More info on my proposed use case below.
I’m trying to create “hint” style keyboard navigation, where you press a shortcut, text hints are displayed on each block, and the text you press next focuses that block. I’m able to display the hints, and, using a hidden input element, to listen to subsequent keydown events to know which hint was typed. What I’ve been unable to figure out is how to enter “hint mode” with a keyboard shortcut, as opposed to having a UI element the user clicks, or a slash command the user enters. Is there a way to do this? If not, it would be great to let plugins register keyboard shortcuts logseq would then listen to, and call the plugin code when they were pressed.