diff --git a/src/spice2x/cfg/button.cpp b/src/spice2x/cfg/button.cpp index 95b5cc7..9dfd54e 100644 --- a/src/spice2x/cfg/button.cpp +++ b/src/spice2x/cfg/button.cpp @@ -278,6 +278,8 @@ std::string Button::getVKeyString() { return "Left Alt"; case 0xA5: return "Right Alt"; + case INVALID_VKEY: + return "Invalid"; default: // check win API diff --git a/src/spice2x/cfg/button.h b/src/spice2x/cfg/button.h index 1a2fc0d..4089190 100644 --- a/src/spice2x/cfg/button.h +++ b/src/spice2x/cfg/button.h @@ -83,12 +83,20 @@ public: if (this->override_enabled) { return true; } + + // has a device + if (!this->device_identifier.empty()) { + return true; + } + + // naive, and has a valid vKey if (this->vKey != INVALID_VKEY) { return true; } for (auto &alternative : this->alternatives) { - if (alternative.vKey != INVALID_VKEY) { + if (!alternative.getDeviceIdentifier().empty() || + alternative.getVKey() != INVALID_VKEY) { return true; } } diff --git a/src/spice2x/launcher/launcher.cpp b/src/spice2x/launcher/launcher.cpp index 9693bd5..89a894b 100644 --- a/src/spice2x/launcher/launcher.cpp +++ b/src/spice2x/launcher/launcher.cpp @@ -2569,9 +2569,10 @@ void dump_button_bindings(std::vector