most keypresses, even special buttons, go via a QKeyEvent that you can get on your QWidget that has focus. If you use qml, there are similar ways. Just search for "focus".
The thing you describe can be build by you, using Qt. The building blocks are there. Check the documentation :)