hey thk for module !
i try to use it but i have some problem:
i have put that on my conf file .
{
module : 'MMM-KeyBindings' ,
config : {
enableNotifyServer : false
}
},
i just want to use a local keyboard for now and i probably change after for remote.
and on my module of pages organisation
i have put your config :
Module.register("Print_text_from_txt",{
curentPage: -1,
defaults: {
updateInterval: 1000,// 30 * 60 * 1000 //reads the file every 30 mins
/*** defaults ***
*
* Add items below to your moduleName.js's `defaults` object
*
*/
/*** MMM-KeyBindings STANDARD MAPPING ***/
/* Add the "mode" you would like to respond to */
keyBindingsMode: "DEFAULT",
keyBindings: {
/* Add each key you want to respond to in the form:
* yourKeyName: "KeyName_from_MMM-KeyBindings"
*/
Right: "ArrowRight",
Left: "ArrowLeft",
/* ... */
},
},
/////////////////////////////
start: function(){
this.setupKeyBindings(); //key binding test
this.sendSocketNotification("START", this.config);
},
/////////////////////////////
notificationReceived: function(notification, payload){
if (this.validateKeyPress(notification, payload)) { return; }
if (notification === "PAGE_NUMBER_IS")
{
this.curentPage = payload
this.sendNotification("PAGE_CHANGED", this.curentPage);
}
///////////////////////////
i have clone directory on my module folder.
i have one error on console but she not cause by the module
TypeError: Failed to execute 'appendChild' on 'Node': parameter 1 is not of type 'Node'.
at updateModuleContent (main.js:206)
at main.js:139
at new Promise (<anonymous>)
at updateDomWithContent (main.js:137)
at main.js:119
at <anonymous>
i have probably miss something but i dont find :(
i haven’t notification on console
sorry for my bad language
and thanks for your help
edit:
i have miss on Line on config file
but notification is not hear and probably never send :(