diff --git a/src/config.cpp b/src/config.cpp index 990a8ff45ac..61b91f1b415 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -855,6 +855,7 @@ namespace config { true, // virtualhid_randomize_mac true, // keyboard enabled + false, // key_rightalt_to_key_win true, // mouse enabled true, // controller enabled true, // always send scancodes diff --git a/tests/unit/test_config.cpp b/tests/unit/test_config.cpp new file mode 100644 index 00000000000..3fac7ef00d3 --- /dev/null +++ b/tests/unit/test_config.cpp @@ -0,0 +1,32 @@ +/** + * @file tests/unit/test_config.cpp + * @brief Test src/config.* default values. + */ +// test imports +#include "../tests_common.h" + +// local imports +#include + +/** + * @brief Verify that native_pen_touch defaults to enabled. + * + * The input_t aggregate initializer previously omitted the key_rightalt_to_key_win + * member, which shifted every subsequent field and left native_pen_touch (the + * final member) value-initialized to false despite the surrounding comment + * suggesting true. This test guards the corrected default. + */ +TEST(ConfigInputTest, NativePenTouchDefaultsToEnabled) { + EXPECT_TRUE(config::input.native_pen_touch); +} + +/** + * @brief Verify that key_rightalt_to_key_win defaults to disabled. + * + * This member is documented and configured as disabled by default; the + * aggregate initializer now explicitly sets it to false. It was previously + * omitted, causing the field to shift and native_pen_touch to default to false. + */ +TEST(ConfigInputTest, KeyRightAltToKeyWinDefaultsToDisabled) { + EXPECT_FALSE(config::input.key_rightalt_to_key_win); +}