That crash did not occur in a console app, go figure.
This non-static class insulates using applications from crashing before InputInterceptor.Initialize();
How-To
SetFilter(context, predicate, filter)
context, returned by CreateContext(), is information for known keyboards and/or mice;
attaching or releasing any will not be detected without re-running CreateContext().
predicate is a device filtering routine, taking device as an argument
and returning true if that device is interesting.
For example: return (12 == device); // second mouse
Sadly, predicates must be C routines, not C# methods;
only interception_is_mouse and interception_is_keyboard are provided.
Predicating to a single device must be done in the callback.
filter is a keyboard or mouse event bitmask; see Enums.cs
For all events from a selected mouse, use MouseFilter.All.