From bf2a59f5efac4bc302fe266a3a83e6a7aa91efd1 Mon Sep 17 00:00:00 2001 From: sasha <33594434+sasha-computer@users.noreply.github.com> Date: Wed, 11 Feb 2026 02:55:31 +0000 Subject: [PATCH] feat: add configurable auto-submit after transcription paste (#765) * feat: add configurable auto-submit after transcription paste Add an Advanced output setting that can send Enter, Ctrl+Enter, or Cmd+Enter after text insertion so Handy works smoothly with different editor and agent submit shortcuts. This keeps the behavior opt-in, persists it in settings, and adds focused Rust tests for defaults and paste auto-submit decision logic. Co-authored-by: Cursor * feat: simplify auto submit configuration UX Replace the auto-submit toggle and key dropdown with a single dropdown that includes an Off state, so output behavior is clearer and faster to configure. Clarify Meta-key behavior by showing Cmd+Enter on macOS and Super+Enter on Windows/Linux, with matching localized copy. Co-authored-by: Cursor * use bindings generated on macos * and translations. --------- Co-authored-by: Cursor Co-authored-by: CJ Pais --- src-tauri/src/clipboard.rs | 80 ++++++++++++++++++- src-tauri/src/lib.rs | 2 + src-tauri/src/settings.rs | 36 +++++++++ src-tauri/src/shortcut/mod.rs | 31 ++++++- src/bindings.ts | 19 ++++- src/components/settings/AutoSubmit.tsx | 80 +++++++++++++++++++ .../settings/advanced/AdvancedSettings.tsx | 2 + src/i18n/locales/ar/translation.json | 11 +++ src/i18n/locales/cs/translation.json | 11 +++ src/i18n/locales/de/translation.json | 11 +++ src/i18n/locales/en/translation.json | 11 +++ src/i18n/locales/es/translation.json | 11 +++ src/i18n/locales/fr/translation.json | 11 +++ src/i18n/locales/it/translation.json | 11 +++ src/i18n/locales/ja/translation.json | 11 +++ src/i18n/locales/ko/translation.json | 11 +++ src/i18n/locales/pl/translation.json | 11 +++ src/i18n/locales/pt/translation.json | 11 +++ src/i18n/locales/ru/translation.json | 11 +++ src/i18n/locales/tr/translation.json | 11 +++ src/i18n/locales/uk/translation.json | 11 +++ src/i18n/locales/vi/translation.json | 11 +++ src/i18n/locales/zh/translation.json | 11 +++ src/stores/settingsStore.ts | 3 + 24 files changed, 424 insertions(+), 5 deletions(-) create mode 100644 src/components/settings/AutoSubmit.tsx diff --git a/src-tauri/src/clipboard.rs b/src-tauri/src/clipboard.rs index f5ebf92..f9b799f 100644 --- a/src-tauri/src/clipboard.rs +++ b/src-tauri/src/clipboard.rs @@ -1,6 +1,6 @@ use crate::input::{self, EnigoState}; -use crate::settings::{get_settings, ClipboardHandling, PasteMethod}; -use enigo::Enigo; +use crate::settings::{get_settings, AutoSubmitKey, ClipboardHandling, PasteMethod}; +use enigo::{Direction, Enigo, Key, Keyboard}; use log::info; use std::time::Duration; use tauri::{AppHandle, Manager}; @@ -446,6 +446,53 @@ fn paste_direct(enigo: &mut Enigo, text: &str) -> Result<(), String> { input::paste_text_direct(enigo, text) } +fn send_return_key(enigo: &mut Enigo, key_type: AutoSubmitKey) -> Result<(), String> { + match key_type { + AutoSubmitKey::Enter => { + enigo + .key(Key::Return, Direction::Press) + .map_err(|e| format!("Failed to press Return key: {}", e))?; + enigo + .key(Key::Return, Direction::Release) + .map_err(|e| format!("Failed to release Return key: {}", e))?; + } + AutoSubmitKey::CtrlEnter => { + enigo + .key(Key::Control, Direction::Press) + .map_err(|e| format!("Failed to press Control key: {}", e))?; + enigo + .key(Key::Return, Direction::Press) + .map_err(|e| format!("Failed to press Return key: {}", e))?; + enigo + .key(Key::Return, Direction::Release) + .map_err(|e| format!("Failed to release Return key: {}", e))?; + enigo + .key(Key::Control, Direction::Release) + .map_err(|e| format!("Failed to release Control key: {}", e))?; + } + AutoSubmitKey::CmdEnter => { + enigo + .key(Key::Meta, Direction::Press) + .map_err(|e| format!("Failed to press Meta/Cmd key: {}", e))?; + enigo + .key(Key::Return, Direction::Press) + .map_err(|e| format!("Failed to press Return key: {}", e))?; + enigo + .key(Key::Return, Direction::Release) + .map_err(|e| format!("Failed to release Return key: {}", e))?; + enigo + .key(Key::Meta, Direction::Release) + .map_err(|e| format!("Failed to release Meta/Cmd key: {}", e))?; + } + } + + Ok(()) +} + +fn should_send_auto_submit(auto_submit: bool, paste_method: PasteMethod) -> bool { + auto_submit && paste_method != PasteMethod::None +} + pub fn paste(text: String, app_handle: AppHandle) -> Result<(), String> { let settings = get_settings(&app_handle); let paste_method = settings.paste_method; @@ -491,6 +538,11 @@ pub fn paste(text: String, app_handle: AppHandle) -> Result<(), String> { } } + if should_send_auto_submit(settings.auto_submit, paste_method) { + std::thread::sleep(Duration::from_millis(50)); + send_return_key(&mut enigo, settings.auto_submit_key)?; + } + // After pasting, optionally copy to clipboard based on settings if settings.clipboard_handling == ClipboardHandling::CopyToClipboard { let clipboard = app_handle.clipboard(); @@ -501,3 +553,27 @@ pub fn paste(text: String, app_handle: AppHandle) -> Result<(), String> { Ok(()) } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn auto_submit_requires_setting_enabled() { + assert!(!should_send_auto_submit(false, PasteMethod::CtrlV)); + assert!(!should_send_auto_submit(false, PasteMethod::Direct)); + } + + #[test] + fn auto_submit_skips_none_paste_method() { + assert!(!should_send_auto_submit(true, PasteMethod::None)); + } + + #[test] + fn auto_submit_runs_for_active_paste_methods() { + assert!(should_send_auto_submit(true, PasteMethod::CtrlV)); + assert!(should_send_auto_submit(true, PasteMethod::Direct)); + assert!(should_send_auto_submit(true, PasteMethod::CtrlShiftV)); + assert!(should_send_auto_submit(true, PasteMethod::ShiftInsert)); + } +} diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs index 7c20467..deeefea 100644 --- a/src-tauri/src/lib.rs +++ b/src-tauri/src/lib.rs @@ -275,6 +275,8 @@ pub fn run() { shortcut::change_word_correction_threshold_setting, shortcut::change_paste_method_setting, shortcut::change_clipboard_handling_setting, + shortcut::change_auto_submit_setting, + shortcut::change_auto_submit_key_setting, shortcut::change_post_process_enabled_setting, shortcut::change_experimental_enabled_setting, shortcut::change_post_process_base_url_setting, diff --git a/src-tauri/src/settings.rs b/src-tauri/src/settings.rs index 545f73e..4fe66c8 100644 --- a/src-tauri/src/settings.rs +++ b/src-tauri/src/settings.rs @@ -141,6 +141,14 @@ pub enum ClipboardHandling { CopyToClipboard, } +#[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, Type)] +#[serde(rename_all = "snake_case")] +pub enum AutoSubmitKey { + Enter, + CtrlEnter, + CmdEnter, +} + #[derive(Serialize, Deserialize, Debug, Clone, Copy, PartialEq, Eq, Type)] #[serde(rename_all = "snake_case")] pub enum RecordingRetentionPeriod { @@ -191,6 +199,12 @@ impl Default for ClipboardHandling { } } +impl Default for AutoSubmitKey { + fn default() -> Self { + AutoSubmitKey::Enter + } +} + impl ModelUnloadTimeout { pub fn to_minutes(self) -> Option { match self { @@ -291,6 +305,10 @@ pub struct AppSettings { pub paste_method: PasteMethod, #[serde(default)] pub clipboard_handling: ClipboardHandling, + #[serde(default = "default_auto_submit")] + pub auto_submit: bool, + #[serde(default)] + pub auto_submit_key: AutoSubmitKey, #[serde(default = "default_post_process_enabled")] pub post_process_enabled: bool, #[serde(default = "default_post_process_provider_id")] @@ -372,6 +390,10 @@ fn default_paste_delay_ms() -> u64 { 60 } +fn default_auto_submit() -> bool { + false +} + fn default_history_limit() -> usize { 5 } @@ -625,6 +647,8 @@ pub fn get_default_settings() -> AppSettings { recording_retention_period: default_recording_retention_period(), paste_method: PasteMethod::default(), clipboard_handling: ClipboardHandling::default(), + auto_submit: default_auto_submit(), + auto_submit_key: AutoSubmitKey::default(), post_process_enabled: default_post_process_enabled(), post_process_provider_id: default_post_process_provider_id(), post_process_providers: default_post_process_providers(), @@ -771,3 +795,15 @@ pub fn get_recording_retention_period(app: &AppHandle) -> RecordingRetentionPeri let settings = get_settings(app); settings.recording_retention_period } + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn default_settings_disable_auto_submit() { + let settings = get_default_settings(); + assert!(!settings.auto_submit); + assert_eq!(settings.auto_submit_key, AutoSubmitKey::Enter); + } +} diff --git a/src-tauri/src/shortcut/mod.rs b/src-tauri/src/shortcut/mod.rs index 1225288..19056cf 100644 --- a/src-tauri/src/shortcut/mod.rs +++ b/src-tauri/src/shortcut/mod.rs @@ -20,8 +20,8 @@ use tauri::{AppHandle, Emitter, Manager}; use tauri_plugin_autostart::ManagerExt; use crate::settings::{ - self, get_settings, ClipboardHandling, KeyboardImplementation, LLMPrompt, OverlayPosition, - PasteMethod, ShortcutBinding, SoundTheme, APPLE_INTELLIGENCE_DEFAULT_MODEL_ID, + self, get_settings, AutoSubmitKey, ClipboardHandling, KeyboardImplementation, LLMPrompt, + OverlayPosition, PasteMethod, ShortcutBinding, SoundTheme, APPLE_INTELLIGENCE_DEFAULT_MODEL_ID, APPLE_INTELLIGENCE_PROVIDER_ID, }; use crate::tray; @@ -698,6 +698,33 @@ pub fn change_clipboard_handling_setting(app: AppHandle, handling: String) -> Re Ok(()) } +#[tauri::command] +#[specta::specta] +pub fn change_auto_submit_setting(app: AppHandle, enabled: bool) -> Result<(), String> { + let mut settings = settings::get_settings(&app); + settings.auto_submit = enabled; + settings::write_settings(&app, settings); + Ok(()) +} + +#[tauri::command] +#[specta::specta] +pub fn change_auto_submit_key_setting(app: AppHandle, key: String) -> Result<(), String> { + let mut settings = settings::get_settings(&app); + let parsed = match key.as_str() { + "enter" => AutoSubmitKey::Enter, + "ctrl_enter" => AutoSubmitKey::CtrlEnter, + "cmd_enter" => AutoSubmitKey::CmdEnter, + other => { + warn!("Invalid auto submit key '{}', defaulting to enter", other); + AutoSubmitKey::Enter + } + }; + settings.auto_submit_key = parsed; + settings::write_settings(&app, settings); + Ok(()) +} + #[tauri::command] #[specta::specta] pub fn change_post_process_enabled_setting(app: AppHandle, enabled: bool) -> Result<(), String> { diff --git a/src/bindings.ts b/src/bindings.ts index d4024eb..1a6e731 100644 --- a/src/bindings.ts +++ b/src/bindings.ts @@ -125,6 +125,22 @@ async changeClipboardHandlingSetting(handling: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("change_auto_submit_setting", { enabled }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, +async changeAutoSubmitKeySetting(key: string) : Promise> { + try { + return { status: "ok", data: await TAURI_INVOKE("change_auto_submit_key_setting", { key }) }; +} catch (e) { + if(e instanceof Error) throw e; + else return { status: "error", error: e as any }; +} +}, async changePostProcessEnabledSetting(enabled: boolean) : Promise> { try { return { status: "ok", data: await TAURI_INVOKE("change_post_process_enabled_setting", { enabled }) }; @@ -703,8 +719,9 @@ async isLaptop() : Promise> { /** user-defined types **/ -export type AppSettings = { bindings: Partial<{ [key in string]: ShortcutBinding }>; push_to_talk: boolean; audio_feedback: boolean; audio_feedback_volume?: number; sound_theme?: SoundTheme; start_hidden?: boolean; autostart_enabled?: boolean; update_checks_enabled?: boolean; selected_model?: string; always_on_microphone?: boolean; selected_microphone?: string | null; clamshell_microphone?: string | null; selected_output_device?: string | null; translate_to_english?: boolean; selected_language?: string; overlay_position?: OverlayPosition; debug_mode?: boolean; log_level?: LogLevel; custom_words?: string[]; model_unload_timeout?: ModelUnloadTimeout; word_correction_threshold?: number; history_limit?: number; recording_retention_period?: RecordingRetentionPeriod; paste_method?: PasteMethod; clipboard_handling?: ClipboardHandling; post_process_enabled?: boolean; post_process_provider_id?: string; post_process_providers?: PostProcessProvider[]; post_process_api_keys?: Partial<{ [key in string]: string }>; post_process_models?: Partial<{ [key in string]: string }>; post_process_prompts?: LLMPrompt[]; post_process_selected_prompt_id?: string | null; mute_while_recording?: boolean; append_trailing_space?: boolean; app_language?: string; experimental_enabled?: boolean; keyboard_implementation?: KeyboardImplementation; show_tray_icon?: boolean; paste_delay_ms?: number } +export type AppSettings = { bindings: Partial<{ [key in string]: ShortcutBinding }>; push_to_talk: boolean; audio_feedback: boolean; audio_feedback_volume?: number; sound_theme?: SoundTheme; start_hidden?: boolean; autostart_enabled?: boolean; update_checks_enabled?: boolean; selected_model?: string; always_on_microphone?: boolean; selected_microphone?: string | null; clamshell_microphone?: string | null; selected_output_device?: string | null; translate_to_english?: boolean; selected_language?: string; overlay_position?: OverlayPosition; debug_mode?: boolean; log_level?: LogLevel; custom_words?: string[]; model_unload_timeout?: ModelUnloadTimeout; word_correction_threshold?: number; history_limit?: number; recording_retention_period?: RecordingRetentionPeriod; paste_method?: PasteMethod; clipboard_handling?: ClipboardHandling; auto_submit?: boolean; auto_submit_key?: AutoSubmitKey; post_process_enabled?: boolean; post_process_provider_id?: string; post_process_providers?: PostProcessProvider[]; post_process_api_keys?: Partial<{ [key in string]: string }>; post_process_models?: Partial<{ [key in string]: string }>; post_process_prompts?: LLMPrompt[]; post_process_selected_prompt_id?: string | null; mute_while_recording?: boolean; append_trailing_space?: boolean; app_language?: string; experimental_enabled?: boolean; keyboard_implementation?: KeyboardImplementation; show_tray_icon?: boolean; paste_delay_ms?: number } export type AudioDevice = { index: string; name: string; is_default: boolean } +export type AutoSubmitKey = "enter" | "ctrl_enter" | "cmd_enter" export type BindingResponse = { success: boolean; binding: ShortcutBinding | null; error: string | null } export type ClipboardHandling = "dont_modify" | "copy_to_clipboard" export type CustomSounds = { start: boolean; stop: boolean } diff --git a/src/components/settings/AutoSubmit.tsx b/src/components/settings/AutoSubmit.tsx new file mode 100644 index 0000000..9228554 --- /dev/null +++ b/src/components/settings/AutoSubmit.tsx @@ -0,0 +1,80 @@ +import React from "react"; +import { useTranslation } from "react-i18next"; +import { Dropdown } from "../ui/Dropdown"; +import { SettingContainer } from "../ui/SettingContainer"; +import { useSettings } from "../../hooks/useSettings"; +import { useOsType } from "../../hooks/useOsType"; +import type { AutoSubmitKey } from "@/bindings"; + +interface AutoSubmitProps { + descriptionMode?: "inline" | "tooltip"; + grouped?: boolean; +} + +type AutoSubmitOptionValue = AutoSubmitKey | "off"; + +export const AutoSubmit: React.FC = React.memo( + ({ descriptionMode = "tooltip", grouped = false }) => { + const { t } = useTranslation(); + const osType = useOsType(); + const { getSetting, updateSetting, isUpdating } = useSettings(); + + const enabled = getSetting("auto_submit") ?? false; + const selectedKey = (getSetting("auto_submit_key") || + "enter") as AutoSubmitKey; + const selectedValue: AutoSubmitOptionValue = enabled ? selectedKey : "off"; + const submitWithMetaLabel = + osType === "macos" + ? t("settings.advanced.autoSubmit.options.cmdEnter") + : t("settings.advanced.autoSubmit.options.superEnter"); + + const autoSubmitOptions = [ + { + value: "off", + label: t("settings.advanced.autoSubmit.options.off"), + }, + { + value: "enter", + label: t("settings.advanced.autoSubmit.options.enter"), + }, + { + value: "ctrl_enter", + label: t("settings.advanced.autoSubmit.options.ctrlEnter"), + }, + { + value: "cmd_enter", + label: submitWithMetaLabel, + }, + ]; + + const handleAutoSubmitSelect = async (value: string) => { + const selected = value as AutoSubmitOptionValue; + + if (selected === "off") { + await updateSetting("auto_submit", false); + return; + } + + await updateSetting("auto_submit_key", selected as AutoSubmitKey); + if (!enabled) { + await updateSetting("auto_submit", true); + } + }; + + return ( + + + + ); + }, +); diff --git a/src/components/settings/advanced/AdvancedSettings.tsx b/src/components/settings/advanced/AdvancedSettings.tsx index e8d3630..e5c6185 100644 --- a/src/components/settings/advanced/AdvancedSettings.tsx +++ b/src/components/settings/advanced/AdvancedSettings.tsx @@ -9,6 +9,7 @@ import { AutostartToggle } from "../AutostartToggle"; import { ShowTrayIcon } from "../ShowTrayIcon"; import { PasteMethodSetting } from "../PasteMethod"; import { ClipboardHandlingSetting } from "../ClipboardHandling"; +import { AutoSubmit } from "../AutoSubmit"; import { PostProcessingToggle } from "../PostProcessingToggle"; import { AppendTrailingSpace } from "../AppendTrailingSpace"; import { HistoryLimit } from "../HistoryLimit"; @@ -36,6 +37,7 @@ export const AdvancedSettings: React.FC = () => { + diff --git a/src/i18n/locales/ar/translation.json b/src/i18n/locales/ar/translation.json index 769ecd3..0a5aadd 100644 --- a/src/i18n/locales/ar/translation.json +++ b/src/i18n/locales/ar/translation.json @@ -230,6 +230,17 @@ "copyToClipboard": "نسخ إلى الحافظة" } }, + "autoSubmit": { + "title": "إرسال تلقائي", + "description": "إرسال مجموعة المفاتيح المحددة تلقائياً بعد إدراج النص. Cmd+Enter ينطبق على macOS، بينما يستخدم Windows/Linux مفتاح Super+Enter.", + "options": { + "off": "إيقاف", + "enter": "Enter", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "الترجمة إلى الإنجليزية", "description": ".ترجمة الكلام من اللغات الأخرى تلقائياً إلى الإنجليزية أثناء التفريغ", diff --git a/src/i18n/locales/cs/translation.json b/src/i18n/locales/cs/translation.json index e4a6d21..9fc99a4 100644 --- a/src/i18n/locales/cs/translation.json +++ b/src/i18n/locales/cs/translation.json @@ -252,6 +252,17 @@ "copyToClipboard": "Kopírovat do schránky" } }, + "autoSubmit": { + "title": "Automatické odeslání", + "description": "Automaticky odešle vybranou kombinaci kláves po vložení textu. Cmd+Enter platí pro macOS, zatímco Windows/Linux používají Super+Enter.", + "options": { + "off": "Vypnuto", + "enter": "Enter", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "Překládat do angličtiny", "description": "Během přepisu automaticky překládat řeč z jiných jazyků do angličtiny.", diff --git a/src/i18n/locales/de/translation.json b/src/i18n/locales/de/translation.json index d0701af..0a8e5b5 100644 --- a/src/i18n/locales/de/translation.json +++ b/src/i18n/locales/de/translation.json @@ -252,6 +252,17 @@ "copyToClipboard": "In Zwischenablage kopieren" } }, + "autoSubmit": { + "title": "Automatisch absenden", + "description": "Sendet nach dem Einfügen von Text automatisch die ausgewählte Tastenkombination. Cmd+Enter gilt für macOS, während Windows/Linux Super+Enter verwenden.", + "options": { + "off": "Aus", + "enter": "Enter", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "Ins Englische übersetzen", "description": "Sprache aus anderen Sprachen automatisch während der Transkription ins Englische übersetzen.", diff --git a/src/i18n/locales/en/translation.json b/src/i18n/locales/en/translation.json index 6747356..85626fa 100644 --- a/src/i18n/locales/en/translation.json +++ b/src/i18n/locales/en/translation.json @@ -252,6 +252,17 @@ "copyToClipboard": "Copy to Clipboard" } }, + "autoSubmit": { + "title": "Auto Submit", + "description": "Automatically send the selected key combination after text insertion. Cmd+Enter applies on macOS, while Windows/Linux use Super+Enter.", + "options": { + "off": "Off", + "enter": "Enter", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "Translate to English", "description": "Automatically translate speech from other languages to English during transcription.", diff --git a/src/i18n/locales/es/translation.json b/src/i18n/locales/es/translation.json index de0833b..00bbe40 100644 --- a/src/i18n/locales/es/translation.json +++ b/src/i18n/locales/es/translation.json @@ -252,6 +252,17 @@ "copyToClipboard": "Copiar al Portapapeles" } }, + "autoSubmit": { + "title": "Envío automático", + "description": "Envía automáticamente la combinación de teclas seleccionada después de insertar el texto. Cmd+Enter se aplica en macOS, mientras que Windows/Linux usan Super+Enter.", + "options": { + "off": "Desactivado", + "enter": "Enter", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "Traducir al Inglés", "description": "Traducir automáticamente el habla de otros idiomas al inglés durante la transcripción.", diff --git a/src/i18n/locales/fr/translation.json b/src/i18n/locales/fr/translation.json index 66f81c5..5e11619 100644 --- a/src/i18n/locales/fr/translation.json +++ b/src/i18n/locales/fr/translation.json @@ -252,6 +252,17 @@ "copyToClipboard": "Copier dans le presse-papiers" } }, + "autoSubmit": { + "title": "Envoi automatique", + "description": "Envoie automatiquement la combinaison de touches sélectionnée après l'insertion du texte. Cmd+Enter s'applique sur macOS, tandis que Windows/Linux utilisent Super+Enter.", + "options": { + "off": "Désactivé", + "enter": "Entrée", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "Traduire en anglais", "description": "Traduire automatiquement la parole d'autres langues vers l'anglais pendant la transcription.", diff --git a/src/i18n/locales/it/translation.json b/src/i18n/locales/it/translation.json index f32be5c..1858b80 100644 --- a/src/i18n/locales/it/translation.json +++ b/src/i18n/locales/it/translation.json @@ -252,6 +252,17 @@ "copyToClipboard": "Copia negli Appunti" } }, + "autoSubmit": { + "title": "Invio automatico", + "description": "Invia automaticamente la combinazione di tasti selezionata dopo l'inserimento del testo. Cmd+Enter si applica su macOS, mentre Windows/Linux usano Super+Enter.", + "options": { + "off": "Disattivato", + "enter": "Enter", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "Traduci in inglese", "description": "Traduci automaticamente in inglese la voce in altre lingue durante la trascrizione.", diff --git a/src/i18n/locales/ja/translation.json b/src/i18n/locales/ja/translation.json index 04860a7..6f7e020 100644 --- a/src/i18n/locales/ja/translation.json +++ b/src/i18n/locales/ja/translation.json @@ -252,6 +252,17 @@ "copyToClipboard": "クリップボードにコピー" } }, + "autoSubmit": { + "title": "自動送信", + "description": "テキスト挿入後に選択したキーの組み合わせを自動的に送信します。macOSではCmd+Enter、Windows/LinuxではSuper+Enterが適用されます。", + "options": { + "off": "オフ", + "enter": "Enter", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "英語に翻訳", "description": "文字起こし中に他の言語から英語に自動的に翻訳。", diff --git a/src/i18n/locales/ko/translation.json b/src/i18n/locales/ko/translation.json index 6008684..866a430 100644 --- a/src/i18n/locales/ko/translation.json +++ b/src/i18n/locales/ko/translation.json @@ -252,6 +252,17 @@ "copyToClipboard": "클립보드에 복사" } }, + "autoSubmit": { + "title": "자동 제출", + "description": "텍스트 삽입 후 선택한 키 조합을 자동으로 전송합니다. macOS에서는 Cmd+Enter가, Windows/Linux에서는 Super+Enter가 적용됩니다.", + "options": { + "off": "끄기", + "enter": "Enter", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "영어로 번역", "description": "텍스트로 변환시 다른 언어의 음성을 자동으로 영어로 번역합니다.", diff --git a/src/i18n/locales/pl/translation.json b/src/i18n/locales/pl/translation.json index 410838d..0c313a3 100644 --- a/src/i18n/locales/pl/translation.json +++ b/src/i18n/locales/pl/translation.json @@ -252,6 +252,17 @@ "copyToClipboard": "Kopiuj do schowka" } }, + "autoSubmit": { + "title": "Automatyczne wysyłanie", + "description": "Automatycznie wysyła wybraną kombinację klawiszy po wstawieniu tekstu. Cmd+Enter dotyczy macOS, natomiast Windows/Linux używają Super+Enter.", + "options": { + "off": "Wyłączone", + "enter": "Enter", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "Tłumacz na angielski", "description": "Automatycznie tłumacz mowę z innych języków na angielski podczas transkrypcji.", diff --git a/src/i18n/locales/pt/translation.json b/src/i18n/locales/pt/translation.json index 81a50f8..feb0562 100644 --- a/src/i18n/locales/pt/translation.json +++ b/src/i18n/locales/pt/translation.json @@ -252,6 +252,17 @@ "copyToClipboard": "Copiar para Área de Transferência" } }, + "autoSubmit": { + "title": "Envio automático", + "description": "Envia automaticamente a combinação de teclas selecionada após a inserção do texto. Cmd+Enter aplica-se no macOS, enquanto Windows/Linux usam Super+Enter.", + "options": { + "off": "Desativado", + "enter": "Enter", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "Traduzir para Inglês", "description": "Traduzir automaticamente fala de outros idiomas para inglês durante a transcrição.", diff --git a/src/i18n/locales/ru/translation.json b/src/i18n/locales/ru/translation.json index 20ba794..bb67848 100644 --- a/src/i18n/locales/ru/translation.json +++ b/src/i18n/locales/ru/translation.json @@ -252,6 +252,17 @@ "copyToClipboard": "Копировать в буфер обмена" } }, + "autoSubmit": { + "title": "Автоматическая отправка", + "description": "Автоматически отправляет выбранную комбинацию клавиш после вставки текста. Cmd+Enter применяется на macOS, а Windows/Linux используют Super+Enter.", + "options": { + "off": "Выкл.", + "enter": "Enter", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "Перевести на английский", "description": "Автоматически переводить речь с других языков на английский во время транскрипции.", diff --git a/src/i18n/locales/tr/translation.json b/src/i18n/locales/tr/translation.json index ab1d9a0..37baa4e 100644 --- a/src/i18n/locales/tr/translation.json +++ b/src/i18n/locales/tr/translation.json @@ -252,6 +252,17 @@ "copyToClipboard": "Panoya Kopyala" } }, + "autoSubmit": { + "title": "Otomatik Gönder", + "description": "Metin eklendikten sonra seçilen tuş kombinasyonunu otomatik olarak gönderir. macOS'ta Cmd+Enter, Windows/Linux'ta Super+Enter geçerlidir.", + "options": { + "off": "Kapalı", + "enter": "Enter", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "İngilizceye Çevir", "description": "Transkripsiyon sırasında diğer dillerden İngilizceye otomatik olarak çevirir.", diff --git a/src/i18n/locales/uk/translation.json b/src/i18n/locales/uk/translation.json index 7ff0f69..17638d6 100644 --- a/src/i18n/locales/uk/translation.json +++ b/src/i18n/locales/uk/translation.json @@ -252,6 +252,17 @@ "copyToClipboard": "Копіювати в буфер обміну" } }, + "autoSubmit": { + "title": "Автоматичне надсилання", + "description": "Автоматично надсилає вибрану комбінацію клавіш після вставки тексту. Cmd+Enter застосовується на macOS, тоді як Windows/Linux використовують Super+Enter.", + "options": { + "off": "Вимк.", + "enter": "Enter", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "Перекласти на англійську", "description": "Автоматично перекладати мовлення з інших мов англійською під час транскрипції.", diff --git a/src/i18n/locales/vi/translation.json b/src/i18n/locales/vi/translation.json index 2e41fdd..cd237b6 100644 --- a/src/i18n/locales/vi/translation.json +++ b/src/i18n/locales/vi/translation.json @@ -252,6 +252,17 @@ "copyToClipboard": "Sao chép vào Clipboard" } }, + "autoSubmit": { + "title": "Gửi tự động", + "description": "Tự động gửi tổ hợp phím đã chọn sau khi chèn văn bản. Cmd+Enter áp dụng trên macOS, còn Windows/Linux dùng Super+Enter.", + "options": { + "off": "Tắt", + "enter": "Enter", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "Dịch sang tiếng Anh", "description": "Tự động dịch giọng nói từ các ngôn ngữ khác sang tiếng Anh trong quá trình chuyển đổi.", diff --git a/src/i18n/locales/zh/translation.json b/src/i18n/locales/zh/translation.json index 9c5f8e6..2b9b155 100644 --- a/src/i18n/locales/zh/translation.json +++ b/src/i18n/locales/zh/translation.json @@ -252,6 +252,17 @@ "copyToClipboard": "复制到剪贴板" } }, + "autoSubmit": { + "title": "自动提交", + "description": "在文本插入后自动发送所选的按键组合。macOS 上使用 Cmd+Enter,Windows/Linux 上使用 Super+Enter。", + "options": { + "off": "关闭", + "enter": "Enter", + "cmdEnter": "Cmd+Enter", + "superEnter": "Super+Enter", + "ctrlEnter": "Ctrl+Enter" + } + }, "translateToEnglish": { "label": "翻译为英语", "description": "在转录过程中自动将其他语言的语音翻译为英语。", diff --git a/src/stores/settingsStore.ts b/src/stores/settingsStore.ts index 6390860..5d5dfa8 100644 --- a/src/stores/settingsStore.ts +++ b/src/stores/settingsStore.ts @@ -114,6 +114,9 @@ const settingUpdaters: { paste_method: (value) => commands.changePasteMethodSetting(value as string), clipboard_handling: (value) => commands.changeClipboardHandlingSetting(value as string), + auto_submit: (value) => commands.changeAutoSubmitSetting(value as boolean), + auto_submit_key: (value) => + commands.changeAutoSubmitKeySetting(value as string), history_limit: (value) => commands.updateHistoryLimit(value as number), post_process_enabled: (value) => commands.changePostProcessEnabledSetting(value as boolean),