Configurable shortcut for pasting the last transcription.
This commit is contained in:
parent
0c517c728b
commit
12f90c53d9
@ -121,9 +121,11 @@ class HotkeyManager: ObservableObject {
|
||||
self.whisperState = whisperState
|
||||
self.miniRecorderShortcutManager = MiniRecorderShortcutManager(whisperState: whisperState)
|
||||
|
||||
// Register Paste Last Transcription shortcut (Control + V)
|
||||
let pasteShortcut = KeyboardShortcuts.Shortcut(.v, modifiers: [.control])
|
||||
KeyboardShortcuts.setShortcut(pasteShortcut, for: .pasteLastTranscription)
|
||||
if KeyboardShortcuts.getShortcut(for: .pasteLastTranscription) == nil {
|
||||
let defaultPasteShortcut = KeyboardShortcuts.Shortcut(.v, modifiers: [.control])
|
||||
KeyboardShortcuts.setShortcut(defaultPasteShortcut, for: .pasteLastTranscription)
|
||||
}
|
||||
|
||||
KeyboardShortcuts.onKeyUp(for: .pasteLastTranscription) { [weak self] in
|
||||
guard let self = self else { return }
|
||||
Task { @MainActor in
|
||||
|
||||
@ -106,6 +106,23 @@ struct SettingsView: View {
|
||||
}
|
||||
}
|
||||
|
||||
SettingsSection(
|
||||
icon: "doc.on.clipboard.fill",
|
||||
title: "Paste Last Transcription",
|
||||
subtitle: "Configure shortcut to paste your most recent transcription"
|
||||
) {
|
||||
HStack(spacing: 12) {
|
||||
Text("Paste Shortcut")
|
||||
.font(.system(size: 13, weight: .medium))
|
||||
.foregroundColor(.secondary)
|
||||
|
||||
KeyboardShortcuts.Recorder(for: .pasteLastTranscription)
|
||||
.controlSize(.small)
|
||||
|
||||
Spacer()
|
||||
}
|
||||
}
|
||||
|
||||
// Recording Feedback Section
|
||||
SettingsSection(
|
||||
icon: "speaker.wave.2.bubble.left.fill",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user