[Update] Save and register -able.
This commit is contained in:
@@ -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,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user