diff --git a/es-app/src/views/UIModeController.cpp b/es-app/src/views/UIModeController.cpp index 251a0c99e..75cd0b19f 100644 --- a/es-app/src/views/UIModeController.cpp +++ b/es-app/src/views/UIModeController.cpp @@ -72,8 +72,7 @@ bool UIModeController::inputIsMatch(InputConfig* config, Input input) // When we have reached the end of the list, trigger UI_mode unlock. void UIModeController::unlockUIMode() { - LOG(LogDebug) << - " UIModeController::listen(): Passkey sequence completed, switching UIMode to Full"; + LOG(LogInfo) << "Passkey sequence completed, switching UI mode to Full"; Settings::getInstance()->setString("UIMode", "full"); Settings::getInstance()->saveFile(); mPassKeyCounter = 0; @@ -138,10 +137,18 @@ std::string UIModeController::getFormattedPassKeyStr() bool UIModeController::isValidInput(InputConfig* config, Input input) { - if ((config->getMappedTo(input).size() == 0) || // Not a mapped input, so ignore.. - (input.type == TYPE_HAT) || // Ignore all hat inputs. + if ((config->getMappedTo(input).size() == 0) || // Not a mapped input, so ignore it. (!input.value)) // Not a key-down event. return false; + else if (input.type == TYPE_HAT) { + // When the hat goes back to neutral, getMappedTo() will return entries for all + // four directions as the neutral cancels any of them out. So a neutral is + // equivalent to a key-up event and should therefore be ignored. + if (config->getMappedTo(input).size() == 4) + return false; + else + return true; + } else return true; }