Skip to content

When in HOLD, RELEASED event is no longer sent #22

@nokolade

Description

@nokolade

For a BLE mouse the HOLD feature is not needed.
Instead, the PRESSED and RELEASED events should be passed to as BleMouse.press() and .release() respectively.

When in HOLD, RELEASED event is no longer sent.

I see following solutions:

  1. RELEASED event is sent irregardless if HOLD is detected -> would trigger two events :-(
  2. document that holdThreshold can be set to 0 and register for PRESSED and HOLD_RELEASED -> should work, but naming is not intuitive
  3. set holdThreshold to MAX_INT -> not clean but should be safe in practice
  4. register for both RELEASED and HOLD_RELEASED -> code duplication
  5. change library to holdThreshold can be set to 0 (or -1) to allow disabling hold completely -> seems cleanest

I'll go for 3 for now.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions