From b19f66702fcdc9c4a7ab066e8dbca4e94bb5063e Mon Sep 17 00:00:00 2001 From: Ashley Wulber <48420062+wash2@users.noreply.github.com> Date: Fri, 19 Sep 2025 09:33:10 -0400 Subject: [PATCH] shortcuts: touchpad toggle keybind --- Cargo.lock | 35 +++++++++++++-------------- data/keybindings.ron | 1 + src/input/mod.rs | 2 ++ src/shell/layout/tiling/grabs/swap.rs | 1 + 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 664743b2..4f78b95e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -955,25 +955,23 @@ dependencies = [ [[package]] name = "cosmic-settings-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-settings-daemon#19f10525ff00d76558147ea060bd856a87122353" +source = "git+https://github.com/pop-os/cosmic-settings-daemon#8b3343794fb572e86fb835ec3b81648d67502288" dependencies = [ "cosmic-config", - "ron 0.9.0", + "ron 0.11.0", "serde", "serde_with", - "thiserror 2.0.14", "tracing", - "xkbcommon 0.7.0", + "xkbcommon 0.9.0", ] [[package]] name = "cosmic-settings-daemon-config" version = "0.1.0" -source = "git+https://github.com/pop-os/cosmic-settings-daemon#19f10525ff00d76558147ea060bd856a87122353" +source = "git+https://github.com/pop-os/cosmic-settings-daemon#8b3343794fb572e86fb835ec3b81648d67502288" dependencies = [ "cosmic-config", "cosmic-theme", - "ron 0.8.1", "serde", ] @@ -4502,18 +4500,6 @@ dependencies = [ "bytemuck", ] -[[package]] -name = "ron" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b91f7eff05f748767f183df4320a63d6936e9c6107d97c9e6bdd9784f4289c94" -dependencies = [ - "base64 0.21.7", - "bitflags 2.9.1", - "serde", - "serde_derive", -] - [[package]] name = "ron" version = "0.9.0" @@ -4540,6 +4526,19 @@ dependencies = [ "unicode-ident", ] +[[package]] +name = "ron" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "db09040cc89e461f1a265139777a2bde7f8d8c67c4936f700c63ce3e2904d468" +dependencies = [ + "base64 0.22.1", + "bitflags 2.9.1", + "serde", + "serde_derive", + "unicode-ident", +] + [[package]] name = "roxmltree" version = "0.19.0" diff --git a/data/keybindings.ron b/data/keybindings.ron index 7014285c..ff8621ba 100644 --- a/data/keybindings.ron +++ b/data/keybindings.ron @@ -120,4 +120,5 @@ (modifiers: [], key: "XF86AudioPrev"): System(PlayPrev), (modifiers: [], key: "XF86AudioNext"): System(PlayNext), (modifiers: [], key: "XF86PowerOff"): System(PowerOff), + (modifiers: [], key: "XF86TouchpadToggle"): System(TouchpadToggle), } diff --git a/src/input/mod.rs b/src/input/mod.rs index 46f9fa12..9c1f9c2d 100644 --- a/src/input/mod.rs +++ b/src/input/mod.rs @@ -1701,6 +1701,7 @@ impl State { )); let key_pattern = shortcuts::Binding { modifiers: cosmic_modifiers_from_smithay(modifiers.clone()), + keycode: None, key: Some(handle.modified_sym()), description: None, }; @@ -1759,6 +1760,7 @@ impl State { Action::Private(PrivateAction::Escape), shortcuts::Binding { modifiers: shortcuts::Modifiers::default(), + keycode: None, key: Some(Keysym::Escape), description: None, }, diff --git a/src/shell/layout/tiling/grabs/swap.rs b/src/shell/layout/tiling/grabs/swap.rs index 1f62d19c..82e8452e 100644 --- a/src/shell/layout/tiling/grabs/swap.rs +++ b/src/shell/layout/tiling/grabs/swap.rs @@ -80,6 +80,7 @@ impl KeyboardGrab for SwapWindowGrab { modifiers: modifiers .map(cosmic_modifiers_from_smithay) .unwrap_or_default(), + keycode: None, key: Some(handle.keysym_handle(keycode).modified_sym()), description: None, },