Sign in Join
Wiki copytemporary

Revision 2 of 2, by Trev on 2-21-2020. The page as it is now.

New LCL shortcut system

This page collects ideas about improving system of shortcuts in LCL.

Current state

pascal
TShortCut = Low(Word)..High(Word); // in classes.pp unit
 
// virtual key codes VK_*
Key := ShortCut and $FF; 
 
// key modifiers
Meta    := ShortCut and $1000; // scMeta
Shift   := ShortCut and $2000; // scShift
Control := ShortCut and $4000; // scControl
Alt     := ShortCut and $8000; // scAlt

Unused bits in TShortCut: $0F00

Requirements

  1. backward compatibility
    • accept current TShortCut format
    • new format can use only unused bits in current TShortCut format
  2. secondary, ternary shortcuts
  3. platform-specific shortcuts (E.g. Ctrl+C under Windows, Cmd+C under Mac OS X)
  4. shortcuts also with characters (E.g. Cmd+?)

Conclusion

TLCLShortCut class


From the Free Pascal wiki, page "New LCL shortcut system", as it stood on 2020-02-21 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.