Forked from kylelemons/xbox
Hacked together "joystick driver" for XboxOne controllers on OSX -- converts Xbox One controller input into keyboard keystrokes. I took Kyle Lemmons' Xbox One data packet parsing code and modified it to dump key commands to my key-injector server.
Plays Risk of Rain on an emulator well!
I basically combined Kyle Lemons' Xbox 360 code and Xbox One code and discretized the joystick input (so it can be translated to something like W,A,S,D or the arrow keys). Then the "driver" dumps key commands over Unix Domain sockets to the key-injector server which plays them to the OS.
First install the key-injector server
Then run:
go get github.com/bkase/xbox-one-fake-driver
Start the key-injector server:
python key-injector.py
Then plug in your Xbox One controller through the micro-usb port.
Then run:
cd $GOPATH/src/github.com/bkase/xbox-one-fake-driver
go run xbox.go
You'll need to re-plug the controller before you run the binary, (bug inherited from kylelemons/xbox ).
- Don't hardcode key controls in source code (load from JSON config or something similar)
- Remove code unnecessary for the Xbox One controller