Files
hush/Hush.Input/src/XdotoolInput.cs
T
2026-03-22 02:25:16 +01:00

25 lines
553 B
C#

using System.Diagnostics;
namespace Hush.Input;
public class XdotoolInput : ITextInput
{
public async Task TypeString(string text)
{
var process = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "xdotool",
Arguments = $"type --delay 10 -- \"{text}\"",
UseShellExecute = false,
CreateNoWindow = true
}
};
process.Start();
await process.WaitForExitAsync();
process.Dispose();
}
}