diff options
| author | Mihai Fufezan <fufexan@protonmail.com> | 2023-02-05 16:17:23 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-05 14:17:23 +0000 |
| commit | 53945cff3184cfdff3ed978e072b4ed65e3b2ec5 (patch) | |
| tree | 5d7d5654b49c9aeb22053d2e25ece34bd45f9868 /src/managers/input/InputManager.cpp | |
| parent | 760b37f71d200643d3e267472e5cc290d38d1a53 (diff) | |
libinput: add tap_button_map (#1495)
Diffstat (limited to 'src/managers/input/InputManager.cpp')
| -rw-r--r-- | src/managers/input/InputManager.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/managers/input/InputManager.cpp b/src/managers/input/InputManager.cpp index b2e653ae..caaece20 100644 --- a/src/managers/input/InputManager.cpp +++ b/src/managers/input/InputManager.cpp @@ -761,6 +761,14 @@ void CInputManager::setPointerConfigs() { libinput_device_config_middle_emulation_set_enabled(LIBINPUTDEV, LIBINPUT_CONFIG_MIDDLE_EMULATION_ENABLED); else libinput_device_config_middle_emulation_set_enabled(LIBINPUTDEV, LIBINPUT_CONFIG_MIDDLE_EMULATION_DISABLED); + + const auto TAP_MAP = HASCONFIG ? g_pConfigManager->getDeviceString(devname, "tap_button_map") : g_pConfigManager->getString("input:touchpad:tap_button_map"); + if (TAP_MAP == "" || TAP_MAP == "lrm") + libinput_device_config_tap_set_button_map(LIBINPUTDEV, LIBINPUT_CONFIG_TAP_MAP_LRM); + else if (TAP_MAP == "lmr") + libinput_device_config_tap_set_button_map(LIBINPUTDEV, LIBINPUT_CONFIG_TAP_MAP_LMR); + else + Debug::log(WARN, "Tap button mapping unknown"); } const auto SCROLLMETHOD = HASCONFIG ? g_pConfigManager->getDeviceString(devname, "scroll_method") : g_pConfigManager->getString("input:scroll_method"); |
