ninja-keys icon indicating copy to clipboard operation
ninja-keys copied to clipboard

feature request: prevent open event via listener or callback

Open viglucci opened this issue 3 years ago • 3 comments
trafficstars

Is there currently a way to prevent the menu from opening when the hotkey (ctrl + k) is invoked?

I have a scenario where the component which mounts the ninja-key element has an initial loading state, and I would like to be able to prevent the command menu from opening while in the loading state.

Thanks

viglucci avatar Jan 31 '22 03:01 viglucci

Right now no. But that sounds as a good feature, I will add "enabled/disabled" property Thanks!

ssleptsov avatar Feb 01 '22 13:02 ssleptsov

Thanks!

One quick question: will the enabled/disabled property also prevent the children hotkeys from invoking as well? I think if enabled: false is set, then ctrl + h (home) should also be disabled, but just wanted to clarify what your thoughts were.

Thanks again

viglucci avatar Feb 01 '22 15:02 viglucci

Yeah, sure. It will disable/enable all hotkeys too based on that property

ssleptsov avatar Feb 02 '22 09:02 ssleptsov