Skip to content

Emulator can't model a held footswitch (no longpress or chord coverage) #222

Description

@sastraxi

MockFootswitch.press() (emulator/controls.py:104) toggles state and calls refresh_callback — there is no press/release distinction, so it never produces a LONGPRESSED event and cannot hold two switches down at once.

Consequences:

  • Footswitch longpress actions can't be exercised in the emulator at all.
  • Longpress chords (longpress: groups) are entirely untestable there, which is why a chord-resolution bug could ship unnoticed.
  • Chord resolution keys off physical hold state, which a mock with no underlying AnalogSwitch/GpioSwitch reports as RELEASED — so chords silently degrade to lone-longpress behavior in the emulator rather than failing loudly.

Fix: model key-down/key-up in emulator/window.py and give MockFootswitch a real press state machine (RELEASED/PRESSED/LONGPRESSED) matching the hardware detectors, so held-switch gestures work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions