• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

Change Pages with NumPad

Scheduled Pinned Locked Moved Unsolved Troubleshooting
22 Posts 3 Posters 4.1k Views 2 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Offline
    DrKineticPie
    last edited by Sep 10, 2021, 1:01 PM

    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'
                }
              }
            ]
          }
        },
       
    
    S 1 Reply Last reply Sep 10, 2021, 2:47 PM Reply Quote 0
    • S Away
      sdetweil @DrKineticPie
      last edited by Sep 10, 2021, 2:47 PM

      @drkineticpie your notification and payload are wrong

      the notification is ‘PAGE_CHANGED’
      and the payload is a number for the page to change to

      1
      or
      2
      note, no quotes. if quoted it’s a string, not a number

      Sam

      How to add modules

      learning how to use browser developers window for css changes

      D 1 Reply Last reply Sep 10, 2021, 2:53 PM Reply Quote 0
      • D Offline
        DrKineticPie @sdetweil
        last edited by Sep 10, 2021, 2:53 PM

        @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…

        S 1 Reply Last reply Sep 10, 2021, 2:56 PM Reply Quote 0
        • S Away
          sdetweil @DrKineticPie
          last edited by sdetweil Sep 10, 2021, 2:59 PM Sep 10, 2021, 2:56 PM

          @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#installation

          to verify the key name

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          D 1 Reply Last reply Sep 10, 2021, 3:04 PM Reply Quote 0
          • D Offline
            DrKineticPie @sdetweil
            last edited by Sep 10, 2021, 3:04 PM

            @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

            S 1 Reply Last reply Sep 10, 2021, 3:06 PM Reply Quote 0
            • S Away
              sdetweil @DrKineticPie
              last edited by Sep 10, 2021, 3:06 PM

              @drkineticpie keystroke, keypress. same thing

              there are tools in steps 1&2 to actually see the key response. before mm gets involved

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              D 1 Reply Last reply Sep 10, 2021, 3:09 PM Reply Quote 0
              • D Offline
                DrKineticPie @sdetweil
                last edited by Sep 10, 2021, 3:09 PM

                @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.

                S 1 Reply Last reply Sep 10, 2021, 3:13 PM Reply Quote 0
                • S Away
                  sdetweil @DrKineticPie
                  last edited by Sep 10, 2021, 3:13 PM

                  @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 mm

                  this.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

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  D 2 Replies Last reply Sep 10, 2021, 6:43 PM Reply Quote 0
                  • D Offline
                    DrKineticPie @sdetweil
                    last edited by DrKineticPie Sep 10, 2021, 7:24 PM Sep 10, 2021, 6:43 PM

                    @sdetweil
                    Apparently the keypass does not arrive at the mirror

                    However, I have to say that the shortcuts of magicmirror work.
                    I.mean F11 and Alt and a Key

                    S 1 Reply Last reply Sep 10, 2021, 7:49 PM Reply Quote 0
                    • S Away
                      sdetweil @DrKineticPie
                      last edited by Sep 10, 2021, 7:49 PM

                      @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

                      Sam

                      How to add modules

                      learning how to use browser developers window for css changes

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 1 / 3
                      1 / 3
                      • First post
                        1/22
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy