sc

steam-controller

NodeJS module for interfacing the Steam Controller - uses node-hid

Showing:

Popularity

Downloads/wk

8

GitHub Stars

34

Maintenance

Last Commit

6yrs ago

Contributors

1

Package

Dependencies

1

Size (min+gzip)

2.5KB

License

ISC

Type Definitions

Tree-Shakeable

No?

Categories

Readme

node-steam-controller

Description

The module lets you interact with the Steam Controller from valve. Its been tested on OSX so far and works great - it should be compatible with Windows and Linux as well.

Usage

npm install steam-controller
var steam = require('steam-controller');

var controller = new steam.steamController();

controller.connect();

controller.read(function(data){
  console.log(data);
});

Response

"button": {
  "A": false,
  "B": false,
  "X": false,
  "Y": false,
  "LB": false,
  "RB": false
},
"pad": {
  "value": "idle",
  "touched": false
},
"mouse": {
  "a": 0,
  "b": 0,
  "c": 0,
  "d": 0,
  "touched": false
},
"center": {
  "L": false,
  "R": false,
  "STEAM": false
},
"joystick": {
  "xdir": 0,
  "x": 0,
  "ydir": 0,
  "y": 0
},
"bottom": {
  "left": false,
  "right": false
},
"thumbstick": {
  "pressed": false,
  "xdir": 0,
  "x": 0,
  "ydir": 0,
  "y": 0
},
"trigger":{
  "left": 0,
  "right": 0
}

Note: sometimes it won't disconnect and reconnect to the controller right away when you restart a script. This is a fresh project so I'm working on making it more consistent, just keep in mind you may need to unplug and restart your controller if your script won't reconnect.

Rate & Review

Great Documentation0
Easy to Use0
Performant0
Highly Customizable0
Bleeding Edge0
Responsive Maintainers0
Poor Documentation0
Hard to Use0
Slow0
Buggy0
Abandoned0
Unwelcoming Community0
100