Unmaintained for 2 years, can't even find a git repo apart from an unofficial one
Can't get an identifier for a device that wouldn't change when connected to a different port or different for two devices of the same type (perhaps using the device name would cover most use cases and there's no need to complicate things)
To make sure that we are sending keys to the game, we might want to make sure that the game is the foreground window. Unfortunately it looks like it doesn't exist in C# (but calling the C API is easy enough: 1, 2). Or we could make it configurable but only the active window will receive it with SendInput.
Replicate JoyToKey:
Example configuration:
Depends on #15.
Do not:
I/O libraries and methods:
SendInput
.SendInput
andGet/SetKeyboardState
.SendWait
variant! It still requires the Windows version of .NET though.VkKeyScanW
is pretty useful to convert characters into virtual-key codes!SetKeyboardState
andGetKeyboardState
could be an easier alternative. Worth reading Keyboard Input Overview article.