When placing the device = "sleep" action on the action_hold of a key, it doesn't work as it should. The device will "wake up" as soon as the key is released. I tried modifying github.com/muesli/streamdeck to ignore "wake-up" events that all button release, but this doesn't quite fix the problem. Deckmaster still thinks the button is still held down because it was never aware that the device went to sleep.
There are three solutions that come to my mind.
- Allow a channel to be passed to
streamdeck.Device to receive events such as this so that (in this case) Deckmaster can clear its keystate tracking. Incidentally, adding such a channel may help with the "clear the deck" and "show it again" sleep-related feature that I'm looking for.
- Send key release events for all pressed keys when the device sleeps. This way, it will appear to Deckmaster that all keys are released when the device sleeps and will track that "normally".
- Take the key-hold event generation into the streamdeck library somehow. This way, Deckmaster will receive key press and key long-hold events separately and doesn't need to track key timings. However, this makes the streamdeck library more high-level (so perhaps it should be optional somehow).
Which do you prefer, or do you prefer something else?
When placing the
device = "sleep"action on the action_hold of a key, it doesn't work as it should. The device will "wake up" as soon as the key is released. I tried modifying github.com/muesli/streamdeck to ignore "wake-up" events that all button release, but this doesn't quite fix the problem. Deckmaster still thinks the button is still held down because it was never aware that the device went to sleep.There are three solutions that come to my mind.
streamdeck.Deviceto receive events such as this so that (in this case) Deckmaster can clear its keystate tracking. Incidentally, adding such a channel may help with the "clear the deck" and "show it again" sleep-related feature that I'm looking for.Which do you prefer, or do you prefer something else?