jaywcjlove / hotkeys-js

➷ A robust Javascript library for capturing keyboard input. It has no dependencies.

Home Page:https://jaywcjlove.github.io/hotkeys-js

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[RFC] Should provide the setting for enabled?

Yukiniro opened this issue · comments

I wonder if we can provide the setting for visible? In some scenes, I want to disable all listeners when I drag an element or do something else. We could provide enable, disable, and isEnabled to resolve these problems. #215

@Yukiniro This can be judged during execution to avoid increasing size and complexity.

@Yukiniro It can also be controlled using scope.

I got it. But if I use a special scope. I have to record the current scope to reset scope when I want to disable it. It doesn't feel intuitive.