mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-22 02:01:55 +07:00
input: add touchpad drag-lock setting
This commit is contained in:
committed by
Ivan Molodetskikh
parent
d320833f40
commit
900da597e4
@@ -184,6 +184,8 @@ pub struct Touchpad {
|
|||||||
#[knuffel(child)]
|
#[knuffel(child)]
|
||||||
pub dwtp: bool,
|
pub dwtp: bool,
|
||||||
#[knuffel(child)]
|
#[knuffel(child)]
|
||||||
|
pub drag_lock: bool,
|
||||||
|
#[knuffel(child)]
|
||||||
pub natural_scroll: bool,
|
pub natural_scroll: bool,
|
||||||
#[knuffel(child, unwrap(argument, str))]
|
#[knuffel(child, unwrap(argument, str))]
|
||||||
pub click_method: Option<ClickMethod>,
|
pub click_method: Option<ClickMethod>,
|
||||||
@@ -3600,6 +3602,7 @@ mod tests {
|
|||||||
tap: true,
|
tap: true,
|
||||||
dwt: true,
|
dwt: true,
|
||||||
dwtp: true,
|
dwtp: true,
|
||||||
|
drag_lock: false,
|
||||||
click_method: Some(ClickMethod::Clickfinger),
|
click_method: Some(ClickMethod::Clickfinger),
|
||||||
natural_scroll: false,
|
natural_scroll: false,
|
||||||
accel_speed: 0.2,
|
accel_speed: 0.2,
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ input {
|
|||||||
tap
|
tap
|
||||||
// dwt
|
// dwt
|
||||||
// dwtp
|
// dwtp
|
||||||
|
// drag-lock
|
||||||
natural-scroll
|
natural-scroll
|
||||||
// accel-speed 0.2
|
// accel-speed 0.2
|
||||||
// accel-profile "flat"
|
// accel-profile "flat"
|
||||||
|
|||||||
@@ -3218,6 +3218,7 @@ pub fn apply_libinput_settings(config: &niri_config::Input, device: &mut input::
|
|||||||
let _ = device.config_tap_set_enabled(c.tap);
|
let _ = device.config_tap_set_enabled(c.tap);
|
||||||
let _ = device.config_dwt_set_enabled(c.dwt);
|
let _ = device.config_dwt_set_enabled(c.dwt);
|
||||||
let _ = device.config_dwtp_set_enabled(c.dwtp);
|
let _ = device.config_dwtp_set_enabled(c.dwtp);
|
||||||
|
let _ = device.config_tap_set_drag_lock_enabled(c.drag_lock);
|
||||||
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_left_handed_set(c.left_handed);
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ input {
|
|||||||
tap
|
tap
|
||||||
// dwt
|
// dwt
|
||||||
// dwtp
|
// dwtp
|
||||||
|
// drag-lock
|
||||||
natural-scroll
|
natural-scroll
|
||||||
// accel-speed 0.2
|
// accel-speed 0.2
|
||||||
// accel-profile "flat"
|
// accel-profile "flat"
|
||||||
@@ -181,6 +182,7 @@ Settings specific to `touchpad`s:
|
|||||||
- `tap`: tap-to-click.
|
- `tap`: tap-to-click.
|
||||||
- `dwt`: disable-when-typing.
|
- `dwt`: disable-when-typing.
|
||||||
- `dwtp`: disable-when-trackpointing.
|
- `dwtp`: disable-when-trackpointing.
|
||||||
|
- `drag-lock`: if set, lifting the finger off for a short time while dragging will not drop the dragged item. See the [libinput documentation](https://wayland.freedesktop.org/libinput/doc/latest/tapping.html#tap-and-drag).
|
||||||
- `tap-button-map`: can be `left-right-middle` or `left-middle-right`, controls which button corresponds to a two-finger tap and a three-finger tap.
|
- `tap-button-map`: can be `left-right-middle` or `left-middle-right`, controls which button corresponds to a two-finger tap and a three-finger tap.
|
||||||
- `click-method`: can be `button-areas` or `clickfinger`, changes the [click method](https://wayland.freedesktop.org/libinput/doc/latest/clickpad-softbuttons.html).
|
- `click-method`: can be `button-areas` or `clickfinger`, changes the [click method](https://wayland.freedesktop.org/libinput/doc/latest/clickpad-softbuttons.html).
|
||||||
- `disabled-on-external-mouse`: do not send events while external pointer device is plugged in.
|
- `disabled-on-external-mouse`: do not send events while external pointer device is plugged in.
|
||||||
|
|||||||
Reference in New Issue
Block a user