There are many examples on how to define a ShortCut in a Delphi program, but they boil down to just two different ways:
- Add any of the scCtrl, scShift and scAlt constants to Ord() of the key
- Use the Menus.ShortCut function
e.g.
Action.ShortCut := scCtrl + scShift + Ord('K');
// vs
Action.ShortCut := Menus.ShortCut(Word('K'), [ssCtrl, ssShift]);
Is one of these two ways preferable? If yes, which one and why?