initial commit
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
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();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user