feat(trackpoint): add left-handed option support

This commit is contained in:
dbeley
2025-03-13 09:20:42 +01:00
committed by Ivan Molodetskikh
parent 9f9c4a99af
commit 3e21585861
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -250,6 +250,8 @@ pub struct Trackpoint {
#[knuffel(child, unwrap(argument))] #[knuffel(child, unwrap(argument))]
pub scroll_button: Option<u32>, pub scroll_button: Option<u32>,
#[knuffel(child)] #[knuffel(child)]
pub left_handed: bool,
#[knuffel(child)]
pub middle_emulation: bool, pub middle_emulation: bool,
} }
@@ -3902,6 +3904,7 @@ mod tests {
scroll_button: Some( scroll_button: Some(
274, 274,
), ),
left_handed: false,
middle_emulation: false, middle_emulation: false,
}, },
trackball: Trackball { trackball: Trackball {
+1
View File
@@ -3536,6 +3536,7 @@ pub fn apply_libinput_settings(config: &niri_config::Input, device: &mut input::
}); });
let _ = device.config_scroll_set_natural_scroll_enabled(c.natural_scroll); let _ = device.config_scroll_set_natural_scroll_enabled(c.natural_scroll);
let _ = device.config_accel_set_speed(c.accel_speed); let _ = device.config_accel_set_speed(c.accel_speed);
let _ = device.config_left_handed_set(c.left_handed);
let _ = device.config_middle_emulation_set_enabled(c.middle_emulation); let _ = device.config_middle_emulation_set_enabled(c.middle_emulation);
if let Some(accel_profile) = c.accel_profile { if let Some(accel_profile) = c.accel_profile {