Send pressed/released/deselected buttons to the connected device

This makes it easier for simple programs to listen to the serial connection.

Modify the singleMode variable to either:

- Only allow a single key to be selected
- Allow any (sub)set of possible keys

For C# sample connector code see https://gist.github.com/GieltjE/09bd6dc9e6194860df52d9db8e8ab8e4
This code also includes the ability to inject this python code without having to install it :)