Difference between revisions of "New LCL shortcut system"

From Free Pascal wiki
m (Requirements)
Line 19: Line 19:
 
# backward compatibility
 
# backward compatibility
 
#* accept current TShortCut format
 
#* accept current TShortCut format
 +
#* new format can use only unused bits in current TShortCut format
 
# secondary, ternary shortcuts
 
# secondary, ternary shortcuts
 
# platform-specific shortcuts (E.g. Ctrl+C under Windows, Cmd + C under Mac OS X)
 
# platform-specific shortcuts (E.g. Ctrl+C under Windows, Cmd + C under Mac OS X)
 
# shortcuts also with characters (E.g. Cmd + ?)
 
# shortcuts also with characters (E.g. Cmd + ?)

Revision as of 16:38, 9 October 2008

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

Current state

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 + ?)