Recent

Author Topic: Assigning more complex shortcuts?  (Read 1574 times)

EganSolo

  • Sr. Member
  • ****
  • Posts: 290
Assigning more complex shortcuts?
« on: July 18, 2019, 02:29:37 am »
I'm working on an app that requires more complex shortcuts associated with menu items. By complex shortcuts I mean a shrotcut like Ctrl + A + P, instead of the standard  Ctrl + A.

Since TShortCut is really of type word, it doesn't have the capacity to handle complex keystrokes. Furthermore, since TAction controls the display of the shortcut on the menu associated with it, it prevents me from displaying complex keystrokes on the menu.

I can see three avenues here:
  • Out of the box: Just don't use complex keystrokes. Pro:out of the box implementation. Con:non-intuitive keystrokes that will be hard to remember. Anyone had a similar requirement and implemented out of the box?
  • Custom TAction: Create a new Taction that accepts complex keystrokes. Does anyone have a ballpark idea of the complexity?
  • Middle-of-the-road: Write a form-level keystroke handle to process all keystrokes and implement the OnDrawItem event handler of the menu items to inject the right key combo

But I could be missing a completely obvious and simpler solution!

Please advise!

Egan.

 

TinyPortal © 2005-2018