Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
32 changes: 32 additions & 0 deletions tests/unit/test_config.cpp
Original file line number Diff line number Diff line change
@@ -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 <src/config.h>

/**
* @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);
}