public static void test() { createEngine(out var engine); engine.setConsoleLoggerSink(consoleLoggingLevel); var devices = RawDevice.list().ToArray(); using (var disp = engine.dispatcher()) { Console.WriteLine("Created a dispatcher"); using (var linuxDisp = ComLightCast.cast <iLinuxDispatcher>(disp.nativeDispatcher)) { // Console.WriteLine( "Casted to iLinuxDispatcher" ); string path = devices[0].eventInterface; linuxDisp.openInputDevice(path, new EventPrinter()); disp.run(); } } }
RawDevice iKeyboardInput.getKeyboardDevice() { // I've only plugged 2 USB devices, wireless receivers for Logitech G700s and VelociFire VM02WS, however Linux says there're many keyboards. // The keyboard that actually works on my system is event4. return(RawDevice.list().FirstOrDefault(d => d.eventInterface == "/dev/input/event4")); }