O_C icon indicating copy to clipboard operation
O_C copied to clipboard

Trigger long-press as soon as the button is held long enough, instead…

Open float32 opened this issue 7 years ago • 3 comments

… of at release

Hopefully this doesn't have any side effects I haven't thought of. I don't know the codebase well enough to say for sure.

Line 85 is to stop the button being flagged to ignore by Ui::AppSettings(). Kinda hacky.

The +7 in line 89 is compensation for the 7-bit button debouncing.

float32 avatar Oct 18 '17 23:10 float32

I haven't looked at the pull request code, but functionally, is this an improvement. By actioning the long-press when the button is released, the action can be triggered at a precise moment (eg on-the-beat), whereas triggering after minimum long-press time has elapsed makes it very hard to manually synchronise the action with other events.

timchurches avatar Oct 19 '17 00:10 timchurches

Off the top of my head I suspect this might break at least one thing, the hold + turn in the scale editor. I vaguely remember thinking about handling all button presses this way when the UI code was re-written, but suspect I didn't to maintain existing behaviours (or some other forgotten reason).

patrickdowling avatar Oct 19 '17 05:10 patrickdowling

So looking at the source seems to confirm that generating the long-press this way would conflict with the scale editor: The L long press is used, and also there's a case where you hold L pressed and turn R where the long press (at release) gets ignored. It might still work if you manage to turn R within kLongPressTicks but that seems a bit too fiddly... Not sure if there's a way to resolve that, at least nothing comes to mind spontaneously.

patrickdowling avatar Oct 20 '17 18:10 patrickdowling