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:
Tarasov Aleksandr
2026-04-12 17:05:10 +03:00
committed by GitHub
parent cb56cb3a04
commit 42c0170044
6 changed files with 119 additions and 26 deletions
+13
View File
@@ -106,6 +106,19 @@ pub fn parse_command(request: &Request) -> Option<Box<dyn Executable + Send>> {
let slot = request.args.get("slot").cloned();
Some(Box::new(ClearHotkeyKeyCommand { slot }))
}
"set_hotkey_action_and_key" => {
let slot = request.args.get("slot").cloned();
let action = request
.args
.get("action")
.and_then(|s| serde_json::from_str::<Request>(s).ok());
let key_chord = request.args.get("key_chord").cloned();
Some(Box::new(SetHotkeyActionAndKeyCommand {
slot,
action,
key_chord,
}))
}
_ => None,
}
}