mirror of
https://github.com/tuxdotrs/highminded.git
synced 2025-08-23 08:01:03 +05:30
feat: add application quit binding
This commit is contained in:
@@ -41,6 +41,7 @@ Get the appropriate binary for your platform from the [release page](https://git
|
|||||||
|--------------------------------|----------------------------------------------------------------------------------------------------------------|
|
|--------------------------------|----------------------------------------------------------------------------------------------------------------|
|
||||||
| `Shift` + `\` | Toggle Window Visibility |
|
| `Shift` + `\` | Toggle Window Visibility |
|
||||||
| `Shift` + `S` | Capture screenshot and send to LLM |
|
| `Shift` + `S` | Capture screenshot and send to LLM |
|
||||||
|
| `Alt` + `Shift` + `Q` | Quit application |
|
||||||
| `Ctrl` + `Alt` + `Shift` + `H` | Make windows visible to screenshare.<br> **Note: Application restart is required to make it invisible again.** |
|
| `Ctrl` + `Alt` + `Shift` + `H` | Make windows visible to screenshare.<br> **Note: Application restart is required to make it invisible again.** |
|
||||||
|
|
||||||
<!-- CONTRIBUTING -->
|
<!-- CONTRIBUTING -->
|
||||||
|
@@ -1,6 +1,8 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
using System;
|
using System;
|
||||||
|
using System.Net.Quic;
|
||||||
using System.Runtime.InteropServices;
|
using System.Runtime.InteropServices;
|
||||||
|
using Avalonia;
|
||||||
using Avalonia.Input;
|
using Avalonia.Input;
|
||||||
using Avalonia.Interactivity;
|
using Avalonia.Interactivity;
|
||||||
using Avalonia.Media;
|
using Avalonia.Media;
|
||||||
@@ -81,6 +83,7 @@ public partial class MainWindow : Window
|
|||||||
bool hasH = e.Data.KeyCode == KeyCode.VcH;
|
bool hasH = e.Data.KeyCode == KeyCode.VcH;
|
||||||
bool hasBackslash = e.Data.KeyCode == KeyCode.VcBackslash;
|
bool hasBackslash = e.Data.KeyCode == KeyCode.VcBackslash;
|
||||||
bool hasS = e.Data.KeyCode == KeyCode.VcS;
|
bool hasS = e.Data.KeyCode == KeyCode.VcS;
|
||||||
|
bool hasQ = e.Data.KeyCode == KeyCode.VcQ;
|
||||||
|
|
||||||
if (hasCtrl && hasShift && hasAlt && hasH)
|
if (hasCtrl && hasShift && hasAlt && hasH)
|
||||||
{
|
{
|
||||||
@@ -92,6 +95,11 @@ public partial class MainWindow : Window
|
|||||||
Dispatcher.UIThread.Post(() => { _chatUserControl.SendScreenshot(); });
|
Dispatcher.UIThread.Post(() => { _chatUserControl.SendScreenshot(); });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (hasAlt && hasShift && hasQ)
|
||||||
|
{
|
||||||
|
Dispatcher.UIThread.Post(() => { Environment.Exit(0); });
|
||||||
|
}
|
||||||
|
|
||||||
if (hasShift && hasBackslash)
|
if (hasShift && hasBackslash)
|
||||||
{
|
{
|
||||||
Dispatcher.UIThread.Post(() =>
|
Dispatcher.UIThread.Post(() =>
|
||||||
|
Reference in New Issue
Block a user