From 8f11df460a247dfcaafd84ce3046605724d11998 Mon Sep 17 00:00:00 2001
From: Ariver <shanghai3168@gmail.com>
Date: Mon, 18 May 2026 17:20:11 +0800
Subject: [PATCH] feat: add hotkey input mode setting
---
VoiceSnapGo/services/config_service.go | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/VoiceSnapGo/services/config_service.go b/VoiceSnapGo/services/config_service.go
index 55fe812..6bffa6f 100755
--- a/VoiceSnapGo/services/config_service.go
+++ b/VoiceSnapGo/services/config_service.go
@@ -42,6 +42,18 @@
return s.cfg.SoundFeedback
}
+// SetHotkeyMode sets the voice input interaction mode.
+func (s *ConfigService) SetHotkeyMode(mode string) {
+ s.cfg.HotkeyMode = config.NormalizeHotkeyMode(mode)
+ config.Save(s.cfg)
+}
+
+// GetHotkeyMode returns the voice input interaction mode.
+func (s *ConfigService) GetHotkeyMode() string {
+ s.cfg.HotkeyMode = config.NormalizeHotkeyMode(s.cfg.HotkeyMode)
+ return s.cfg.HotkeyMode
+}
+
// SetCopyToClipboard sets whether recognized text remains in the clipboard after input.
func (s *ConfigService) SetCopyToClipboard(enabled bool) {
s.cfg.CopyToClipboard = enabled
--
Gitblit v1.9.3