Read the statement by Michael Teeuw here.
MMM-Keyboard setup
-
Having a bit of difficulty getting this virtual keyboard running on my setup. I guess I’m not fully understanding so I thought I would ask instead of continuing to struggle. Do the following entries need to be added to the js file of every module that I want to use the keyboard in or is there a way to have a universal blanket entry somewhere?
this.sendNotification(“KEYBOARD”, {
key: “uniqueKey”,
style: “default”
});this.sendNotification(“KEYBOARD_INPUT”, {
key: “uniqueKey”,
message: “test”
});notificationReceived : function (notification, payload) {
if (notification == “KEYBOARD_INPUT” && payload.key === “uniqueKey”) {
console.log(payload.message);
}
}, -
@blt791 Those are for other modules to ask the keyboard module to do something
So yes, every module needs to add something to ask the keyboard to pop up, collect info and send it back
Nothing global in MagicMirror, as it was designed as output tool
-
@blt791 sendNotification is a broadcast message. ALL modules receive it. If they understand the notification string they can do something
And then send something back. In this case the unique key is used to match the response w the request
-
@sdetweil thank you for your quick response. Fingers crossed I do this right
-
Well, I tried and failed. I added the entries to the MMM-GoogleCalendarEventAdder module js file and not only did it not work, but it made the event adder disappear. I’m so lost but I’ll keep trying til I get it right.
-
@blt791 it’s quite a lot of work. You can use the developers window sources tab to debug the code
Ctrl-shift-i, select the sources tab
Navigate in the left nav to your module and it’s source fileYou can walk thru the code line by line if need be