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. Capturing a Modifier Sequence
Forum Update on Monday, May 27th 2025

Capturing a Modifier Sequence

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 473 Views
  • 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.
  • DannyL408D Offline
    DannyL408D Offline
    DannyL408
    wrote on last edited by
    #1

    Hello I would like to store a key sequence such as "Shift + 1" and i would like to store it as text so i can display it on the push button.

    Example i have a dialog to read "shift + 1" and it will display the keyseq onto the push button

    but the issue i have is that it will show the modified key instead of 1 : "Shift + !"

    how can i show the original key pressed and avoid this issue with ctrl and alt or any combination of those 3 ?

    raven-worxR 1 Reply Last reply
    0
    • DannyL408D DannyL408

      Hello I would like to store a key sequence such as "Shift + 1" and i would like to store it as text so i can display it on the push button.

      Example i have a dialog to read "shift + 1" and it will display the keyseq onto the push button

      but the issue i have is that it will show the modified key instead of 1 : "Shift + !"

      how can i show the original key pressed and avoid this issue with ctrl and alt or any combination of those 3 ?

      raven-worxR Offline
      raven-worxR Offline
      raven-worx
      Moderators
      wrote on last edited by
      #2

      @DannyL408
      well what are you currently using to create string?`Just the QKeyEvent's modifiers() and text() methods?
      Have you seen QKeySequence?

      Also see this

      --- SUPPORT REQUESTS VIA CHAT WILL BE IGNORED ---
      If you have a question please use the forum so others can benefit from the solution in the future

      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