feat: screen aware answers

This commit is contained in:
tux
2025-07-02 06:10:13 +05:30
parent 6596db6775
commit d558405afe
4 changed files with 159 additions and 21 deletions

View File

@@ -32,6 +32,14 @@
<TextBlock FontSize="12" Text="SHIFT + \" />
</StackPanel>
</Border>
<Border Background="Black" BorderBrush="#19ffffff" BorderThickness="2" CornerRadius="5"
Margin="0 0 10 0">
<StackPanel Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center"
Spacing="5" Margin="10 0">
<TextBlock FontSize="12" Text="Screen:" />
<TextBlock FontSize="12" Text="SHIFT + S" />
</StackPanel>
</Border>
<Button Name="ChatBtn" Background="Transparent" Click="ChatBtnClick">
<iconPacks:PackIconLucide Grid.Column="1" Kind="Brain" Height="16" Width="16" />
</Button>

View File

@@ -80,12 +80,18 @@ public partial class MainWindow : Window
bool hasShift = (e.RawEvent.Mask & EventMask.Shift) != EventMask.None;
bool hasH = e.Data.KeyCode == KeyCode.VcH;
bool hasBackslash = e.Data.KeyCode == KeyCode.VcBackslash;
bool hasS = e.Data.KeyCode == KeyCode.VcS;
if (hasCtrl && hasShift && hasAlt && hasH)
{
ShowOverlay();
}
if (hasShift && hasS)
{
Dispatcher.UIThread.Post(() => { _chatUserControl.SendScreenshot(); });
}
if (hasShift && hasBackslash)
{
Dispatcher.UIThread.Post(() =>