Some fixes

This commit is contained in:
jpirnay
2026-04-27 13:52:55 +02:00
parent e1d623bd9c
commit adc0a52af1
10 changed files with 236 additions and 90 deletions
+5 -1
View File
@@ -34,7 +34,7 @@ class ButtonEventManager {
};
// Timing constants (milliseconds)
static constexpr unsigned long LONG_PRESS_MS = 600;
static constexpr unsigned long LONG_PRESS_MS = 1000;
static constexpr unsigned long DOUBLE_WINDOW_MS = 300;
explicit ButtonEventManager(MappedInputManager& input) : input(input) {}
@@ -49,6 +49,10 @@ class ButtonEventManager {
// Reset all per-button FSMs. Call on activity transitions to prevent bleed-through.
void drain();
// Preserve a default event for activity processing after main loop dispatch.
// This is used when the configured action is BTN_DEFAULT.
void pushEventFront(Button button, PressType type);
// Returns true if a double-click action is configured for this button.
// ButtonEventManager queries CrossPointSettings internally.
static bool hasDoubleAction(Button button);