Setting/Disabling shortcuts
-
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?
-
@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 -
@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