xbox-ctrl
Node api for the xbox controller
Installation
As cli tool
$ [sudo] npm install xbox-ctrl -g
Programmatically
$ [sudo] npm install xbox-ctrl --save
Usage
CLI
Options
$ xbox-ctrl --helpUsage: xbox-ctrl <command>Commands:off [options] [controllers...] Turn off controllersvibrate [options] [controllers...] Vibrate controllerslist List connected controllersNode api for the xbox controllerOptions:-h, --help output usage information-V, --version output the version number
Synonym
This module is exported as xbox-ctrl
and as xctrl
.
Programmatically
Example
const xboxCtrl = ;// list connected controllersxboxCtrl; // => [1, 2]// turns off controller 1xboxCtrl;// turns off all controllersxboxCtrl;// vibrate controller 1xboxCtrl;// vibrate all controllersxboxCtrl;