mirror of
https://fastgit.cc/github.com/sourcegit-scm/sourcegit
synced 2026-04-21 05:10:25 +08:00
feature: allow Doubao detecting selection in commit message box on Windows
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
@@ -6,6 +6,7 @@ using System.IO;
|
||||
using Avalonia;
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Input;
|
||||
using Avalonia.Interactivity;
|
||||
using Avalonia.Layout;
|
||||
using Avalonia.Media;
|
||||
@@ -273,6 +274,19 @@ namespace SourceGit.Views
|
||||
}
|
||||
}
|
||||
|
||||
protected override void OnKeyDown(KeyEventArgs e)
|
||||
{
|
||||
// Supports Ctrl+Insert for copy. (Doubao uses Ctrl+Insert to detect selection)
|
||||
if (e.Key == Key.Insert && e.KeyModifiers == KeyModifiers.Control)
|
||||
{
|
||||
Copy();
|
||||
e.Handled = true;
|
||||
return;
|
||||
}
|
||||
|
||||
base.OnKeyDown(e);
|
||||
}
|
||||
|
||||
protected override void OnTextChanged(EventArgs e)
|
||||
{
|
||||
base.OnTextChanged(e);
|
||||
|
||||
Reference in New Issue
Block a user