summaryrefslogtreecommitdiff
path: root/extension/react-app/src/tabs/gui.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'extension/react-app/src/tabs/gui.tsx')
-rw-r--r--extension/react-app/src/tabs/gui.tsx10
1 files changed, 7 insertions, 3 deletions
diff --git a/extension/react-app/src/tabs/gui.tsx b/extension/react-app/src/tabs/gui.tsx
index 1ea70dd2..e1ecec9e 100644
--- a/extension/react-app/src/tabs/gui.tsx
+++ b/extension/react-app/src/tabs/gui.tsx
@@ -217,9 +217,13 @@ function GUI(props: GUIProps) {
[client]
);
- const onMainTextInput = () => {
+ const onMainTextInput = (event?: any) => {
if (mainTextInputRef.current) {
- const input = (mainTextInputRef.current as any).inputValue;
+ let input = (mainTextInputRef.current as any).inputValue;
+ // cmd+enter to /edit
+ if (event?.metaKey) {
+ input = `/edit ${input}`;
+ }
(mainTextInputRef.current as any).setInputValue("");
if (!client) return;
@@ -352,7 +356,7 @@ function GUI(props: GUIProps) {
// }
ref={mainTextInputRef}
onEnter={(e) => {
- onMainTextInput();
+ onMainTextInput(e);
e.stopPropagation();
e.preventDefault();
}}