feat: enhance Whisper language selection in onboarding with auto-detect option and switch Wayland paste shortcut to Ctrl+V.
This commit is contained in:
@@ -6,9 +6,7 @@ namespace Toak.IO.Injectors;
|
||||
|
||||
/// <summary>
|
||||
/// Text injector that writes text to the Wayland clipboard via <c>wl-copy</c>
|
||||
/// and then pastes it using Shift+Insert via <c>wtype</c>.
|
||||
/// Whitespace-only content is typed directly with <c>wtype</c> to avoid
|
||||
/// wl-copy silently stripping leading/trailing spaces from clipboard content.
|
||||
/// and then pastes it using Ctrl+V via <c>wtype</c>.
|
||||
/// </summary>
|
||||
public class WlClipboardTextInjector(INotifications notifications) : ITextInjector
|
||||
{
|
||||
@@ -39,11 +37,11 @@ public class WlClipboardTextInjector(INotifications notifications) : ITextInject
|
||||
|
||||
Task.Delay(100).Wait();
|
||||
|
||||
// Simulate Shift+Insert to paste into the focused window
|
||||
// Simulate Ctrl+V to paste into the focused window
|
||||
var pasteInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = Constants.Commands.TypeWayland,
|
||||
Arguments = "-M shift -k Insert -m shift",
|
||||
Arguments = "-M ctrl -k v -m ctrl",
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true
|
||||
};
|
||||
@@ -91,11 +89,11 @@ public class WlClipboardTextInjector(INotifications notifications) : ITextInject
|
||||
|
||||
await Task.Delay(100);
|
||||
|
||||
// Simulate Shift+Insert to paste into the focused window
|
||||
// Simulate Ctrl+V to paste into the focused window
|
||||
var pasteInfo = new ProcessStartInfo
|
||||
{
|
||||
FileName = Constants.Commands.TypeWayland,
|
||||
Arguments = "-M shift -k Insert -m shift",
|
||||
Arguments = "-M ctrl -k v -m ctrl",
|
||||
UseShellExecute = false,
|
||||
CreateNoWindow = true
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user