From 47adf37baacf3c3ad3a82324cfe64c535dcbd060 Mon Sep 17 00:00:00 2001 From: hpeuscher Date: Sat, 15 Jun 2024 21:03:49 +0200 Subject: [PATCH] added shortcut to run simulation --- src/frontend/LT1Main/LT1Main.vue | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/src/frontend/LT1Main/LT1Main.vue b/src/frontend/LT1Main/LT1Main.vue index c370fba..2d88b8b 100644 --- a/src/frontend/LT1Main/LT1Main.vue +++ b/src/frontend/LT1Main/LT1Main.vue @@ -67,6 +67,14 @@ export default defineComponent({ ChartAGP, }, + created() { + window.addEventListener('keydown', (e) => { + if (e.ctrlKey && e.key == 'Enter') { + this.run() + } + }) + }, + data() { return { patient: {} as Patient, @@ -200,7 +208,7 @@ export default defineComponent({ -
+
+
+
+ {{ $t("shortcut") }} +
@@ -226,11 +238,9 @@ export default defineComponent({ /* button "run simulation" */ input#startbutton { - float: right; - margin: 1rem; + margin: 1rem 0rem 0.2rem; padding: 0.5rem; font-size: 1rem; - padding: 0.5em; } @@ -241,6 +251,7 @@ input#startbutton { "settings": "Settings", "run": "run simulation", "results": "Results", + "shortcut": "or press Ctrl+Enter", } @@ -248,5 +259,6 @@ input#startbutton { "settings": "Einstellungen", "run": "Simulation starten", "results": "Ergebnisse", + "shortcut": "oder Strg+Eingabe drücken" }