MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    UNSOLVED Change Pages with NumPad

    Troubleshooting
    3
    22
    156
    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.
    • DrKineticPie
      DrKineticPie last edited by

      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 Reply Quote 0
      • S
        sdetweil @DrKineticPie last edited by

        @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

        Create a working config
        How to add modules

        DrKineticPie 1 Reply Last reply Reply Quote 0
        • DrKineticPie
          DrKineticPie @sdetweil last edited by

          @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 Reply Quote 0
          • S
            sdetweil @DrKineticPie last edited by sdetweil

            @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

            Create a working config
            How to add modules

            DrKineticPie 1 Reply Last reply Reply Quote 0
            • DrKineticPie
              DrKineticPie @sdetweil last edited by

              @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 Reply Quote 0
              • S
                sdetweil @DrKineticPie last edited by

                @drkineticpie keystroke, keypress. same thing

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

                Sam

                Create a working config
                How to add modules

                DrKineticPie 1 Reply Last reply Reply Quote 0
                • DrKineticPie
                  DrKineticPie @sdetweil last edited by

                  @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 Reply Quote 0
                  • S
                    sdetweil @DrKineticPie last edited by

                    @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

                    Create a working config
                    How to add modules

                    DrKineticPie 2 Replies Last reply Reply Quote 0
                    • DrKineticPie
                      DrKineticPie @sdetweil last edited by DrKineticPie

                      @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 Reply Quote 0
                      • S
                        sdetweil @DrKineticPie last edited by

                        @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

                        Create a working config
                        How to add modules

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 1 / 3
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy