Read the statement by Michael Teeuw here.
Change Pages with NumPad
-
Hello,
I would like to change the pages from the Module “pages” via my NumPad, but somehow it doesn’t quite work.
Could someone give me an example of how I would have to configure this ?The whole thing currently looks like this for me:
module: 'MMM-KeyBindings', header: '', config: { evdev: { enabled: false }, enableKeyboard: true, actions: [ { key: '1', state: 'KEY_PRESSED', notification: 'PAGE_CHANGED 1', payload: { action: 'PAGE_CHANGED 1' } }, { key: '2', state: 'KEY_PRESSED', notification: 'PAGE_CHANGED, 2', payload: { action: 'PAGE_CHANGED 2' } } ] } },
-
@drkineticpie your notification and payload are wrong
the notification is ‘PAGE_CHANGED’
and the payload is a number for the page to change to1
or
2
note, no quotes. if quoted it’s a string, not a number -
@sdetweil Ich habe das gerade mal geändert, nur leider funktioniert es nicht.
Es ist eine Bluetooth Tastatur mit Empfänger liegt es daran?
Denn ich hab das gefühl das magicmirror die Tastatur nicht erkennt, der raspberry aber schon…In bad English :
I just changed that, but unfortunately it doesn’t work.
It’s a Bluetooth keyboard with receiver is it because?
Because I have the feeling that magicmirror does not recognize the keyboard, but the raspberry does… -
@drkineticpie magic mirror is a web page.
are u getting the key u expect?
is the key-bindings module getting the keystroke?
did u try the steps in
https://github.com/shbatm/MMM-KeyBindings#installationto verify the key name
-
@sdetweil
What do you mean by keystroke?I’m really not sure if magicmirror gets the button as a web app I would have to test more closely
-
@drkineticpie keystroke, keypress. same thing
there are tools in steps 1&2 to actually see the key response. before mm gets involved
-
@sdetweil Then I take a closer look at it with the instructions.
As I said, the Numpad is connected via USB dongle and is recognized but magic mirror apparently does not.
-
@drkineticpie also u can enable a bit more logging from the module
edit the node_helper.js
and uncomment line 69 ( remove the //), and restart mmthis.evdevReader.on("EV_KEY", (data) => { // console.log("key : ", data.code, data.value);
and the module will write a message for each key detected
the messages will be shown in the terminal window where you do npm start
-
@sdetweil
Apparently the keypass does not arrive at the mirrorHowever, I have to say that the shortcuts of magicmirror work.
I.mean F11 and Alt and a Key -
@drkineticpie is there a key definition in the test steps defined in the module instructions?
do u need to use a special device name to read it?
also found by using the instructions