Skip to content
This repository has been archived by the owner on Aug 3, 2024. It is now read-only.

Commit

Permalink
print warning message if uinput fails
Browse files Browse the repository at this point in the history
  • Loading branch information
galister committed Feb 27, 2023
1 parent ae6c8b9 commit b05940d
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,17 @@
return;

var manager = OverlayManager.Initialize();
KeyboardProvider.Instance = new UInput();
try
{
KeyboardProvider.Instance = new UInput();
}
catch (ApplicationException)
{
Console.WriteLine("FATAL Could not register uinput device.");
Console.WriteLine("FATAL Check that you are in the `input` group or otherwise have access.");
Console.WriteLine("FATAL Try: sudo usermod -a -G input $USER");
return;
}

void SignalHandler(PosixSignalContext context)
{
Expand Down

0 comments on commit b05940d

Please sign in to comment.