diff --git a/src/config.cpp b/src/config.cpp index 2911deae016..02b79eb005c 100644 --- a/src/config.cpp +++ b/src/config.cpp @@ -861,6 +861,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 index a608aefd367..459e45aed0c 100644 --- a/tests/unit/test_config.cpp +++ b/tests/unit/test_config.cpp @@ -124,3 +124,26 @@ TEST_F(ConfigPersistenceTest, SelectsAllDriversOnlyForLicensedUsersWithoutAPrefe EXPECT_FALSE(config::select_all_gamepad_drivers_if_licensed(true)); EXPECT_EQ(file_handler::read_file(config_file().string().c_str()), "gamepad_driver = all\n"); } + +/** + * @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); +}