add shortcuts

This commit is contained in:
teh_coderer
2023-05-01 11:16:35 -04:00
parent 28d3072f45
commit 0cfd208527
2 changed files with 49 additions and 26 deletions

View File

@@ -65,6 +65,29 @@ export function PlotConfig({
},
{ preventDefault: true }
);
useHotkeys(
"ctrl+e",
() => {
changeColor(true);
},
{ preventDefault: true }
);
useHotkeys(
"ctrl+shift+s",
async () => {
setModal({ modal: "downloadCsv" });
await downloadCSV(document.getElementById("plotlyChart") as any);
},
{ preventDefault: true }
);
useHotkeys(
"ctrl+s",
async () => {
hideModebar();
downloadImage("MainChart", hideModebar, Loading);
},
{ preventDefault: true }
);
useHotkeys(
"ctrl+w",
() => {

File diff suppressed because one or more lines are too long