Is it possible to catch key up and key down on application level meaning before they are handled by the widgets? I want to be able to press a key for a while and then release it regardless of which widget that has the focus. Is there a generic way to do this, I am currently trying on Win32 and I tested inhereting keyPressed and keyReleased in my QMainWindow class and it works but as soon as a Widget has focus for instance if an element i selected in a list view the keyPressed event does not get to the MainWindow, the keyReleased event does however for some reason.