See QShortcut and its activated() signal.