Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Setting/Disabling shortcuts
QtWS25 Last Chance

Setting/Disabling shortcuts

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 Posters 887 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.
  • R Offline
    R Offline
    RobM
    wrote on last edited by RobM
    #1

    I have noticed that when I press spacebar on my keyboard during a running program it usually performs an action if one is available. Is there some way for me to customize which keys do what when pressed on my keyboard. For instance, spacebar or tab or what-have-you. Is there any documentation for which keys do what by default in QT creator?

    jsulmJ 1 Reply Last reply
    0
    • R RobM

      I have noticed that when I press spacebar on my keyboard during a running program it usually performs an action if one is available. Is there some way for me to customize which keys do what when pressed on my keyboard. For instance, spacebar or tab or what-have-you. Is there any documentation for which keys do what by default in QT creator?

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @RobM said in Setting button press commands:

      Is there any documentation for which keys do what by default in QT creator?

      It's actually the platform default where your app is running. Space is used to trigger action on widget which is currently in focus (like enter does). Tab is used to move focus to next widget.
      See https://doc.qt.io/qt-5/qshortcut.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      1
      • R Offline
        R Offline
        RobM
        wrote on last edited by
        #3

        So QShortcut will allow me to build in my own shortcuts, but is there a way to disable the built in shortcuts?

        jsulmJ 1 Reply Last reply
        0
        • R RobM

          So QShortcut will allow me to build in my own shortcuts, but is there a way to disable the built in shortcuts?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @RobM You can subclass widgets you want to use and reimplement https://doc.qt.io/qt-5/qwidget.html#keyPressEvent
          Keep in mind that to overwrite Tab and Shift+Tab you have to overwrite https://doc.qt.io/qt-5/qwidget.html#event
          See https://doc.qt.io/qt-5/qwidget.html#events

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          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