- Send notification based on button or axis pressed
- Exec command based on button or axis pressed
- Support of buttons combinations
cd modules
git clone https://github.com/victor-paumier/MMM-GamepadEvents
Edit your config/config.js
file and add a new object to the modules
:
{
module: "MMM-GamepadEvents",
config: {
showNotif : true,
showNotifPressed: false,
scanFrequency: 150,
combinations: []
}
}
Option | Description |
---|---|
showNotif |
Show a notification on event sent or command executed. Default value: true |
showNotifPressed |
Show a notification on button pressed. Useful to get button id or axis. Default value: false |
scanFrequency |
Frequency of the scan of inputs. Default value: 150 |
combinations |
Array of combinations with their event or command. (see Combination options) Default value: [] |
Option | Description |
---|---|
gamepad |
Array of buttons and/or axis parameters. (see Gamepad options) Required |
command |
The command to exec on combination pressed Optional |
event |
The event to send on combination pressed Optional |
param |
The param of the event Optional |
repeatEvent |
Send event only one time or repeat it each time the input is scanned Default value: false |
You can either define a button or more, a single axis with its axisValue, or both button(s) and axis.
Important
: this module has only been developed in the way to allow a single axis to be triggered in a single direction at a time
Option | Description |
---|---|
buttons |
Array of button ids. Optional Default value: [] |
axis |
The horizontal or vertical axis. Optional Possible values: X or Y |
axisValue |
The corresponding value of axis to decide between left/right or up/down Optional Possible values: -1 or 1 |
As the combinations are executed in the same order they are defined, and can only be call one time per scan (see scanFrequency
parameter), it is recommend to defined combinations with multiple buttons (or buttons with axis) before combination with single gamepad actions
- Short/Long press
- Specific showNotif per combination (& showNotifPressed?) options