diff options
| author | nyx <nnyyxxxx@protonmail.com> | 2025-03-03 15:56:01 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-03 21:56:01 +0100 |
| commit | d7e7a292613a4f20218074ff8299dff099a80098 (patch) | |
| tree | cf57d20dfa11d2502115699a7bb36250c813adfc /src/config | |
| parent | f1ef724a87b29a7937cfc328e0c7ea9445a90050 (diff) | |
input: add flip_x and flip_y for touchpad (#9481)
Diffstat (limited to 'src/config')
| -rw-r--r-- | src/config/ConfigDescriptions.hpp | 12 | ||||
| -rw-r--r-- | src/config/ConfigManager.cpp | 4 |
2 files changed, 16 insertions, 0 deletions
diff --git a/src/config/ConfigDescriptions.hpp b/src/config/ConfigDescriptions.hpp index 842df3ef..7ed0d03c 100644 --- a/src/config/ConfigDescriptions.hpp +++ b/src/config/ConfigDescriptions.hpp @@ -608,6 +608,18 @@ inline static const std::vector<SConfigOptionDescription> CONFIG_OPTIONS = { .type = CONFIG_OPTION_BOOL, .data = SConfigOptionDescription::SBoolData{false}, }, + SConfigOptionDescription{ + .value = "input:touchpad:flip_x", + .description = "Inverts the horizontal movement of the touchpad", + .type = CONFIG_OPTION_BOOL, + .data = SConfigOptionDescription::SBoolData{false}, + }, + SConfigOptionDescription{ + .value = "input:touchpad:flip_y", + .description = "Inverts the vertical movement of the touchpad", + .type = CONFIG_OPTION_BOOL, + .data = SConfigOptionDescription::SBoolData{false}, + }, /* * input:touchdevice: diff --git a/src/config/ConfigManager.cpp b/src/config/ConfigManager.cpp index 2547992b..f85010af 100644 --- a/src/config/ConfigManager.cpp +++ b/src/config/ConfigManager.cpp @@ -603,6 +603,8 @@ CConfigManager::CConfigManager() { registerConfigVar("input:touchpad:tap-and-drag", Hyprlang::INT{1}); registerConfigVar("input:touchpad:drag_lock", Hyprlang::INT{0}); registerConfigVar("input:touchpad:scroll_factor", {1.f}); + registerConfigVar("input:touchpad:flip_x", Hyprlang::INT{0}); + registerConfigVar("input:touchpad:flip_y", Hyprlang::INT{0}); registerConfigVar("input:touchdevice:transform", Hyprlang::INT{0}); registerConfigVar("input:touchdevice:output", {"[[Auto]]"}); registerConfigVar("input:touchdevice:enabled", Hyprlang::INT{1}); @@ -731,6 +733,8 @@ CConfigManager::CConfigManager() { m_pConfig->addSpecialConfigValue("device", "relative_input", Hyprlang::INT{0}); // only for tablets m_pConfig->addSpecialConfigValue("device", "active_area_position", Hyprlang::VEC2{0, 0}); // only for tablets m_pConfig->addSpecialConfigValue("device", "active_area_size", Hyprlang::VEC2{0, 0}); // only for tablets + m_pConfig->addSpecialConfigValue("device", "flip_x", Hyprlang::INT{0}); // only for touchpads + m_pConfig->addSpecialConfigValue("device", "flip_y", Hyprlang::INT{0}); // only for touchpads // keywords m_pConfig->registerHandler(&::handleExec, "exec", {false}); |
