The class QKeySequenceEdit already implements the relevant functionality and properly handles shortcuts using the Shift key. This fixes issue 19320
Dialogs