From b05940df563e5b44f9adc1257f7160d4a2870dd0 Mon Sep 17 00:00:00 2001 From: galister <22305755+galister@users.noreply.github.com> Date: Mon, 27 Feb 2023 19:49:05 +0100 Subject: [PATCH] print warning message if uinput fails --- Program.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Program.cs b/Program.cs index 9a4e1c8..a71c859 100644 --- a/Program.cs +++ b/Program.cs @@ -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) {