i think you can re-implement the keyPressEvent() and get the key with QKeyEvent::key();