Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. C++ code to manage 3 keypads connected to one PC?

C++ code to manage 3 keypads connected to one PC?

Scheduled Pinned Locked Moved C / C++ / MFC
c++toolshelptutorialquestion
9 Posts 2 Posters 0 Views 1 Watching
  • 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.
  • M Offline
    M Offline
    Member 11677079
    wrote on last edited by
    #1

    3 users are connected to one pc using 3 usb keypads. A record is shown and each user have to input a number like 7.7 or 600 or 7.5 then they will press ENTER. Done. So as an example problem: user2 starts to type 7 and user1 starts typing 5. the computer is already getting 75. You can see the problem. I need a utility/code to isolate the input. I have seen it in an auction software and also using xbox playing games. In the auction software 3 black boxes are seen in the PC. Once a user starts the black box associated with that user, turn gray. Same as the other users. When all users have pressed ENTER, All boxes are revealed with the entries. Until now we only had to enter one digit per box, so 3 keypads were no problem. The system right now have the 3 boxes in the screen.

    S 1 Reply Last reply
    0
    • M Member 11677079

      3 users are connected to one pc using 3 usb keypads. A record is shown and each user have to input a number like 7.7 or 600 or 7.5 then they will press ENTER. Done. So as an example problem: user2 starts to type 7 and user1 starts typing 5. the computer is already getting 75. You can see the problem. I need a utility/code to isolate the input. I have seen it in an auction software and also using xbox playing games. In the auction software 3 black boxes are seen in the PC. Once a user starts the black box associated with that user, turn gray. Same as the other users. When all users have pressed ENTER, All boxes are revealed with the entries. Until now we only had to enter one digit per box, so 3 keypads were no problem. The system right now have the 3 boxes in the screen.

      S Offline
      S Offline
      Sascha Lefevre
      wrote on last edited by
      #2

      This article presents a solution for this problem in C# but relies on P/Invoke-ing, so it should be rather easy to re-implement it in C++: Using Raw Input from C# to handle multiple keyboards[^] I mentioned that article first because I know its solution works, but there are a lot more articles on keyboard hooking, some of which use C++, so there might be an even simpler solution for you: https://www.google.com/search?q=codeproject++low-level+keyboard+hook+in+C%23&ie=utf-8&oe=utf-8#q=codeproject+keyboard+hook[^]

      If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

      M 1 Reply Last reply
      0
      • S Sascha Lefevre

        This article presents a solution for this problem in C# but relies on P/Invoke-ing, so it should be rather easy to re-implement it in C++: Using Raw Input from C# to handle multiple keyboards[^] I mentioned that article first because I know its solution works, but there are a lot more articles on keyboard hooking, some of which use C++, so there might be an even simpler solution for you: https://www.google.com/search?q=codeproject++low-level+keyboard+hook+in+C%23&ie=utf-8&oe=utf-8#q=codeproject+keyboard+hook[^]

        If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

        M Offline
        M Offline
        Member 11677079
        wrote on last edited by
        #3

        That is the best news I got. Thanks, many thanks. It definitely address the objective. Now is time to digest all of it. Thanks again. I will keep you posted

        S 1 Reply Last reply
        0
        • M Member 11677079

          That is the best news I got. Thanks, many thanks. It definitely address the objective. Now is time to digest all of it. Thanks again. I will keep you posted

          S Offline
          S Offline
          Sascha Lefevre
          wrote on last edited by
          #4

          You're welcome! Good luck :)

          If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

          M 1 Reply Last reply
          0
          • S Sascha Lefevre

            You're welcome! Good luck :)

            If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

            M Offline
            M Offline
            Member 11677079
            wrote on last edited by
            #5

            Can you contact me? How can I contact a member?

            S 1 Reply Last reply
            0
            • M Member 11677079

              Can you contact me? How can I contact a member?

              S Offline
              S Offline
              Sascha Lefevre
              wrote on last edited by
              #6

              I would prefer it if you post follow-up questions here :) That would probably also be more helpful for you, since I'm not too much into C++; so other members could help out then.

              If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

              M 1 Reply Last reply
              0
              • S Sascha Lefevre

                I would prefer it if you post follow-up questions here :) That would probably also be more helpful for you, since I'm not too much into C++; so other members could help out then.

                If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

                M Offline
                M Offline
                Member 11677079
                wrote on last edited by
                #7

                I am not that good in c+++ and was hoping to find some one to help me to interface the code from Steve Messer and Emma Burrow. It would be great to reach either one. But it seems difficult.

                S 1 Reply Last reply
                0
                • M Member 11677079

                  I am not that good in c+++ and was hoping to find some one to help me to interface the code from Steve Messer and Emma Burrow. It would be great to reach either one. But it seems difficult.

                  S Offline
                  S Offline
                  Sascha Lefevre
                  wrote on last edited by
                  #8

                  In that case I would suggest to look at the other search results (articles) to find a solution that's already in C++

                  If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

                  M 1 Reply Last reply
                  0
                  • S Sascha Lefevre

                    In that case I would suggest to look at the other search results (articles) to find a solution that's already in C++

                    If the brain were so simple we could understand it, we would be so simple we couldn't. — Lyall Watson

                    M Offline
                    M Offline
                    Member 11677079
                    wrote on last edited by
                    #9

                    Excellent point.

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups