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. SHIFT+F3

SHIFT+F3

Scheduled Pinned Locked Moved C / C++ / MFC
7 Posts 4 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.
  • J Offline
    J Offline
    johnalek
    wrote on last edited by
    #1

    Hi How we code for combination of keys like SHIFT+F3

    #sanroop#

    G R C 3 Replies Last reply
    0
    • J johnalek

      Hi How we code for combination of keys like SHIFT+F3

      #sanroop#

      G Offline
      G Offline
      Gwenio
      wrote on last edited by
      #2

      Depends on the program. Are you using a window? If so, then when you get key up/down (which ever is more appropriate) event for F3, use the following code to test if the shift key is up or down:

      if (GetKeyState(VK_SHIFT) < 0) /*do stuff*/;

      Notes: VK_SHIFT is equal to 16. The test is to see if the high order bit is set. There are other ways of doing this, but you need to give more information so that we can determine what would work best.

      1 Reply Last reply
      0
      • J johnalek

        Hi How we code for combination of keys like SHIFT+F3

        #sanroop#

        R Offline
        R Offline
        Rajesh R Subramanian
        wrote on last edited by
        #3

        If it were to be done system-wide, you'll need to install a keyboard hook. But you *do* have to provide more details. Please read the how to get an answer to your question sticky on top of the first page of this forum.

        “Follow your bliss.” – Joseph Campbell

        C 1 Reply Last reply
        0
        • R Rajesh R Subramanian

          If it were to be done system-wide, you'll need to install a keyboard hook. But you *do* have to provide more details. Please read the how to get an answer to your question sticky on top of the first page of this forum.

          “Follow your bliss.” – Joseph Campbell

          C Offline
          C Offline
          Code o mat
          wrote on last edited by
          #4

          For a system wide hot key he can also use RegisterHotKey[^].

          > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Sometimes you just have to hate coding to do it well. <

          R 1 Reply Last reply
          0
          • C Code o mat

            For a system wide hot key he can also use RegisterHotKey[^].

            > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Sometimes you just have to hate coding to do it well. <

            R Offline
            R Offline
            Rajesh R Subramanian
            wrote on last edited by
            #5

            Thanks, but I'm not the one who needs to know it. It may have helped if you had replied to the OP.

            “Follow your bliss.” – Joseph Campbell

            C 1 Reply Last reply
            0
            • R Rajesh R Subramanian

              Thanks, but I'm not the one who needs to know it. It may have helped if you had replied to the OP.

              “Follow your bliss.” – Joseph Campbell

              C Offline
              C Offline
              Code o mat
              wrote on last edited by
              #6

              Oups, sorry, yeah, i even wanted to do that but by the time i submitted it to you i completely forgot about it. Thanks for reminding me. :thumbsup:

              > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Sometimes you just have to hate coding to do it well. <

              1 Reply Last reply
              0
              • J johnalek

                Hi How we code for combination of keys like SHIFT+F3

                #sanroop#

                C Offline
                C Offline
                Code o mat
                wrote on last edited by
                #7

                For a system-wide hotkey you can use RegisterHotKey[^].

                > The problem with computers is that they do what you tell them to do and not what you want them to do. < > Sometimes you just have to hate coding to do it well. <

                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