Skip to content

Touch: a long press opens what a right-click opens - #511

Merged
bonninr merged 1 commit into
mainfrom
fix/android-long-press
Oct 21, 2026
Merged

bonninr merged 1 commit into
mainfrom
fix/android-long-press

Conversation

@bonninr

@bonninr bonninr commented Oct 21, 2026

Copy link
Copy Markdown
Owner

The right-click part of #474. On a phone or tablet a finger held still for half a second opens what a right-click opens: a stop's or piston's MIDI menu on the drawn console, a shoe's mapping, the page's own menu on the background, and an element's MIDI window on a generated panel. Android reports every press as the left button, a mouse's too, so a right-click never arrived there.

  • A stop or switch changes as the finger lifts, so a finger held on it opens the menu and leaves it as it was. A finger that slides off leaves it alone.
  • A piston fires on the press as before; a long press lets it go and opens its menu.
  • Keys play on the press and hold their note however long the finger stays.
  • On a generated panel, a fader's name takes the long press; its track moves with the finger as before.
  • With a mouse, everything works as before: a click draws a stop on the press.

MASTERPIECE_TOUCH=1 turns the same handling on with a mouse on a desktop, which is how it was checked.

Checked in the program on Windows, GrandOrgue demo, MASTERPIECE_TOUCH=1:

Action Result
Press on Montre 8 stays in while the button is down
Release Montre 8 drawn
Hold on Prestant 4 for 0.9 s its MIDI menu opens: "Prestant 4'", "Not mapped", "MIDI window...", "Learn"
Release after the menu Prestant 4 still in
Same hold without the variable Prestant 4 drawn on the press, no menu

New test functional.ui.touch-long-press: a tap, a long press, a slide off and a small tremble, on the drawn console and on a generated panel's cell, and a mouse click unchanged. mp_tests --no-perf: 301 run, 0 failed.

Still to check on an Android device: the long press with a finger and with a mouse. The combination window's pistons and the expression bar's shoes keep the right-click only for now.

Android reports every press as the left button, a mouse's too, so a right-click never arrived. On a phone or tablet a long press on the drawn console or a generated panel opens the menu; a stop changes as the finger lifts, so a held one stays as it was. MASTERPIECE_TOUCH=1 turns it on with a mouse on a desktop.
@bonninr
bonninr merged commit 231c3e5 into main Oct 21, 2026
10 checks passed
@bonninr
bonninr deleted the fix/android-long-press branch October 21, 2026 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants