[Update] Save and register -able.

This commit is contained in:
Sakamoto Shiina
2025-01-13 05:39:25 +09:00
parent a76ea77d5d
commit 34d221c437
9 changed files with 98 additions and 18 deletions

View File

@@ -1,24 +1,23 @@
import { useStore_Hotkeys } from "@store";
// import { useStdoutToPython } from "@logics/useStdoutToPython";
import { useStdoutToPython } from "@logics/useStdoutToPython";
export const useHotkeys = () => {
// const { asyncStdoutToPython } = useStdoutToPython();
const { asyncStdoutToPython } = useStdoutToPython();
const { currentHotkeys, updateHotkeys, pendingHotkeys } = useStore_Hotkeys();
const getHotkeys = () => {
// pendingHotkeys();
// asyncStdoutToPython("/get/data/osc_ip_address");
pendingHotkeys();
asyncStdoutToPython("/get/data/hotkeys");
};
const setHotkeys = (hotkeys) => {
updateHotkeys(hotkeys);
// pendingHotkeys();
// asyncStdoutToPython("/set/data/osc_ip_address", osc_ip_address);
pendingHotkeys();
asyncStdoutToPython("/set/data/hotkeys", hotkeys);
};
return {
currentHotkeys,
// getHotkeys,
getHotkeys,
updateHotkeys,
setHotkeys,
};