

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: LicenseĬopyright (c) 2014 Carl Danley and contributors You can use the hid-mapper tool which will help you create all the necessary mappings to save to your configuration file. Each configuration file contains the pins/values mapped to the name of each button, joystick or status. They are namespaced by platform/vendor.json. You can add controller configuration files to the controllers directory. :release - No data is attached to this callback but it serves the purpose of notifying the developer that a button (that was previously pressed) has been released.Ī status value is read from a pin on the hardware and then can be mapped to a "state" (based on the dictionary file).
#Retrolink n64 controller documentation how to#
The idea here is the dictionary file will dictate how the controller will be used and how to read data from it. It's possible that a controller could make use of all 3 different components or even introduce additional components. This package supports up to 3 different types of components: joysticks, buttons and statuses (like battery level, charging, etc). Please note: it's better to be explicit and specify the exact product ID so you don't run into any confusion with the configuration that's loaded. Var GamePad = require ( 'node-gamepad' ) var controller = new GamePad ( 'snes' )
