mirror of
https://github.com/hyprwm/Hyprland
synced 2024-12-22 18:29:50 +01:00
libinput: add tap_button_map (#1495)
This commit is contained in:
parent
760b37f71d
commit
53945cff31
2 changed files with 10 additions and 0 deletions
|
@ -154,6 +154,7 @@ void CConfigManager::setDefaultVars() {
|
|||
configValues["input:touchpad:natural_scroll"].intValue = 0;
|
||||
configValues["input:touchpad:disable_while_typing"].intValue = 1;
|
||||
configValues["input:touchpad:clickfinger_behavior"].intValue = 0;
|
||||
configValues["input:touchpad:tap_button_map"].strValue = STRVAL_EMPTY;
|
||||
configValues["input:touchpad:middle_button_emulation"].intValue = 0;
|
||||
configValues["input:touchpad:tap-to-click"].intValue = 1;
|
||||
configValues["input:touchpad:tap-and-drag"].intValue = 1;
|
||||
|
@ -199,6 +200,7 @@ void CConfigManager::setDeviceDefaultVars(const std::string& dev) {
|
|||
cfgValues["repeat_rate"].intValue = 25;
|
||||
cfgValues["repeat_delay"].intValue = 600;
|
||||
cfgValues["natural_scroll"].intValue = 0;
|
||||
cfgValues["tap_button_map"].strValue = STRVAL_EMPTY;
|
||||
cfgValues["numlock_by_default"].intValue = 0;
|
||||
cfgValues["disable_while_typing"].intValue = 1;
|
||||
cfgValues["clickfinger_behavior"].intValue = 0;
|
||||
|
|
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue