npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

xbmc-xbox-controller

v0.0.2

Published

Control XBMC using an original Xbox controller

Downloads

4

Readme

XBMC Xbox Controller

icon Control XBMC using an original Xbox controller

Installation

First, install Node.js. Then run:

[sudo] npm install -g xbmc-xbox-controller

Linux

Everything should work out of the box, no extra work is needed

Mac OS X

You need to install the Xbox HID controller driver

If you are running Mountain Lion, Mavericks, or higher, you will need to install the latest version of this driver found in this blog post by using this direct link http://xhd.cvs.sourceforge.net/viewvc/xhd/xhd/Release/xhd_2_0_0.dmg?revision=1.3.

How To

After you have installed Node.js, this program using npm, and the necessary HID driver, you can fire up the program and everything should work automatically.

$ xbmc-xbox-controller
one controller found
opening device: USB_045e_0285_fd121000
connected to XBMC, ctrl-c to quit
^C

All events generated by the controller will be forwarded to XBMC over 127.0.0.1:9777, the EventServer API and will conform to gamepad.xml found in keymaps/ of XBMC.

If you have more than one controller, or xbmc-xbox-controller didn't automatically detect your controller you can get a list of all HID devices found on your machine with

$ xbmc-xbox-controller -l
USB_05ac_0252_fa120000: Apple Internal Keyboard / Trackpad
USB_05ac_8242_fd110000: Apple IR
USB_045e_0285_fd121000: Xbox Controller
USB_05ac_0252_fa120000: Apple Internal Keyboard / Trackpad
USB_05ac_0252_fa120000: Apple Internal Keyboard / Trackpad
USB_05ac_0252_fa120000: Apple Internal Keyboard / Trackpad

And then call this program with the correct device path

$ xbmc-xbox-controller USB_045e_0285_fd121000
opening device: USB_045e_0285_fd121000
connected to XBMC, ctrl-c to quit
^C

Add 1 or more -v arguments to get very verbose logging (by default no events are logged)

$ xbmc-xbox-controller -vv
one controller found
opening device: USB_045e_0285_fd121000
connected to XBMC, ctrl-c to quit
{"button":"dpadup","map":"XG","down":false}
{"button":"dpaddown","map":"XG","down":false}
{"button":"dpadleft","map":"XG","down":false}
{"button":"dpadright","map":"XG","down":false}
{"button":"start","map":"XG","down":false}
{"button":"back","map":"XG","down":false}
{"button":"leftthumbbutton","map":"XG","down":false}
{"button":"rightthumbbutton","map":"XG","down":false}
{"button":"A","map":"XG","down":false}
{"button":"B","map":"XG","down":false}
{"button":"X","map":"XG","down":false}
{"button":"Y","map":"XG","down":false}
{"button":"black","map":"XG","down":false}
{"button":"white","map":"XG","down":false}
{"button":"leftanalogtrigger","amount":0,"map":"XG","down":false}
{"button":"rightanalogtrigger","amount":0,"map":"XG","down":false}
{"button":"leftthumbstickleft","amount":0,"axis":1,"map":"XG","down":false}
{"button":"leftthumbstickright","amount":0,"down":0,"axis":1,"map":"XG"}
{"button":"leftthumbstickup","amount":0,"axis":1,"map":"XG","down":false}
{"button":"leftthumbstickdown","amount":0,"down":0,"axis":1,"map":"XG"}
{"button":"rightthumbstickleft","amount":0,"axis":1,"map":"XG","down":false}
{"button":"rightthumbstickright","amount":0,"down":0,"axis":1,"map":"XG"}
{"button":"rightthumbstickup","amount":0,"axis":1,"map":"XG","down":false}
{"button":"rightthumbstickdown","amount":0,"down":0,"axis":1,"map":"XG"}
24 updates sent in the last second
{"button":"dpadright","map":"XG","down":true}
{"button":"dpadright","map":"XG","down":false}
2 updates sent in the last second
{"button":"X","map":"XG","down":true}
{"button":"X","map":"XG","down":false}
2 updates sent in the last second
{"button":"rightanalogtrigger","amount":6144,"map":"XG","down":true}
{"button":"rightanalogtrigger","amount":8448,"map":"XG","down":true}
{"button":"rightanalogtrigger","amount":9216,"map":"XG","down":true}
{"button":"rightanalogtrigger","amount":11776,"map":"XG","down":true}
{"button":"rightanalogtrigger","amount":12032,"map":"XG","down":true}
^C

Usage

usage: xbmc-xbox-controller [HID path]

control XBMC using an original Xbox controller

  -d, --deadzone <percent>      [env XBOX_XBMC_DEADZONE] deadzone for analog sticks, defaults to 25
  -h, --help                    print this message and exit
  -H, --host <host>             [env XBOX_XBMC_HOST] host on which to listen, defaults to localhost
  -l, --list                    list all HID devices found and exit
  -p, --port <port>             [env XBOX_XBMC_PORT] port on which to listen, defaults to 9777
  -v, --verbose                 increase verbosity
  -V, --version                 print the version number and exit

License

MIT License