EXT‐KeyBoard - bugsounet/MMM-Bugsounet GitHub Wiki
This plugin allows to control your MirrorMirror² with a keyboard or a mini-keyboard
To install this plugin, try this command:
cd ~/MagicMirror/modules/MMM-Bugsounet
npm run setup:EXT-Keyboard{
module: 'MMM-Bugsounet/EXTs/EXT-Keyboard',
config: {
debug: false,
keyFinder: false,
keys: [
{
keyCode: 107, // key + of the keyboard
notification: "Bugsounet_VOLUME-SPEAKER_UP",
payload: null,
command: null,
sound: "up"
},
{
keyCode: 109, // key - of the keybord
notification: "Bugsounet_VOLUME-SPEAKER_DOWN",
payload: null,
command: null,
sound: "down"
}
]
}
},| Option | Description | Type | Default |
|---|---|---|---|
| debug | Enable or not the Debug mode | Boolean | false |
| keyFinder | Display keycode with MMM-Bugsounet Alert when a key is pressed | Boolean | false |
| keys | Define your keys rules (see bellow) | Array |
keys is an array of params for control your mirror.
This array need keyCode, notification, payload, command and sound parameter
| Option | Description | Type |
|---|---|---|
| keyCode | KeyCode number. You can catch it with keyFinder activated | Number |
| notification | Notification to send | String |
| payload | Payload associated to notification (optional) | String |
| command | Shell command to execute (optional) | String |
| sound | Name of the sound when executed (mp3 only) | String |
It can be discover when you activate keyFinder,
Just press a key and MMM-Bugsounet will say the associated keyCode and report it in this field
Generaly each module/plugins have some incoming notification for a fonction.
Just past the notification name
If needed you can add a payload to the notification
You want to execute an shell command (with python, bash, sh,...)
Your file must be in scripts directory
Sample: if you want to execute test.sh
command line is: command: "sh test.sh",
If you want to play a sound, just see in the resources directory
All sound must be in .mp3, just past the name without extension
