-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathdemo.config.js
More file actions
96 lines (94 loc) · 2.86 KB
/
Copy pathdemo.config.js
File metadata and controls
96 lines (94 loc) · 2.86 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/**
* Demo config for MMM-KeyBindings
*
* Usage: node --run demo
*
* Keyboard shortcuts for testing:
* ArrowLeft / ArrowRight / ArrowUp / ArrowDown → shows alert (only in DEFAULT mode)
* Enter → shows alert (only in DEFAULT mode)
* h → changeMode to DEMO_MODE (arrows stop working)
* Return / Escape / Backspace → changeMode back to DEFAULT
*
* evdev is disabled so no Bluetooth device is required.
*/
const config = {
address: "0.0.0.0",
ipWhitelist: [],
logLevel: ["INFO", "LOG", "WARN", "ERROR"],
modules: [
{
module: "clock",
position: "top_left"
},
{
module: "alert",
config: {}
},
{
module: "compliments",
position: "middle_center",
config: {
compliments: {
anytime: ["MMM-KeyBindings Demo\n← → ↑ ↓ Enter — shows alert (DEFAULT mode only)\nh — switch to DEMO_MODE (arrows stop)\nReturn/Escape — back to DEFAULT"]
}
}
},
{
module: "MMM-KeyBindings",
config: {
enableKeyboard: true,
evdev: {enabled: false},
handleKeys: ["h"],
actions: [
{
key: "ArrowLeft",
state: "KEY_PRESSED",
mode: "DEFAULT",
notification: "SHOW_ALERT",
payload: {type: "notification", title: "MMM-KeyBindings", message: "← ArrowLeft pressed", timer: 2000}
},
{
key: "ArrowRight",
state: "KEY_PRESSED",
mode: "DEFAULT",
notification: "SHOW_ALERT",
payload: {type: "notification", title: "MMM-KeyBindings", message: "→ ArrowRight pressed", timer: 2000}
},
{
key: "ArrowUp",
state: "KEY_PRESSED",
mode: "DEFAULT",
notification: "SHOW_ALERT",
payload: {type: "notification", title: "MMM-KeyBindings", message: "↑ ArrowUp pressed", timer: 2000}
},
{
key: "ArrowDown",
state: "KEY_PRESSED",
mode: "DEFAULT",
notification: "SHOW_ALERT",
payload: {type: "notification", title: "MMM-KeyBindings", message: "↓ ArrowDown pressed", timer: 2000}
},
{
key: "Enter",
state: "KEY_PRESSED",
mode: "DEFAULT",
notification: "SHOW_ALERT",
payload: {type: "notification", title: "MMM-KeyBindings", message: "Enter pressed", timer: 2000}
},
{
key: "h",
changeMode: "DEMO_MODE"
},
{
key: "Return",
changeMode: "DEFAULT"
}
]
}
}
]
};
/** ************* DO NOT EDIT THE LINE BELOW ***************/
if (typeof module !== "undefined") {
module.exports = config;
}