From 335f58a60c73fcf739fcb1c2eb5dee1e3b761712 Mon Sep 17 00:00:00 2001 From: tux Date: Sat, 5 Jul 2025 06:30:30 +0530 Subject: [PATCH] feat: update keybindings --- README.md | 6 +++--- models/MainViewModel.cs | 6 +++--- ui/windows/MainWindow.axaml.cs | 18 ++++++++++++++---- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 541b3d7..051bbfa 100644 --- a/README.md +++ b/README.md @@ -46,9 +46,9 @@ Get the appropriate binary for your platform from the [release page](https://git | Bind | Action | |--------------------------------|----------------------------------------------------------------------------------------------------------------| -| `Shift` + `\` | Toggle Window Visibility | -| `Shift` + `S` | Capture screenshot and send to LLM | -| `Shift` + `A` | Capture audio and send to LLM | +| `Alt` + `Shift` + `\` | Toggle Window Visibility | +| `Alt` + `Shift` + `S` | Capture screenshot and send to LLM | +| `Alt` + `Shift` + `A` | Capture audio and send to LLM | | `Alt` + `Shift` + `Q` | Quit application | | `Ctrl` + `Alt` + `Shift` + `H` | Make windows visible to screenshare.
**Note: Application restart is required to make it invisible again.** | diff --git a/models/MainViewModel.cs b/models/MainViewModel.cs index 9c9cf9d..54f67e1 100644 --- a/models/MainViewModel.cs +++ b/models/MainViewModel.cs @@ -5,9 +5,9 @@ namespace highminded.models; public partial class MainViewModel : ObservableObject { [ObservableProperty] private string _appName = "High Minded"; - [ObservableProperty] private string _hideShortcutKey = "SHIFT + \\"; - [ObservableProperty] private string _screenshotShortcutKey = "SHIFT + S"; - [ObservableProperty] private string _audioShortcutKey = "SHIFT + A"; + [ObservableProperty] private string _hideShortcutKey = "ALT + SHIFT + \\"; + [ObservableProperty] private string _screenshotShortcutKey = "ALT + SHIFT + S"; + [ObservableProperty] private string _audioShortcutKey = "ALT + SHIFT + A"; [ObservableProperty] private bool _isRecording = false; [ObservableProperty] private bool _isHidden = true; } \ No newline at end of file diff --git a/ui/windows/MainWindow.axaml.cs b/ui/windows/MainWindow.axaml.cs index 0e97fcb..ba42260 100644 --- a/ui/windows/MainWindow.axaml.cs +++ b/ui/windows/MainWindow.axaml.cs @@ -157,14 +157,24 @@ public partial class MainWindow : Window ShowOverlay(); } - if (hasShift && hasS) + if (hasAlt && hasShift && hasS) { Dispatcher.UIThread.Post(() => { _chatUserControl.SendScreenshot(); }); } - if (hasShift && hasA) + if (hasAlt && hasShift && hasA) { - Dispatcher.UIThread.Post(() => { _chatUserControl.StartRecord(); }); + Dispatcher.UIThread.Post(() => + { + if (!InMemoryDb.Obj.MainViewModel.IsRecording) + { + _chatUserControl.StartRecord(); + } + else + { + _chatUserControl.StopRecord(); + } + }); } if (hasAlt && hasShift && hasQ) @@ -172,7 +182,7 @@ public partial class MainWindow : Window Dispatcher.UIThread.Post(() => { Environment.Exit(0); }); } - if (hasShift && hasBackslash) + if (hasAlt && hasShift && hasBackslash) { Dispatcher.UIThread.Post(() => {