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.

    MMM-Keyboard setup

    Scheduled Pinned Locked Moved General Discussion
    6 Posts 2 Posters 457 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.
    • B Offline
      blt791
      last edited by

      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);
      }
      },

      S 2 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @blt791
        last edited by sdetweil

        @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

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • S Offline
          sdetweil @blt791
          last edited by sdetweil

          @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

          Sam

          How to add modules

          learning how to use browser developers window for css changes

          B 1 Reply Last reply Reply Quote 0
          • B Offline
            blt791 @sdetweil
            last edited by

            @sdetweil thank you for your quick response. Fingers crossed I do this right

            1 Reply Last reply Reply Quote 0
            • B Offline
              blt791
              last edited by

              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.

              S 1 Reply Last reply Reply Quote 0
              • S Offline
                sdetweil @blt791
                last edited by sdetweil

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

                You can walk thru the code line by line if need be

                Sam

                How to add modules

                learning how to use browser developers window for css changes

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  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