Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Capture Alt+Shift keypress...
Forum Updated to NodeBB v4.3 + New Features

Capture Alt+Shift keypress...

Scheduled Pinned Locked Moved Unsolved General and Desktop
5 Posts 3 Posters 477 Views 3 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.
  • K Offline
    K Offline
    kepeter
    wrote on last edited by
    #1

    I wonder if there is a way to capture the Alt+Shift (no additional key) key combination...
    From a simple test I found that Alt alone and Shift alone does create an event, but the combination of the two does nothing...

    M 1 Reply Last reply
    0
    • K kepeter

      I wonder if there is a way to capture the Alt+Shift (no additional key) key combination...
      From a simple test I found that Alt alone and Shift alone does create an event, but the combination of the two does nothing...

      M Offline
      M Offline
      mpergand
      wrote on last edited by
      #2

      @kepeter
      On key event you can test the combinaison of the two with QEvent::modifiers()

      K 1 Reply Last reply
      0
      • M mpergand

        @kepeter
        On key event you can test the combinaison of the two with QEvent::modifiers()

        K Offline
        K Offline
        kepeter
        wrote on last edited by
        #3

        @mpergand
        It never gets to the keyPressEvent for that combination...
        It does for Alt alone and Shift alone, but never hits the event handler for the combination, unless I add a 3rd key (like a letter)

        JonBJ 1 Reply Last reply
        0
        • K kepeter

          @mpergand
          It never gets to the keyPressEvent for that combination...
          It does for Alt alone and Shift alone, but never hits the event handler for the combination, unless I add a 3rd key (like a letter)

          JonBJ Online
          JonBJ Online
          JonB
          wrote on last edited by JonB
          #4

          @kepeter
          It seems very relevant to me for this question to state which platform/OS you are on?
          Maybe the OS/desktop manager might treat Alt+Shift* alone specially?

          Under Windows 11 it brings up the desktop's "Input Language Change?" popup window to say do you really want to change your keyboard language. Could this be relevant to you? Don't know whether you use Windows., which is why it helps to say.

          K 1 Reply Last reply
          1
          • JonBJ JonB

            @kepeter
            It seems very relevant to me for this question to state which platform/OS you are on?
            Maybe the OS/desktop manager might treat Alt+Shift* alone specially?

            Under Windows 11 it brings up the desktop's "Input Language Change?" popup window to say do you really want to change your keyboard language. Could this be relevant to you? Don't know whether you use Windows., which is why it helps to say.

            K Offline
            K Offline
            kepeter
            wrote on last edited by
            #5

            @JonB
            I'm on Fedora... In any case I would expect to receive the keys before the OS as I have the focused window with the input...

            1 Reply Last reply
            0

            • Login

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • Users
            • Groups
            • Search
            • Get Qt Extensions
            • Unsolved