command-pal icon indicating copy to clipboard operation
command-pal copied to clipboard

CommandPal hotkey doesn't work if browser binds the hotkey and you are in an input/textarea.... (e.g. ctrl-k)

Open rouilj opened this issue 2 years ago • 0 comments

Hi Ben:

When I first started using command-pal, I tried binding it to a key that was used to trigger a menu item in my browser. It would only work some of the time and I didn't figure out what was going on.

I think the issue is that the hotkey defined for command-pal overrides the browser hotkey, but only when you are not in a text input or textarea. I.E. the equivalent of hotkeysGlobal=True needs to be enabled for the hotkey.

I think defining the hotkeys.filter function defined by initShortCuts to return true if the key matches the command-pal hotkey will do the trick. How to implement this, I am not sure. Ideally this should be settable from the CommandPal({}) configuration object.

I haven't seen any activity from you in a while. Hope your doing well.

-- rouilj

rouilj avatar Oct 06 '23 02:10 rouilj