Skip to content

device = "sleep" on action_hold doesn't work properly #79

Description

@henryso

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.

  1. 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.
  2. 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".
  3. 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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions