#include "MappedInputManager.h" #include #include #include #include #include #include #include "CrossPointSettings.h" #include "components/HeaderBackTapTarget.h" #include "components/UITheme.h" namespace fui = freeink::ui; void MappedInputManager::update(const bool deferHomeButtonAction) const { gpio.update(); homeAction = HomeButtonAction::Ignore; if (gpio.hasHomeKey()) { homeAction = homeButtonInput.update(millis(), gpio.wasHomeKeyTapped(), gpio.wasHomeKeyLongPressed(), wasSwipe() != SwipeDir::None, gpio.wasHomeKeyPressed(), static_cast(SETTINGS.homeButtonTapAction), static_cast(SETTINGS.homeButtonDoubleTapAction), static_cast(SETTINGS.homeButtonLongPressAction)); } if (deferHomeButtonAction) { // Keep the first action observed during a synchronous transfer. Home must // still be visible now so the transfer can cancel and unwind promptly. if (homeAction != HomeButtonAction::Ignore && deferredHomeAction == HomeButtonAction::Ignore) { deferredHomeAction = homeAction; } } else if (deferredHomeAction != HomeButtonAction::Ignore) { homeAction = deferredHomeAction; deferredHomeAction = HomeButtonAction::Ignore; } for (uint8_t value = 0; value <= static_cast(Button::ScreenDown); ++value) { if (!isPressed(static_cast