mirror of
https://github.com/arabianq/pipewire-soundpad.git
synced 2026-04-28 14:31:23 +00:00
fix: hotkeys setting from pwsp-gui (#56)
* refactor: do not overwrite incorrect hotkeys config * fix: hotkeys not saved via pwsp-gui
This commit is contained in:
committed by
GitHub
parent
cb56cb3a04
commit
42c0170044
@@ -208,6 +208,18 @@ impl Request {
|
||||
pub fn clear_hotkey_key(slot: &str) -> Self {
|
||||
Request::new("clear_hotkey_key", vec![("slot", slot)])
|
||||
}
|
||||
|
||||
pub fn set_hotkey_action_and_key(slot: &str, action: &Request, key_chord: &str) -> Self {
|
||||
let action_json = serde_json::to_string(action).unwrap_or_default();
|
||||
Request::new(
|
||||
"set_hotkey_action_and_key",
|
||||
vec![
|
||||
("slot", slot),
|
||||
("action", &action_json),
|
||||
("key_chord", key_chord),
|
||||
],
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Default, Debug, Clone, Serialize, Deserialize)]
|
||||
|
||||
Reference in New Issue
Block a user