WootingKb / wooting-analog-sdk-old

Easy access to Wooting keyboard analog values #WootDev
Mozilla Public License 2.0
29 stars 2 forks source link

[Feature Request] API for disabling / enabling keys #12

Open evilC opened 5 years ago

evilC commented 5 years ago

It would be nice to be able to programatically enable / disable sending of key events (For a specific key) via an API.
Use case:
Being able to turn on/off blocking of keys while they are in analog mode, for example so you can type in a chat box
For example, I may have some code which uses pixel detection to detect when the chat box is active and enable the keys that are currently disabled, without having to try and infer it from keypresses, or have the user hit a special key to turn key blocking on/off.

cactysman commented 5 years ago

Other examples would be games running / rendering on the keyboard that take input. This way you could prevent the current active window from getting random inputs (that control that game) or accidental actions performed by those keystrokes.

For still being able to access keystrokes, some event / callback should be made available.


In order to prevent abuse of this feature, something like holding the Mode key could maybe re-enable all the keys that were blocked with the SDK. Furthermore, disabling the A1, A2, A3, Mode keys should not be allowed in the first place.

Along with a function to disable a single key, a function to toggle a whole array of keys (just like in the RGB SDK) should be made available aswell.

Thoughts?