shortcuts: touchpad toggle keybind

This commit is contained in:
Ashley Wulber 2025-09-19 09:33:10 -04:00 committed by GitHub
parent b75be5b305
commit b19f66702f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 21 additions and 18 deletions

35
Cargo.lock generated
View file

@ -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"

View file

@ -120,4 +120,5 @@
(modifiers: [], key: "XF86AudioPrev"): System(PlayPrev),
(modifiers: [], key: "XF86AudioNext"): System(PlayNext),
(modifiers: [], key: "XF86PowerOff"): System(PowerOff),
(modifiers: [], key: "XF86TouchpadToggle"): System(TouchpadToggle),
}

View file

@ -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,
},

View file

@ -80,6 +80,7 @@ impl KeyboardGrab<State> for SwapWindowGrab {
modifiers: modifiers
.map(cosmic_modifiers_from_smithay)
.unwrap_or_default(),
keycode: None,
key: Some(handle.keysym_handle(keycode).modified_sym()),
description: None,
},