├── .gitignore ├── Packages ├── XE │ ├── ShortcutFinderImages.res │ └── nick.toolsapi.shortcut.DelphiShortcutFinder.dpk ├── XE2 │ ├── ShortcutFinderImages.res │ └── nick.toolsapi.shortcut.DelphiShortcutFinder.dpk ├── XE3 │ ├── ShortcutFinderImages.res │ └── nick.toolsapi.shortcut.DelphiShortcutFinder.dpk ├── XE4 │ ├── ShortcutFinderImages.res │ └── nick.toolsapi.shortcut.DelphiShortcutFinder.dpk ├── XE5 │ ├── ShortcutFinderImages.res │ └── nick.toolsapi.shortcut.DelphiShortcutFinder.dpk ├── XE6 │ ├── ShortcutFinderImages.res │ └── nick.toolsapi.shortcut.DelphiShortcutFinder.dpk ├── XE7 │ ├── ShortcutFinderImages.res │ └── nick.toolsapi.shortcut.DelphiShortcutFinder.dpk └── XE8 │ ├── ShortcutFinderImages.res │ └── nick.toolsapi.shortcut.DelphiShortcutFinder.dpk ├── README.md ├── Resources ├── ShortcutFinderImage.bmp └── ShortcutFinderImages.RC └── Source ├── Builders ├── nick.shortcut.builder.IShortCutItem.pas └── nick.shortcut.builder.ShortCutItem.pas ├── Elements ├── Base │ ├── nick.shortcut.element.DLLExpertBase.pas │ ├── nick.shortcut.element.DelphiEditorBase.pas │ └── nick.shortcut.element.PackageExpertBase.pas ├── Delphi │ ├── nick.shortcut.element.DelphiEditorBrief.pas │ ├── nick.shortcut.element.DelphiEditorClassic.pas │ ├── nick.shortcut.element.DelphiEditorDefault.pas │ ├── nick.shortcut.element.DelphiEditorEpsilon.pas │ ├── nick.shortcut.element.DelphiEditorVisualBasic.pas │ ├── nick.shortcut.element.DelphiEditorVisualStudio.pas │ └── nick.shortcut.element.DelphiMenu.pas └── ThirdParty │ ├── nick.shortcut.element.Castalia2014.pas │ ├── nick.shortcut.element.CnWizards.pas │ ├── nick.shortcut.element.DDevExtensions2.pas │ ├── nick.shortcut.element.DocumentInsight3.pas │ ├── nick.shortcut.element.GExperts137.pas │ ├── nick.shortcut.element.MMX10.pas │ ├── nick.shortcut.element.MMX11.pas │ ├── nick.shortcut.element.OSRegisteredHotKeys.pas │ ├── nick.shortcut.element.ParnassusOUBookmarks.pas │ ├── nick.shortcut.element.SmartInspect.pas │ └── nick.shortcut.element.XExPlusPack.pas ├── Exports ├── nick.shortcut.export.Csv.pas └── nick.shortcut.export.Html.pas ├── Frames ├── nick.shortcut.frame.Base.dfm ├── nick.shortcut.frame.Base.pas ├── nick.shortcut.frame.KnownShortcuts.dfm ├── nick.shortcut.frame.KnownShortcuts.pas ├── nick.shortcut.frame.SearchRegisteredShortcuts.dfm ├── nick.shortcut.frame.SearchRegisteredShortcuts.pas ├── nick.shortcut.frame.ShortCutKeyAllocation.dfm └── nick.shortcut.frame.ShortCutKeyAllocation.pas ├── Repositories ├── nick.shortcut.factory.IRepository.pas ├── nick.shortcut.factory.Repository.pas ├── nick.shortcut.other.FileVersionInformation.pas ├── nick.shortcut.other.IFileVersionInformation.pas ├── nick.shortcut.other.INodeXml.pas ├── nick.shortcut.repository.IIniFile.pas ├── nick.shortcut.repository.IRegistry.pas ├── nick.shortcut.repository.IShortcutExport.pas ├── nick.shortcut.repository.ISystem.pas ├── nick.shortcut.repository.IToolsApi.pas ├── nick.shortcut.repository.IXmlFile.pas ├── nick.shortcut.repository.IniFile.pas ├── nick.shortcut.repository.Registry.pas ├── nick.shortcut.repository.ShortCut.pas ├── nick.shortcut.repository.ShortcutExport.pas ├── nick.shortcut.repository.System.pas ├── nick.shortcut.repository.ToolsApi.pas └── nick.shortcut.repository.XmlFile.pas ├── nick.shortcut.core.IShortCutList.pas ├── nick.shortcut.core.IShortcutExportRegistry.pas ├── nick.shortcut.core.KnownShortcutsRegistration.pas ├── nick.shortcut.core.SearchRegisteredShortcutsRegistration.pas ├── nick.shortcut.core.ShortCutFinderRegistration.pas ├── nick.shortcut.core.ShortCutItem.pas ├── nick.shortcut.core.ShortCutList.pas ├── nick.shortcut.core.ShortcutExport.pas └── nick.shortcut.other.VirtualKeys.pas /.gitignore: -------------------------------------------------------------------------------- 1 | # Uncomment these types if you want even more clean repository. But be careful. 2 | # It can make harm to an existing project source. Read explanations below. 3 | # 4 | # Resource files are binaries containing manifest, project icon and version info. 5 | # They can not be viewed as text or compared by diff-tools. Consider replacing them with .rc files. 6 | *.res 7 | # 8 | # Type library file (binary). In old Delphi versions it should be stored. 9 | # Since Delphi 2009 it is produced from .ridl file and can safely be ignored. 10 | *.tlb 11 | # 12 | # Diagram Portfolio file. Used by the diagram editor up to Delphi 7. 13 | # Uncomment this if you are not using diagrams or use newer Delphi version. 14 | *.ddp 15 | # 16 | # Visual LiveBindings file. Added in Delphi XE2. 17 | # Uncomment this if you are not using LiveBindings Designer. 18 | *.vlb 19 | # 20 | # Deployment Manager configuration file for your project. Added in Delphi XE2. 21 | # Uncomment this if it is not mobile development and you do not use remote debug feature. 22 | *.deployproj 23 | # 24 | 25 | # Delphi compiler-generated binaries (safe to delete) 26 | *.exe 27 | *.dll 28 | *.bpl 29 | *.bpi 30 | *.dcp 31 | *.so 32 | *.apk 33 | *.drc 34 | *.map 35 | *.dres 36 | *.rsm 37 | *.tds 38 | *.dcu 39 | *.lib 40 | 41 | # Delphi autogenerated files (duplicated info) 42 | *.cfg 43 | *Resource.rc 44 | 45 | # Delphi local files (user-specific info) 46 | *.local 47 | *.identcache 48 | *.projdata 49 | *.tvsconfig 50 | *.dsk 51 | *.stat 52 | *.dproj 53 | 54 | # Delphi history and backups 55 | __history/ 56 | *.~* 57 | -------------------------------------------------------------------------------- /Packages/XE/ShortcutFinderImages.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickRing/Delphi-Shortcut-Finder/41747b940e5687c84fa7f9955f51b2880cbc307a/Packages/XE/ShortcutFinderImages.res -------------------------------------------------------------------------------- /Packages/XE/nick.toolsapi.shortcut.DelphiShortcutFinder.dpk: -------------------------------------------------------------------------------- 1 | package nick.toolsapi.shortcut.DelphiShortcutFinder; 2 | 3 | {$R *.res} 4 | {$ALIGN 8} 5 | {$ASSERTIONS ON} 6 | {$BOOLEVAL OFF} 7 | {$DEBUGINFO OFF} 8 | {$EXTENDEDSYNTAX ON} 9 | {$IMPORTEDDATA ON} 10 | {$IOCHECKS ON} 11 | {$LOCALSYMBOLS ON} 12 | {$LONGSTRINGS ON} 13 | {$OPENSTRINGS ON} 14 | {$OPTIMIZATION OFF} 15 | {$OVERFLOWCHECKS ON} 16 | {$RANGECHECKS ON} 17 | {$REFERENCEINFO ON} 18 | {$SAFEDIVIDE OFF} 19 | {$STACKFRAMES ON} 20 | {$TYPEDADDRESS OFF} 21 | {$VARSTRINGCHECKS ON} 22 | {$WRITEABLECONST OFF} 23 | {$MINENUMSIZE 1} 24 | {$IMAGEBASE $400000} 25 | {$DESCRIPTION 'IDE Shortcut Finder - https://github.com/NickRing/Delphi-Shortcut-Finder'} 26 | {$LIBSUFFIX 'XE'} 27 | {$IMPLICITBUILD ON} 28 | 29 | requires 30 | rtl, 31 | designide, 32 | VirtualTreesD, 33 | IndySystem, 34 | IndyProtocols, 35 | IndyCore; 36 | 37 | contains 38 | nick.shortcut.builder.IShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.IShortCutItem.pas', 39 | nick.shortcut.builder.ShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.ShortCutItem.pas', 40 | nick.shortcut.core.IShortCutList in '..\..\Source\nick.shortcut.core.IShortCutList.pas', 41 | nick.shortcut.core.KnownShortcutsRegistration in '..\..\Source\nick.shortcut.core.KnownShortcutsRegistration.pas', 42 | nick.shortcut.core.SearchRegisteredShortcutsRegistration in '..\..\Source\nick.shortcut.core.SearchRegisteredShortcutsRegistration.pas', 43 | nick.shortcut.core.ShortcutExport in '..\..\Source\nick.shortcut.core.ShortcutExport.pas', 44 | nick.shortcut.core.ShortCutFinderRegistration in '..\..\Source\nick.shortcut.core.ShortCutFinderRegistration.pas', 45 | nick.shortcut.core.ShortCutItem in '..\..\Source\nick.shortcut.core.ShortCutItem.pas', 46 | nick.shortcut.core.ShortCutList in '..\..\Source\nick.shortcut.core.ShortCutList.pas', 47 | nick.shortcut.element.Castalia2014 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.Castalia2014.pas', 48 | nick.shortcut.element.CnWizards in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.CnWizards.pas', 49 | nick.shortcut.element.DDevExtensions2 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DDevExtensions2.pas', 50 | nick.shortcut.element.DelphiEditorBase in '..\..\Source\Elements\Base\nick.shortcut.element.DelphiEditorBase.pas', 51 | nick.shortcut.element.DelphiEditorBrief in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorBrief.pas', 52 | nick.shortcut.element.DelphiEditorClassic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorClassic.pas', 53 | nick.shortcut.element.DelphiEditorDefault in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorDefault.pas', 54 | nick.shortcut.element.DelphiEditorEpsilon in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorEpsilon.pas', 55 | nick.shortcut.element.DelphiEditorVisualBasic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualBasic.pas', 56 | nick.shortcut.element.DelphiEditorVisualStudio in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualStudio.pas', 57 | nick.shortcut.element.DelphiMenu in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiMenu.pas', 58 | nick.shortcut.element.DLLExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.DLLExpertBase.pas', 59 | nick.shortcut.element.DocumentInsight3 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DocumentInsight3.pas', 60 | nick.shortcut.element.GExperts137 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.GExperts137.pas', 61 | nick.shortcut.element.MMX10 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX10.pas', 62 | nick.shortcut.element.MMX11 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX11.pas', 63 | nick.shortcut.element.OSRegisteredHotKeys in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.OSRegisteredHotKeys.pas', 64 | nick.shortcut.element.PackageExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.PackageExpertBase.pas', 65 | nick.shortcut.element.ParnassusOUBookmarks in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.ParnassusOUBookmarks.pas', 66 | nick.shortcut.element.SmartInspect in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.SmartInspect.pas', 67 | nick.shortcut.element.XExPlusPack in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.XExPlusPack.pas', 68 | nick.shortcut.export.Csv in '..\..\Source\Exports\nick.shortcut.export.Csv.pas', 69 | nick.shortcut.export.Html in '..\..\Source\Exports\nick.shortcut.export.Html.pas', 70 | nick.shortcut.factory.IRepository in '..\..\Source\Repositories\nick.shortcut.factory.IRepository.pas', 71 | nick.shortcut.factory.Repository in '..\..\Source\Repositories\nick.shortcut.factory.Repository.pas', 72 | nick.shortcut.frame.Base in '..\..\Source\Frames\nick.shortcut.frame.Base.pas' {BaseFrame: TFrame}, 73 | nick.shortcut.frame.KnownShortcuts in '..\..\Source\Frames\nick.shortcut.frame.KnownShortcuts.pas' {frmKnownShortcuts: TFrame}, 74 | nick.shortcut.frame.SearchRegisteredShortcuts in '..\..\Source\Frames\nick.shortcut.frame.SearchRegisteredShortcuts.pas' {frmSearchRegisteredShortcuts: TFrame}, 75 | nick.shortcut.frame.ShortCutKeyAllocation in '..\..\Source\Frames\nick.shortcut.frame.ShortCutKeyAllocation.pas' {frmShortcutKeyAllocation: TFrame}, 76 | nick.shortcut.other.FileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.FileVersionInformation.pas', 77 | nick.shortcut.other.IFileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.IFileVersionInformation.pas', 78 | nick.shortcut.other.INodeXml in '..\..\Source\Repositories\nick.shortcut.other.INodeXml.pas', 79 | nick.shortcut.other.VirtualKeys in '..\..\Source\nick.shortcut.other.VirtualKeys.pas', 80 | nick.shortcut.repository.IIniFile in '..\..\Source\Repositories\nick.shortcut.repository.IIniFile.pas', 81 | nick.shortcut.repository.IniFile in '..\..\Source\Repositories\nick.shortcut.repository.IniFile.pas', 82 | nick.shortcut.repository.IRegistry in '..\..\Source\Repositories\nick.shortcut.repository.IRegistry.pas', 83 | nick.shortcut.repository.ISystem in '..\..\Source\Repositories\nick.shortcut.repository.ISystem.pas', 84 | nick.shortcut.repository.IToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.IToolsApi.pas', 85 | nick.shortcut.repository.IXmlFile in '..\..\Source\Repositories\nick.shortcut.repository.IXmlFile.pas', 86 | nick.shortcut.repository.Registry in '..\..\Source\Repositories\nick.shortcut.repository.Registry.pas', 87 | nick.shortcut.repository.ShortCut in '..\..\Source\Repositories\nick.shortcut.repository.ShortCut.pas', 88 | nick.shortcut.repository.System in '..\..\Source\Repositories\nick.shortcut.repository.System.pas', 89 | nick.shortcut.repository.ToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.ToolsApi.pas', 90 | nick.shortcut.repository.XmlFile in '..\..\Source\Repositories\nick.shortcut.repository.XmlFile.pas', 91 | nick.shortcut.repository.ShortcutExport in '..\..\Source\Repositories\nick.shortcut.repository.ShortcutExport.pas'; 92 | 93 | end. 94 | 95 | -------------------------------------------------------------------------------- /Packages/XE2/ShortcutFinderImages.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickRing/Delphi-Shortcut-Finder/41747b940e5687c84fa7f9955f51b2880cbc307a/Packages/XE2/ShortcutFinderImages.res -------------------------------------------------------------------------------- /Packages/XE2/nick.toolsapi.shortcut.DelphiShortcutFinder.dpk: -------------------------------------------------------------------------------- 1 | package nick.toolsapi.shortcut.DelphiShortcutFinder; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS ON} 17 | {$RANGECHECKS ON} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'IDE Shortcut Finder - https://github.com/NickRing/Delphi-Shortcut-Finder'} 29 | {$LIBSUFFIX 'XE2'} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | rtl, 34 | designide, 35 | VirtualTreesD, 36 | IndySystem, 37 | IndyProtocols, 38 | IndyCore; 39 | 40 | contains 41 | nick.shortcut.builder.IShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.IShortCutItem.pas', 42 | nick.shortcut.builder.ShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.ShortCutItem.pas', 43 | nick.shortcut.core.IShortCutList in '..\..\Source\nick.shortcut.core.IShortCutList.pas', 44 | nick.shortcut.core.KnownShortcutsRegistration in '..\..\Source\nick.shortcut.core.KnownShortcutsRegistration.pas', 45 | nick.shortcut.core.SearchRegisteredShortcutsRegistration in '..\..\Source\nick.shortcut.core.SearchRegisteredShortcutsRegistration.pas', 46 | nick.shortcut.core.ShortCutFinderRegistration in '..\..\Source\nick.shortcut.core.ShortCutFinderRegistration.pas', 47 | nick.shortcut.core.ShortCutItem in '..\..\Source\nick.shortcut.core.ShortCutItem.pas', 48 | nick.shortcut.core.ShortCutList in '..\..\Source\nick.shortcut.core.ShortCutList.pas', 49 | nick.shortcut.element.Castalia2014 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.Castalia2014.pas', 50 | nick.shortcut.element.CnWizards in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.CnWizards.pas', 51 | nick.shortcut.element.DDevExtensions2 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DDevExtensions2.pas', 52 | nick.shortcut.element.DelphiEditorBase in '..\..\Source\Elements\Base\nick.shortcut.element.DelphiEditorBase.pas', 53 | nick.shortcut.element.DelphiEditorBrief in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorBrief.pas', 54 | nick.shortcut.element.DelphiEditorClassic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorClassic.pas', 55 | nick.shortcut.element.DelphiEditorDefault in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorDefault.pas', 56 | nick.shortcut.element.DelphiEditorEpsilon in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorEpsilon.pas', 57 | nick.shortcut.element.DelphiEditorVisualBasic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualBasic.pas', 58 | nick.shortcut.element.DelphiEditorVisualStudio in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualStudio.pas', 59 | nick.shortcut.element.DelphiMenu in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiMenu.pas', 60 | nick.shortcut.element.DLLExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.DLLExpertBase.pas', 61 | nick.shortcut.element.DocumentInsight3 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DocumentInsight3.pas', 62 | nick.shortcut.element.GExperts137 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.GExperts137.pas', 63 | nick.shortcut.element.MMX10 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX10.pas', 64 | nick.shortcut.element.MMX11 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX11.pas', 65 | nick.shortcut.element.OSRegisteredHotKeys in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.OSRegisteredHotKeys.pas', 66 | nick.shortcut.element.PackageExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.PackageExpertBase.pas', 67 | nick.shortcut.element.ParnassusOUBookmarks in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.ParnassusOUBookmarks.pas', 68 | nick.shortcut.element.SmartInspect in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.SmartInspect.pas', 69 | nick.shortcut.element.XExPlusPack in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.XExPlusPack.pas', 70 | nick.shortcut.factory.IRepository in '..\..\Source\Repositories\nick.shortcut.factory.IRepository.pas', 71 | nick.shortcut.factory.Repository in '..\..\Source\Repositories\nick.shortcut.factory.Repository.pas', 72 | nick.shortcut.frame.KnownShortcuts in '..\..\Source\Frames\nick.shortcut.frame.KnownShortcuts.pas' {frmKnownShortcuts: TFrame}, 73 | nick.shortcut.frame.SearchRegisteredShortcuts in '..\..\Source\Frames\nick.shortcut.frame.SearchRegisteredShortcuts.pas' {frmSearchRegisteredShortcuts: TFrame}, 74 | nick.shortcut.frame.ShortCutKeyAllocation in '..\..\Source\Frames\nick.shortcut.frame.ShortCutKeyAllocation.pas' {frmShortcutKeyAllocation: TFrame}, 75 | nick.shortcut.other.FileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.FileVersionInformation.pas', 76 | nick.shortcut.other.IFileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.IFileVersionInformation.pas', 77 | nick.shortcut.other.INodeXml in '..\..\Source\Repositories\nick.shortcut.other.INodeXml.pas', 78 | nick.shortcut.other.VirtualKeys in '..\..\Source\nick.shortcut.other.VirtualKeys.pas', 79 | nick.shortcut.repository.IIniFile in '..\..\Source\Repositories\nick.shortcut.repository.IIniFile.pas', 80 | nick.shortcut.repository.IniFile in '..\..\Source\Repositories\nick.shortcut.repository.IniFile.pas', 81 | nick.shortcut.repository.IRegistry in '..\..\Source\Repositories\nick.shortcut.repository.IRegistry.pas', 82 | nick.shortcut.repository.ISystem in '..\..\Source\Repositories\nick.shortcut.repository.ISystem.pas', 83 | nick.shortcut.repository.IToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.IToolsApi.pas', 84 | nick.shortcut.repository.IXmlFile in '..\..\Source\Repositories\nick.shortcut.repository.IXmlFile.pas', 85 | nick.shortcut.repository.Registry in '..\..\Source\Repositories\nick.shortcut.repository.Registry.pas', 86 | nick.shortcut.repository.ShortCut in '..\..\Source\Repositories\nick.shortcut.repository.ShortCut.pas', 87 | nick.shortcut.repository.System in '..\..\Source\Repositories\nick.shortcut.repository.System.pas', 88 | nick.shortcut.repository.ToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.ToolsApi.pas', 89 | nick.shortcut.repository.XmlFile in '..\..\Source\Repositories\nick.shortcut.repository.XmlFile.pas', 90 | nick.shortcut.repository.ShortcutExport in '..\..\Source\Repositories\nick.shortcut.repository.ShortcutExport.pas', 91 | nick.shortcut.core.ShortcutExport in '..\..\Source\nick.shortcut.core.ShortcutExport.pas', 92 | nick.shortcut.export.Csv in '..\..\Source\Exports\nick.shortcut.export.Csv.pas', 93 | nick.shortcut.export.Html in '..\..\Source\Exports\nick.shortcut.export.Html.pas', 94 | nick.shortcut.frame.Base in '..\..\Source\Frames\nick.shortcut.frame.Base.pas' {BaseFrame: TFrame}; 95 | 96 | end. 97 | 98 | -------------------------------------------------------------------------------- /Packages/XE3/ShortcutFinderImages.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickRing/Delphi-Shortcut-Finder/41747b940e5687c84fa7f9955f51b2880cbc307a/Packages/XE3/ShortcutFinderImages.res -------------------------------------------------------------------------------- /Packages/XE3/nick.toolsapi.shortcut.DelphiShortcutFinder.dpk: -------------------------------------------------------------------------------- 1 | package nick.toolsapi.shortcut.DelphiShortcutFinder; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS ON} 17 | {$RANGECHECKS ON} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'IDE Shortcut Finder - https://github.com/NickRing/Delphi-Shortcut-Finder'} 29 | {$LIBSUFFIX 'XE3'} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | rtl, 34 | designide, 35 | VirtualTreesD, 36 | IndySystem, 37 | IndyProtocols, 38 | IndyCore; 39 | 40 | contains 41 | nick.shortcut.builder.IShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.IShortCutItem.pas', 42 | nick.shortcut.builder.ShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.ShortCutItem.pas', 43 | nick.shortcut.core.IShortCutList in '..\..\Source\nick.shortcut.core.IShortCutList.pas', 44 | nick.shortcut.core.KnownShortcutsRegistration in '..\..\Source\nick.shortcut.core.KnownShortcutsRegistration.pas', 45 | nick.shortcut.core.SearchRegisteredShortcutsRegistration in '..\..\Source\nick.shortcut.core.SearchRegisteredShortcutsRegistration.pas', 46 | nick.shortcut.core.ShortCutFinderRegistration in '..\..\Source\nick.shortcut.core.ShortCutFinderRegistration.pas', 47 | nick.shortcut.core.ShortCutItem in '..\..\Source\nick.shortcut.core.ShortCutItem.pas', 48 | nick.shortcut.core.ShortCutList in '..\..\Source\nick.shortcut.core.ShortCutList.pas', 49 | nick.shortcut.element.Castalia2014 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.Castalia2014.pas', 50 | nick.shortcut.element.CnWizards in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.CnWizards.pas', 51 | nick.shortcut.element.DDevExtensions2 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DDevExtensions2.pas', 52 | nick.shortcut.element.DelphiEditorBase in '..\..\Source\Elements\Base\nick.shortcut.element.DelphiEditorBase.pas', 53 | nick.shortcut.element.DelphiEditorBrief in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorBrief.pas', 54 | nick.shortcut.element.DelphiEditorClassic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorClassic.pas', 55 | nick.shortcut.element.DelphiEditorDefault in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorDefault.pas', 56 | nick.shortcut.element.DelphiEditorEpsilon in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorEpsilon.pas', 57 | nick.shortcut.element.DelphiEditorVisualBasic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualBasic.pas', 58 | nick.shortcut.element.DelphiEditorVisualStudio in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualStudio.pas', 59 | nick.shortcut.element.DelphiMenu in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiMenu.pas', 60 | nick.shortcut.element.DLLExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.DLLExpertBase.pas', 61 | nick.shortcut.element.DocumentInsight3 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DocumentInsight3.pas', 62 | nick.shortcut.element.GExperts137 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.GExperts137.pas', 63 | nick.shortcut.element.MMX10 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX10.pas', 64 | nick.shortcut.element.MMX11 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX11.pas', 65 | nick.shortcut.element.OSRegisteredHotKeys in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.OSRegisteredHotKeys.pas', 66 | nick.shortcut.element.PackageExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.PackageExpertBase.pas', 67 | nick.shortcut.element.ParnassusOUBookmarks in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.ParnassusOUBookmarks.pas', 68 | nick.shortcut.element.SmartInspect in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.SmartInspect.pas', 69 | nick.shortcut.element.XExPlusPack in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.XExPlusPack.pas', 70 | nick.shortcut.factory.IRepository in '..\..\Source\Repositories\nick.shortcut.factory.IRepository.pas', 71 | nick.shortcut.factory.Repository in '..\..\Source\Repositories\nick.shortcut.factory.Repository.pas', 72 | nick.shortcut.frame.KnownShortcuts in '..\..\Source\Frames\nick.shortcut.frame.KnownShortcuts.pas' {frmKnownShortcuts: TFrame}, 73 | nick.shortcut.frame.SearchRegisteredShortcuts in '..\..\Source\Frames\nick.shortcut.frame.SearchRegisteredShortcuts.pas' {frmSearchRegisteredShortcuts: TFrame}, 74 | nick.shortcut.frame.ShortCutKeyAllocation in '..\..\Source\Frames\nick.shortcut.frame.ShortCutKeyAllocation.pas' {frmShortcutKeyAllocation: TFrame}, 75 | nick.shortcut.other.FileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.FileVersionInformation.pas', 76 | nick.shortcut.other.IFileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.IFileVersionInformation.pas', 77 | nick.shortcut.other.INodeXml in '..\..\Source\Repositories\nick.shortcut.other.INodeXml.pas', 78 | nick.shortcut.other.VirtualKeys in '..\..\Source\nick.shortcut.other.VirtualKeys.pas', 79 | nick.shortcut.repository.IIniFile in '..\..\Source\Repositories\nick.shortcut.repository.IIniFile.pas', 80 | nick.shortcut.repository.IniFile in '..\..\Source\Repositories\nick.shortcut.repository.IniFile.pas', 81 | nick.shortcut.repository.IRegistry in '..\..\Source\Repositories\nick.shortcut.repository.IRegistry.pas', 82 | nick.shortcut.repository.ISystem in '..\..\Source\Repositories\nick.shortcut.repository.ISystem.pas', 83 | nick.shortcut.repository.IToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.IToolsApi.pas', 84 | nick.shortcut.repository.IXmlFile in '..\..\Source\Repositories\nick.shortcut.repository.IXmlFile.pas', 85 | nick.shortcut.repository.Registry in '..\..\Source\Repositories\nick.shortcut.repository.Registry.pas', 86 | nick.shortcut.repository.ShortCut in '..\..\Source\Repositories\nick.shortcut.repository.ShortCut.pas', 87 | nick.shortcut.repository.System in '..\..\Source\Repositories\nick.shortcut.repository.System.pas', 88 | nick.shortcut.repository.ToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.ToolsApi.pas', 89 | nick.shortcut.repository.XmlFile in '..\..\Source\Repositories\nick.shortcut.repository.XmlFile.pas', 90 | nick.shortcut.repository.ShortcutExport in '..\..\Source\Repositories\nick.shortcut.repository.ShortcutExport.pas', 91 | nick.shortcut.core.ShortcutExport in '..\..\Source\nick.shortcut.core.ShortcutExport.pas', 92 | nick.shortcut.export.Csv in '..\..\Source\Exports\nick.shortcut.export.Csv.pas', 93 | nick.shortcut.export.Html in '..\..\Source\Exports\nick.shortcut.export.Html.pas', 94 | nick.shortcut.frame.Base in '..\..\Source\Frames\nick.shortcut.frame.Base.pas' {BaseFrame: TFrame}; 95 | 96 | end. 97 | 98 | -------------------------------------------------------------------------------- /Packages/XE4/ShortcutFinderImages.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickRing/Delphi-Shortcut-Finder/41747b940e5687c84fa7f9955f51b2880cbc307a/Packages/XE4/ShortcutFinderImages.res -------------------------------------------------------------------------------- /Packages/XE4/nick.toolsapi.shortcut.DelphiShortcutFinder.dpk: -------------------------------------------------------------------------------- 1 | package nick.toolsapi.shortcut.DelphiShortcutFinder; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS ON} 17 | {$RANGECHECKS ON} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'IDE Shortcut Finder - https://github.com/NickRing/Delphi-Shortcut-Finder'} 29 | {$LIBSUFFIX 'XE4'} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | rtl, 34 | designide, 35 | VirtualTreesD, 36 | IndySystem, 37 | IndyProtocols, 38 | IndyCore; 39 | 40 | contains 41 | nick.shortcut.builder.IShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.IShortCutItem.pas', 42 | nick.shortcut.builder.ShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.ShortCutItem.pas', 43 | nick.shortcut.core.IShortCutList in '..\..\Source\nick.shortcut.core.IShortCutList.pas', 44 | nick.shortcut.core.KnownShortcutsRegistration in '..\..\Source\nick.shortcut.core.KnownShortcutsRegistration.pas', 45 | nick.shortcut.core.SearchRegisteredShortcutsRegistration in '..\..\Source\nick.shortcut.core.SearchRegisteredShortcutsRegistration.pas', 46 | nick.shortcut.core.ShortCutFinderRegistration in '..\..\Source\nick.shortcut.core.ShortCutFinderRegistration.pas', 47 | nick.shortcut.core.ShortCutItem in '..\..\Source\nick.shortcut.core.ShortCutItem.pas', 48 | nick.shortcut.core.ShortCutList in '..\..\Source\nick.shortcut.core.ShortCutList.pas', 49 | nick.shortcut.element.Castalia2014 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.Castalia2014.pas', 50 | nick.shortcut.element.CnWizards in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.CnWizards.pas', 51 | nick.shortcut.element.DDevExtensions2 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DDevExtensions2.pas', 52 | nick.shortcut.element.DelphiEditorBase in '..\..\Source\Elements\Base\nick.shortcut.element.DelphiEditorBase.pas', 53 | nick.shortcut.element.DelphiEditorBrief in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorBrief.pas', 54 | nick.shortcut.element.DelphiEditorClassic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorClassic.pas', 55 | nick.shortcut.element.DelphiEditorDefault in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorDefault.pas', 56 | nick.shortcut.element.DelphiEditorEpsilon in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorEpsilon.pas', 57 | nick.shortcut.element.DelphiEditorVisualBasic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualBasic.pas', 58 | nick.shortcut.element.DelphiEditorVisualStudio in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualStudio.pas', 59 | nick.shortcut.element.DelphiMenu in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiMenu.pas', 60 | nick.shortcut.element.DLLExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.DLLExpertBase.pas', 61 | nick.shortcut.element.DocumentInsight3 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DocumentInsight3.pas', 62 | nick.shortcut.element.GExperts137 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.GExperts137.pas', 63 | nick.shortcut.element.MMX10 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX10.pas', 64 | nick.shortcut.element.MMX11 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX11.pas', 65 | nick.shortcut.element.OSRegisteredHotKeys in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.OSRegisteredHotKeys.pas', 66 | nick.shortcut.element.PackageExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.PackageExpertBase.pas', 67 | nick.shortcut.element.ParnassusOUBookmarks in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.ParnassusOUBookmarks.pas', 68 | nick.shortcut.element.SmartInspect in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.SmartInspect.pas', 69 | nick.shortcut.element.XExPlusPack in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.XExPlusPack.pas', 70 | nick.shortcut.factory.IRepository in '..\..\Source\Repositories\nick.shortcut.factory.IRepository.pas', 71 | nick.shortcut.factory.Repository in '..\..\Source\Repositories\nick.shortcut.factory.Repository.pas', 72 | nick.shortcut.frame.KnownShortcuts in '..\..\Source\Frames\nick.shortcut.frame.KnownShortcuts.pas' {frmKnownShortcuts: TFrame}, 73 | nick.shortcut.frame.SearchRegisteredShortcuts in '..\..\Source\Frames\nick.shortcut.frame.SearchRegisteredShortcuts.pas' {frmSearchRegisteredShortcuts: TFrame}, 74 | nick.shortcut.frame.ShortCutKeyAllocation in '..\..\Source\Frames\nick.shortcut.frame.ShortCutKeyAllocation.pas' {frmShortcutKeyAllocation: TFrame}, 75 | nick.shortcut.other.FileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.FileVersionInformation.pas', 76 | nick.shortcut.other.IFileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.IFileVersionInformation.pas', 77 | nick.shortcut.other.INodeXml in '..\..\Source\Repositories\nick.shortcut.other.INodeXml.pas', 78 | nick.shortcut.other.VirtualKeys in '..\..\Source\nick.shortcut.other.VirtualKeys.pas', 79 | nick.shortcut.repository.IIniFile in '..\..\Source\Repositories\nick.shortcut.repository.IIniFile.pas', 80 | nick.shortcut.repository.IniFile in '..\..\Source\Repositories\nick.shortcut.repository.IniFile.pas', 81 | nick.shortcut.repository.IRegistry in '..\..\Source\Repositories\nick.shortcut.repository.IRegistry.pas', 82 | nick.shortcut.repository.ISystem in '..\..\Source\Repositories\nick.shortcut.repository.ISystem.pas', 83 | nick.shortcut.repository.IToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.IToolsApi.pas', 84 | nick.shortcut.repository.IXmlFile in '..\..\Source\Repositories\nick.shortcut.repository.IXmlFile.pas', 85 | nick.shortcut.repository.Registry in '..\..\Source\Repositories\nick.shortcut.repository.Registry.pas', 86 | nick.shortcut.repository.ShortCut in '..\..\Source\Repositories\nick.shortcut.repository.ShortCut.pas', 87 | nick.shortcut.repository.System in '..\..\Source\Repositories\nick.shortcut.repository.System.pas', 88 | nick.shortcut.repository.ToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.ToolsApi.pas', 89 | nick.shortcut.repository.XmlFile in '..\..\Source\Repositories\nick.shortcut.repository.XmlFile.pas', 90 | nick.shortcut.repository.ShortcutExport in '..\..\Source\Repositories\nick.shortcut.repository.ShortcutExport.pas', 91 | nick.shortcut.core.ShortcutExport in '..\..\Source\nick.shortcut.core.ShortcutExport.pas', 92 | nick.shortcut.export.Csv in '..\..\Source\Exports\nick.shortcut.export.Csv.pas', 93 | nick.shortcut.export.Html in '..\..\Source\Exports\nick.shortcut.export.Html.pas', 94 | nick.shortcut.frame.Base in '..\..\Source\Frames\nick.shortcut.frame.Base.pas' {BaseFrame: TFrame}; 95 | 96 | end. 97 | 98 | -------------------------------------------------------------------------------- /Packages/XE5/ShortcutFinderImages.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickRing/Delphi-Shortcut-Finder/41747b940e5687c84fa7f9955f51b2880cbc307a/Packages/XE5/ShortcutFinderImages.res -------------------------------------------------------------------------------- /Packages/XE5/nick.toolsapi.shortcut.DelphiShortcutFinder.dpk: -------------------------------------------------------------------------------- 1 | package nick.toolsapi.shortcut.DelphiShortcutFinder; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS ON} 17 | {$RANGECHECKS ON} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'IDE Shortcut Finder - https://github.com/NickRing/Delphi-Shortcut-Finder'} 29 | {$LIBSUFFIX 'XE5'} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | rtl, 34 | designide, 35 | VirtualTreesD, 36 | IndySystem, 37 | IndyProtocols, 38 | IndyCore; 39 | 40 | contains 41 | nick.shortcut.builder.IShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.IShortCutItem.pas', 42 | nick.shortcut.builder.ShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.ShortCutItem.pas', 43 | nick.shortcut.core.IShortCutList in '..\..\Source\nick.shortcut.core.IShortCutList.pas', 44 | nick.shortcut.core.KnownShortcutsRegistration in '..\..\Source\nick.shortcut.core.KnownShortcutsRegistration.pas', 45 | nick.shortcut.core.SearchRegisteredShortcutsRegistration in '..\..\Source\nick.shortcut.core.SearchRegisteredShortcutsRegistration.pas', 46 | nick.shortcut.core.ShortCutFinderRegistration in '..\..\Source\nick.shortcut.core.ShortCutFinderRegistration.pas', 47 | nick.shortcut.core.ShortCutItem in '..\..\Source\nick.shortcut.core.ShortCutItem.pas', 48 | nick.shortcut.core.ShortCutList in '..\..\Source\nick.shortcut.core.ShortCutList.pas', 49 | nick.shortcut.element.Castalia2014 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.Castalia2014.pas', 50 | nick.shortcut.element.CnWizards in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.CnWizards.pas', 51 | nick.shortcut.element.DDevExtensions2 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DDevExtensions2.pas', 52 | nick.shortcut.element.DelphiEditorBase in '..\..\Source\Elements\Base\nick.shortcut.element.DelphiEditorBase.pas', 53 | nick.shortcut.element.DelphiEditorBrief in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorBrief.pas', 54 | nick.shortcut.element.DelphiEditorClassic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorClassic.pas', 55 | nick.shortcut.element.DelphiEditorDefault in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorDefault.pas', 56 | nick.shortcut.element.DelphiEditorEpsilon in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorEpsilon.pas', 57 | nick.shortcut.element.DelphiEditorVisualBasic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualBasic.pas', 58 | nick.shortcut.element.DelphiEditorVisualStudio in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualStudio.pas', 59 | nick.shortcut.element.DelphiMenu in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiMenu.pas', 60 | nick.shortcut.element.DLLExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.DLLExpertBase.pas', 61 | nick.shortcut.element.DocumentInsight3 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DocumentInsight3.pas', 62 | nick.shortcut.element.GExperts137 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.GExperts137.pas', 63 | nick.shortcut.element.MMX10 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX10.pas', 64 | nick.shortcut.element.MMX11 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX11.pas', 65 | nick.shortcut.element.OSRegisteredHotKeys in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.OSRegisteredHotKeys.pas', 66 | nick.shortcut.element.PackageExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.PackageExpertBase.pas', 67 | nick.shortcut.element.ParnassusOUBookmarks in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.ParnassusOUBookmarks.pas', 68 | nick.shortcut.element.SmartInspect in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.SmartInspect.pas', 69 | nick.shortcut.element.XExPlusPack in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.XExPlusPack.pas', 70 | nick.shortcut.factory.IRepository in '..\..\Source\Repositories\nick.shortcut.factory.IRepository.pas', 71 | nick.shortcut.factory.Repository in '..\..\Source\Repositories\nick.shortcut.factory.Repository.pas', 72 | nick.shortcut.frame.KnownShortcuts in '..\..\Source\Frames\nick.shortcut.frame.KnownShortcuts.pas' {frmKnownShortcuts: TFrame}, 73 | nick.shortcut.frame.SearchRegisteredShortcuts in '..\..\Source\Frames\nick.shortcut.frame.SearchRegisteredShortcuts.pas' {frmSearchRegisteredShortcuts: TFrame}, 74 | nick.shortcut.frame.ShortCutKeyAllocation in '..\..\Source\Frames\nick.shortcut.frame.ShortCutKeyAllocation.pas' {frmShortcutKeyAllocation: TFrame}, 75 | nick.shortcut.other.FileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.FileVersionInformation.pas', 76 | nick.shortcut.other.IFileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.IFileVersionInformation.pas', 77 | nick.shortcut.other.INodeXml in '..\..\Source\Repositories\nick.shortcut.other.INodeXml.pas', 78 | nick.shortcut.other.VirtualKeys in '..\..\Source\nick.shortcut.other.VirtualKeys.pas', 79 | nick.shortcut.repository.IIniFile in '..\..\Source\Repositories\nick.shortcut.repository.IIniFile.pas', 80 | nick.shortcut.repository.IniFile in '..\..\Source\Repositories\nick.shortcut.repository.IniFile.pas', 81 | nick.shortcut.repository.IRegistry in '..\..\Source\Repositories\nick.shortcut.repository.IRegistry.pas', 82 | nick.shortcut.repository.ISystem in '..\..\Source\Repositories\nick.shortcut.repository.ISystem.pas', 83 | nick.shortcut.repository.IToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.IToolsApi.pas', 84 | nick.shortcut.repository.IXmlFile in '..\..\Source\Repositories\nick.shortcut.repository.IXmlFile.pas', 85 | nick.shortcut.repository.Registry in '..\..\Source\Repositories\nick.shortcut.repository.Registry.pas', 86 | nick.shortcut.repository.ShortCut in '..\..\Source\Repositories\nick.shortcut.repository.ShortCut.pas', 87 | nick.shortcut.repository.System in '..\..\Source\Repositories\nick.shortcut.repository.System.pas', 88 | nick.shortcut.repository.ToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.ToolsApi.pas', 89 | nick.shortcut.repository.XmlFile in '..\..\Source\Repositories\nick.shortcut.repository.XmlFile.pas', 90 | nick.shortcut.repository.ShortcutExport in '..\..\Source\Repositories\nick.shortcut.repository.ShortcutExport.pas', 91 | nick.shortcut.core.ShortcutExport in '..\..\Source\nick.shortcut.core.ShortcutExport.pas', 92 | nick.shortcut.export.Csv in '..\..\Source\Exports\nick.shortcut.export.Csv.pas', 93 | nick.shortcut.export.Html in '..\..\Source\Exports\nick.shortcut.export.Html.pas', 94 | nick.shortcut.frame.Base in '..\..\Source\Frames\nick.shortcut.frame.Base.pas' {BaseFrame: TFrame}; 95 | 96 | end. 97 | 98 | -------------------------------------------------------------------------------- /Packages/XE6/ShortcutFinderImages.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickRing/Delphi-Shortcut-Finder/41747b940e5687c84fa7f9955f51b2880cbc307a/Packages/XE6/ShortcutFinderImages.res -------------------------------------------------------------------------------- /Packages/XE6/nick.toolsapi.shortcut.DelphiShortcutFinder.dpk: -------------------------------------------------------------------------------- 1 | package nick.toolsapi.shortcut.DelphiShortcutFinder; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS ON} 17 | {$RANGECHECKS ON} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'IDE Shortcut Finder - https://github.com/NickRing/Delphi-Shortcut-Finder'} 29 | {$LIBSUFFIX 'XE6'} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | rtl, 34 | designide, 35 | VirtualTreesD, 36 | IndySystem, 37 | IndyProtocols, 38 | IndyCore; 39 | 40 | contains 41 | nick.shortcut.builder.IShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.IShortCutItem.pas', 42 | nick.shortcut.builder.ShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.ShortCutItem.pas', 43 | nick.shortcut.core.IShortCutList in '..\..\Source\nick.shortcut.core.IShortCutList.pas', 44 | nick.shortcut.core.KnownShortcutsRegistration in '..\..\Source\nick.shortcut.core.KnownShortcutsRegistration.pas', 45 | nick.shortcut.core.SearchRegisteredShortcutsRegistration in '..\..\Source\nick.shortcut.core.SearchRegisteredShortcutsRegistration.pas', 46 | nick.shortcut.core.ShortCutFinderRegistration in '..\..\Source\nick.shortcut.core.ShortCutFinderRegistration.pas', 47 | nick.shortcut.core.ShortCutItem in '..\..\Source\nick.shortcut.core.ShortCutItem.pas', 48 | nick.shortcut.core.ShortCutList in '..\..\Source\nick.shortcut.core.ShortCutList.pas', 49 | nick.shortcut.element.Castalia2014 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.Castalia2014.pas', 50 | nick.shortcut.element.CnWizards in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.CnWizards.pas', 51 | nick.shortcut.element.DDevExtensions2 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DDevExtensions2.pas', 52 | nick.shortcut.element.DelphiEditorBase in '..\..\Source\Elements\Base\nick.shortcut.element.DelphiEditorBase.pas', 53 | nick.shortcut.element.DelphiEditorBrief in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorBrief.pas', 54 | nick.shortcut.element.DelphiEditorClassic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorClassic.pas', 55 | nick.shortcut.element.DelphiEditorDefault in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorDefault.pas', 56 | nick.shortcut.element.DelphiEditorEpsilon in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorEpsilon.pas', 57 | nick.shortcut.element.DelphiEditorVisualBasic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualBasic.pas', 58 | nick.shortcut.element.DelphiEditorVisualStudio in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualStudio.pas', 59 | nick.shortcut.element.DelphiMenu in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiMenu.pas', 60 | nick.shortcut.element.DLLExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.DLLExpertBase.pas', 61 | nick.shortcut.element.DocumentInsight3 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DocumentInsight3.pas', 62 | nick.shortcut.element.GExperts137 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.GExperts137.pas', 63 | nick.shortcut.element.MMX10 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX10.pas', 64 | nick.shortcut.element.MMX11 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX11.pas', 65 | nick.shortcut.element.OSRegisteredHotKeys in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.OSRegisteredHotKeys.pas', 66 | nick.shortcut.element.PackageExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.PackageExpertBase.pas', 67 | nick.shortcut.element.ParnassusOUBookmarks in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.ParnassusOUBookmarks.pas', 68 | nick.shortcut.element.SmartInspect in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.SmartInspect.pas', 69 | nick.shortcut.element.XExPlusPack in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.XExPlusPack.pas', 70 | nick.shortcut.factory.IRepository in '..\..\Source\Repositories\nick.shortcut.factory.IRepository.pas', 71 | nick.shortcut.factory.Repository in '..\..\Source\Repositories\nick.shortcut.factory.Repository.pas', 72 | nick.shortcut.frame.KnownShortcuts in '..\..\Source\Frames\nick.shortcut.frame.KnownShortcuts.pas' {frmKnownShortcuts: TFrame}, 73 | nick.shortcut.frame.SearchRegisteredShortcuts in '..\..\Source\Frames\nick.shortcut.frame.SearchRegisteredShortcuts.pas' {frmSearchRegisteredShortcuts: TFrame}, 74 | nick.shortcut.frame.ShortCutKeyAllocation in '..\..\Source\Frames\nick.shortcut.frame.ShortCutKeyAllocation.pas' {frmShortcutKeyAllocation: TFrame}, 75 | nick.shortcut.other.FileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.FileVersionInformation.pas', 76 | nick.shortcut.other.IFileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.IFileVersionInformation.pas', 77 | nick.shortcut.other.INodeXml in '..\..\Source\Repositories\nick.shortcut.other.INodeXml.pas', 78 | nick.shortcut.other.VirtualKeys in '..\..\Source\nick.shortcut.other.VirtualKeys.pas', 79 | nick.shortcut.repository.IIniFile in '..\..\Source\Repositories\nick.shortcut.repository.IIniFile.pas', 80 | nick.shortcut.repository.IniFile in '..\..\Source\Repositories\nick.shortcut.repository.IniFile.pas', 81 | nick.shortcut.repository.IRegistry in '..\..\Source\Repositories\nick.shortcut.repository.IRegistry.pas', 82 | nick.shortcut.repository.ISystem in '..\..\Source\Repositories\nick.shortcut.repository.ISystem.pas', 83 | nick.shortcut.repository.IToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.IToolsApi.pas', 84 | nick.shortcut.repository.IXmlFile in '..\..\Source\Repositories\nick.shortcut.repository.IXmlFile.pas', 85 | nick.shortcut.repository.Registry in '..\..\Source\Repositories\nick.shortcut.repository.Registry.pas', 86 | nick.shortcut.repository.ShortCut in '..\..\Source\Repositories\nick.shortcut.repository.ShortCut.pas', 87 | nick.shortcut.repository.System in '..\..\Source\Repositories\nick.shortcut.repository.System.pas', 88 | nick.shortcut.repository.ToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.ToolsApi.pas', 89 | nick.shortcut.repository.XmlFile in '..\..\Source\Repositories\nick.shortcut.repository.XmlFile.pas', 90 | nick.shortcut.repository.ShortcutExport in '..\..\Source\Repositories\nick.shortcut.repository.ShortcutExport.pas', 91 | nick.shortcut.core.ShortcutExport in '..\..\Source\nick.shortcut.core.ShortcutExport.pas', 92 | nick.shortcut.export.Csv in '..\..\Source\Exports\nick.shortcut.export.Csv.pas', 93 | nick.shortcut.export.Html in '..\..\Source\Exports\nick.shortcut.export.Html.pas', 94 | nick.shortcut.frame.Base in '..\..\Source\Frames\nick.shortcut.frame.Base.pas' {BaseFrame: TFrame}; 95 | 96 | end. 97 | 98 | -------------------------------------------------------------------------------- /Packages/XE7/ShortcutFinderImages.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickRing/Delphi-Shortcut-Finder/41747b940e5687c84fa7f9955f51b2880cbc307a/Packages/XE7/ShortcutFinderImages.res -------------------------------------------------------------------------------- /Packages/XE7/nick.toolsapi.shortcut.DelphiShortcutFinder.dpk: -------------------------------------------------------------------------------- 1 | package nick.toolsapi.shortcut.DelphiShortcutFinder; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS ON} 17 | {$RANGECHECKS ON} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'IDE Shortcut Finder - https://github.com/NickRing/Delphi-Shortcut-Finder'} 29 | {$LIBSUFFIX 'XE7'} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | rtl, 34 | designide, 35 | VirtualTreesD, 36 | IndySystem, 37 | IndyProtocols, 38 | IndyCore; 39 | 40 | contains 41 | nick.shortcut.builder.IShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.IShortCutItem.pas', 42 | nick.shortcut.builder.ShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.ShortCutItem.pas', 43 | nick.shortcut.core.IShortCutList in '..\..\Source\nick.shortcut.core.IShortCutList.pas', 44 | nick.shortcut.core.KnownShortcutsRegistration in '..\..\Source\nick.shortcut.core.KnownShortcutsRegistration.pas', 45 | nick.shortcut.core.SearchRegisteredShortcutsRegistration in '..\..\Source\nick.shortcut.core.SearchRegisteredShortcutsRegistration.pas', 46 | nick.shortcut.core.ShortCutFinderRegistration in '..\..\Source\nick.shortcut.core.ShortCutFinderRegistration.pas', 47 | nick.shortcut.core.ShortCutItem in '..\..\Source\nick.shortcut.core.ShortCutItem.pas', 48 | nick.shortcut.core.ShortCutList in '..\..\Source\nick.shortcut.core.ShortCutList.pas', 49 | nick.shortcut.element.Castalia2014 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.Castalia2014.pas', 50 | nick.shortcut.element.CnWizards in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.CnWizards.pas', 51 | nick.shortcut.element.DDevExtensions2 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DDevExtensions2.pas', 52 | nick.shortcut.element.DelphiEditorBase in '..\..\Source\Elements\Base\nick.shortcut.element.DelphiEditorBase.pas', 53 | nick.shortcut.element.DelphiEditorBrief in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorBrief.pas', 54 | nick.shortcut.element.DelphiEditorClassic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorClassic.pas', 55 | nick.shortcut.element.DelphiEditorDefault in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorDefault.pas', 56 | nick.shortcut.element.DelphiEditorEpsilon in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorEpsilon.pas', 57 | nick.shortcut.element.DelphiEditorVisualBasic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualBasic.pas', 58 | nick.shortcut.element.DelphiEditorVisualStudio in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualStudio.pas', 59 | nick.shortcut.element.DelphiMenu in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiMenu.pas', 60 | nick.shortcut.element.DLLExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.DLLExpertBase.pas', 61 | nick.shortcut.element.DocumentInsight3 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DocumentInsight3.pas', 62 | nick.shortcut.element.GExperts137 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.GExperts137.pas', 63 | nick.shortcut.element.MMX10 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX10.pas', 64 | nick.shortcut.element.MMX11 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX11.pas', 65 | nick.shortcut.element.OSRegisteredHotKeys in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.OSRegisteredHotKeys.pas', 66 | nick.shortcut.element.PackageExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.PackageExpertBase.pas', 67 | nick.shortcut.element.ParnassusOUBookmarks in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.ParnassusOUBookmarks.pas', 68 | nick.shortcut.element.SmartInspect in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.SmartInspect.pas', 69 | nick.shortcut.element.XExPlusPack in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.XExPlusPack.pas', 70 | nick.shortcut.factory.IRepository in '..\..\Source\Repositories\nick.shortcut.factory.IRepository.pas', 71 | nick.shortcut.factory.Repository in '..\..\Source\Repositories\nick.shortcut.factory.Repository.pas', 72 | nick.shortcut.frame.KnownShortcuts in '..\..\Source\Frames\nick.shortcut.frame.KnownShortcuts.pas' {frmKnownShortcuts: TFrame}, 73 | nick.shortcut.frame.SearchRegisteredShortcuts in '..\..\Source\Frames\nick.shortcut.frame.SearchRegisteredShortcuts.pas' {frmSearchRegisteredShortcuts: TFrame}, 74 | nick.shortcut.frame.ShortCutKeyAllocation in '..\..\Source\Frames\nick.shortcut.frame.ShortCutKeyAllocation.pas' {frmShortcutKeyAllocation: TFrame}, 75 | nick.shortcut.other.FileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.FileVersionInformation.pas', 76 | nick.shortcut.other.IFileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.IFileVersionInformation.pas', 77 | nick.shortcut.other.INodeXml in '..\..\Source\Repositories\nick.shortcut.other.INodeXml.pas', 78 | nick.shortcut.other.VirtualKeys in '..\..\Source\nick.shortcut.other.VirtualKeys.pas', 79 | nick.shortcut.repository.IIniFile in '..\..\Source\Repositories\nick.shortcut.repository.IIniFile.pas', 80 | nick.shortcut.repository.IniFile in '..\..\Source\Repositories\nick.shortcut.repository.IniFile.pas', 81 | nick.shortcut.repository.IRegistry in '..\..\Source\Repositories\nick.shortcut.repository.IRegistry.pas', 82 | nick.shortcut.repository.ISystem in '..\..\Source\Repositories\nick.shortcut.repository.ISystem.pas', 83 | nick.shortcut.repository.IToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.IToolsApi.pas', 84 | nick.shortcut.repository.IXmlFile in '..\..\Source\Repositories\nick.shortcut.repository.IXmlFile.pas', 85 | nick.shortcut.repository.Registry in '..\..\Source\Repositories\nick.shortcut.repository.Registry.pas', 86 | nick.shortcut.repository.ShortCut in '..\..\Source\Repositories\nick.shortcut.repository.ShortCut.pas', 87 | nick.shortcut.repository.System in '..\..\Source\Repositories\nick.shortcut.repository.System.pas', 88 | nick.shortcut.repository.ToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.ToolsApi.pas', 89 | nick.shortcut.repository.XmlFile in '..\..\Source\Repositories\nick.shortcut.repository.XmlFile.pas', 90 | nick.shortcut.repository.ShortcutExport in '..\..\Source\Repositories\nick.shortcut.repository.ShortcutExport.pas', 91 | nick.shortcut.core.ShortcutExport in '..\..\Source\nick.shortcut.core.ShortcutExport.pas', 92 | nick.shortcut.export.Csv in '..\..\Source\Exports\nick.shortcut.export.Csv.pas', 93 | nick.shortcut.export.Html in '..\..\Source\Exports\nick.shortcut.export.Html.pas', 94 | nick.shortcut.frame.Base in '..\..\Source\Frames\nick.shortcut.frame.Base.pas' {BaseFrame: TFrame}; 95 | 96 | end. 97 | 98 | -------------------------------------------------------------------------------- /Packages/XE8/ShortcutFinderImages.res: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickRing/Delphi-Shortcut-Finder/41747b940e5687c84fa7f9955f51b2880cbc307a/Packages/XE8/ShortcutFinderImages.res -------------------------------------------------------------------------------- /Packages/XE8/nick.toolsapi.shortcut.DelphiShortcutFinder.dpk: -------------------------------------------------------------------------------- 1 | package nick.toolsapi.shortcut.DelphiShortcutFinder; 2 | 3 | {$R *.res} 4 | {$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} 5 | {$ALIGN 8} 6 | {$ASSERTIONS ON} 7 | {$BOOLEVAL OFF} 8 | {$DEBUGINFO OFF} 9 | {$EXTENDEDSYNTAX ON} 10 | {$IMPORTEDDATA ON} 11 | {$IOCHECKS ON} 12 | {$LOCALSYMBOLS ON} 13 | {$LONGSTRINGS ON} 14 | {$OPENSTRINGS ON} 15 | {$OPTIMIZATION OFF} 16 | {$OVERFLOWCHECKS ON} 17 | {$RANGECHECKS ON} 18 | {$REFERENCEINFO ON} 19 | {$SAFEDIVIDE OFF} 20 | {$STACKFRAMES ON} 21 | {$TYPEDADDRESS OFF} 22 | {$VARSTRINGCHECKS ON} 23 | {$WRITEABLECONST OFF} 24 | {$MINENUMSIZE 1} 25 | {$IMAGEBASE $400000} 26 | {$DEFINE DEBUG} 27 | {$ENDIF IMPLICITBUILDING} 28 | {$DESCRIPTION 'IDE Shortcut Finder - https://github.com/NickRing/Delphi-Shortcut-Finder'} 29 | {$LIBSUFFIX 'XE8'} 30 | {$IMPLICITBUILD ON} 31 | 32 | requires 33 | rtl, 34 | designide, 35 | VirtualTreesD, 36 | IndySystem, 37 | IndyProtocols, 38 | IndyCore; 39 | 40 | contains 41 | nick.shortcut.builder.IShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.IShortCutItem.pas', 42 | nick.shortcut.builder.ShortCutItem in '..\..\Source\Builders\nick.shortcut.builder.ShortCutItem.pas', 43 | nick.shortcut.core.IShortCutList in '..\..\Source\nick.shortcut.core.IShortCutList.pas', 44 | nick.shortcut.core.KnownShortcutsRegistration in '..\..\Source\nick.shortcut.core.KnownShortcutsRegistration.pas', 45 | nick.shortcut.core.SearchRegisteredShortcutsRegistration in '..\..\Source\nick.shortcut.core.SearchRegisteredShortcutsRegistration.pas', 46 | nick.shortcut.core.ShortCutFinderRegistration in '..\..\Source\nick.shortcut.core.ShortCutFinderRegistration.pas', 47 | nick.shortcut.core.ShortCutItem in '..\..\Source\nick.shortcut.core.ShortCutItem.pas', 48 | nick.shortcut.core.ShortCutList in '..\..\Source\nick.shortcut.core.ShortCutList.pas', 49 | nick.shortcut.element.Castalia2014 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.Castalia2014.pas', 50 | nick.shortcut.element.CnWizards in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.CnWizards.pas', 51 | nick.shortcut.element.DDevExtensions2 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DDevExtensions2.pas', 52 | nick.shortcut.element.DelphiEditorBase in '..\..\Source\Elements\Base\nick.shortcut.element.DelphiEditorBase.pas', 53 | nick.shortcut.element.DelphiEditorBrief in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorBrief.pas', 54 | nick.shortcut.element.DelphiEditorClassic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorClassic.pas', 55 | nick.shortcut.element.DelphiEditorDefault in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorDefault.pas', 56 | nick.shortcut.element.DelphiEditorEpsilon in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorEpsilon.pas', 57 | nick.shortcut.element.DelphiEditorVisualBasic in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualBasic.pas', 58 | nick.shortcut.element.DelphiEditorVisualStudio in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiEditorVisualStudio.pas', 59 | nick.shortcut.element.DelphiMenu in '..\..\Source\Elements\Delphi\nick.shortcut.element.DelphiMenu.pas', 60 | nick.shortcut.element.DLLExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.DLLExpertBase.pas', 61 | nick.shortcut.element.DocumentInsight3 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.DocumentInsight3.pas', 62 | nick.shortcut.element.GExperts137 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.GExperts137.pas', 63 | nick.shortcut.element.MMX10 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX10.pas', 64 | nick.shortcut.element.MMX11 in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.MMX11.pas', 65 | nick.shortcut.element.OSRegisteredHotKeys in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.OSRegisteredHotKeys.pas', 66 | nick.shortcut.element.PackageExpertBase in '..\..\Source\Elements\Base\nick.shortcut.element.PackageExpertBase.pas', 67 | nick.shortcut.element.ParnassusOUBookmarks in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.ParnassusOUBookmarks.pas', 68 | nick.shortcut.element.SmartInspect in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.SmartInspect.pas', 69 | nick.shortcut.element.XExPlusPack in '..\..\Source\Elements\ThirdParty\nick.shortcut.element.XExPlusPack.pas', 70 | nick.shortcut.factory.IRepository in '..\..\Source\Repositories\nick.shortcut.factory.IRepository.pas', 71 | nick.shortcut.factory.Repository in '..\..\Source\Repositories\nick.shortcut.factory.Repository.pas', 72 | nick.shortcut.frame.KnownShortcuts in '..\..\Source\Frames\nick.shortcut.frame.KnownShortcuts.pas' {frmKnownShortcuts: TFrame}, 73 | nick.shortcut.frame.SearchRegisteredShortcuts in '..\..\Source\Frames\nick.shortcut.frame.SearchRegisteredShortcuts.pas' {frmSearchRegisteredShortcuts: TFrame}, 74 | nick.shortcut.frame.ShortCutKeyAllocation in '..\..\Source\Frames\nick.shortcut.frame.ShortCutKeyAllocation.pas' {frmShortcutKeyAllocation: TFrame}, 75 | nick.shortcut.other.FileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.FileVersionInformation.pas', 76 | nick.shortcut.other.IFileVersionInformation in '..\..\Source\Repositories\nick.shortcut.other.IFileVersionInformation.pas', 77 | nick.shortcut.other.INodeXml in '..\..\Source\Repositories\nick.shortcut.other.INodeXml.pas', 78 | nick.shortcut.other.VirtualKeys in '..\..\Source\nick.shortcut.other.VirtualKeys.pas', 79 | nick.shortcut.repository.IIniFile in '..\..\Source\Repositories\nick.shortcut.repository.IIniFile.pas', 80 | nick.shortcut.repository.IniFile in '..\..\Source\Repositories\nick.shortcut.repository.IniFile.pas', 81 | nick.shortcut.repository.IRegistry in '..\..\Source\Repositories\nick.shortcut.repository.IRegistry.pas', 82 | nick.shortcut.repository.ISystem in '..\..\Source\Repositories\nick.shortcut.repository.ISystem.pas', 83 | nick.shortcut.repository.IToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.IToolsApi.pas', 84 | nick.shortcut.repository.IXmlFile in '..\..\Source\Repositories\nick.shortcut.repository.IXmlFile.pas', 85 | nick.shortcut.repository.Registry in '..\..\Source\Repositories\nick.shortcut.repository.Registry.pas', 86 | nick.shortcut.repository.ShortCut in '..\..\Source\Repositories\nick.shortcut.repository.ShortCut.pas', 87 | nick.shortcut.repository.System in '..\..\Source\Repositories\nick.shortcut.repository.System.pas', 88 | nick.shortcut.repository.ToolsApi in '..\..\Source\Repositories\nick.shortcut.repository.ToolsApi.pas', 89 | nick.shortcut.repository.XmlFile in '..\..\Source\Repositories\nick.shortcut.repository.XmlFile.pas', 90 | nick.shortcut.repository.ShortcutExport in '..\..\Source\Repositories\nick.shortcut.repository.ShortcutExport.pas', 91 | nick.shortcut.core.ShortcutExport in '..\..\Source\nick.shortcut.core.ShortcutExport.pas', 92 | nick.shortcut.export.Csv in '..\..\Source\Exports\nick.shortcut.export.Csv.pas', 93 | nick.shortcut.export.Html in '..\..\Source\Exports\nick.shortcut.export.Html.pas', 94 | nick.shortcut.frame.Base in '..\..\Source\Frames\nick.shortcut.frame.Base.pas' {BaseFrame: TFrame}; 95 | 96 | end. 97 | 98 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Delphi-Shortcut-Finder 2 | ====================== 3 | 4 | Shows/find keyboard short-cuts have be assigned, that may be conflicting. 5 | 6 | #### Supported versions of RadStudio/Delphi IDE 7 | 8 | While there is only a package for XE7 (currently), I have tested it on Delphi XE successfully by copying the DPK file. The only restriction is that it relies on generics. 9 | 10 | You will find the information under `Tools` -> `Options...` -> `Third Party` -> `ShortCut Finder` 11 | 12 | #### Mini-documentation 13 | 14 | There is currently two tabs: 15 | * ##### Known Add-ons 16 | This tab shows a list shortcuts that **Delphi-Shortcut-Finder** knows about that are currently installed and a description about them. It is possible to: 17 | * search by primary shortcut key, and/or 18 | * secondary shortcut key, and/or 19 | * Description, by regular expression with/without case sensitivity, 20 | or 21 | * Just show the conflicting shortcuts. 22 | 23 | When searching by primary/secondary shortcut, the following applies: 24 | 25 | * If one or more modifier (ctrl, shift, alt) is press and no key, then all shortcuts that contain those modifiers are shown 26 | * If only a key is press, then all shortcuts with that key is shown 27 | * Due to a limitation of the control, SPACE and ESCAPE keys (and possibly others) can not be entered. 28 | 29 | 30 | * ##### IDE Registered ShortCuts 31 | This tab will ask the IDE if the shortcut provided has been registered. Using the information back from the IDE, it will try to find the module that deals with the shortcut. If **Delphi-Shortcut-Finder** can not find any information out, it will display "**< unknown >**" 32 | 33 | The order is the order of processing, from the top and going down downwards ie, the top one gets first go at the shortcut. 34 | 35 | #### History 36 | 37 | The idea of this Delphi add-on came from a [discussion from Delphi Developers Google+ community](https://plus.google.com/105522328114529031567/posts/69wXU5DwkG8). 38 | 39 | I was thinking, why can't we check to see what add-ons there are and what short-cuts they use. When this was close to complete, I realised that there would be plenty of unknown add-ons with short-cuts that I don't have access to (because they are private, in-house for work, etc). Since I didn't want to scrap the work I had already done, I added an second section, where it asks the IDE which short-cuts are are registered and find the plug-in that registered it. It is not as nice but with some brain power, the user should be able to figure things out. :-) 40 | 41 | #### Thanks 42 | 43 | I would like to thank Andreas Hausladen for telling me where [DDevExtensions](http://andy.jgknet.de/blog/ide-tools/ddevextensions/) stores one of its settings. 44 | 45 | #### Dependencies 46 | 47 | * [Virtual TreeView](https://code.google.com/p/virtual-treeview/) for the UI. This needs to be installed first. 48 | * [Jedi.inc](https://github.com/project-jedi/jedi) and that is only because of a [bug in Delphi XE7 registry settings](http://qc.embarcadero.com/wc/qcmain.aspx?d=127616). 49 | * Indy for HTML encoding 50 | 51 | #### Known issue(s) 52 | 53 | * The TRichEdit component has a Zoom property that was introduced in XE6. If you are using a version previous to XE6, the IDE will pop-up a dialog saying that the property doesn't exists - click on `Ignore` and all should be fine. 54 | 55 | 56 | #### History 57 | 58 | * 2014/11/02 59 | * Initial release to the world 60 | * 2014/11/03 61 | * Modified finding module to only search the current process. Suggested by David Millington. 62 | * Changed the Virtual TreeViews to include full row selection and to use explorer themes. Suggested by Achim Kalwa. 63 | * Changed tab caption from a suggestion by David Millington. 64 | * 2015/02/24 65 | * **Version 2 released** 66 | * Added [SmartInspect](http://www.gurock.com/smartinspect/), [XE?PlusPack](http://jed-software.com/blog/?cat=35) and OS hotkeys 67 | * Updated CnWizards hotkeys 68 | * Added the ability to export registered hotkeys as CSV or HTML 69 | -------------------------------------------------------------------------------- /Resources/ShortcutFinderImage.bmp: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickRing/Delphi-Shortcut-Finder/41747b940e5687c84fa7f9955f51b2880cbc307a/Resources/ShortcutFinderImage.bmp -------------------------------------------------------------------------------- /Resources/ShortcutFinderImages.RC: -------------------------------------------------------------------------------- 1 | SHORTCUT_FINDER_ICON BITMAP "..\..\Resources\ShortcutFinderImage.bmp" 2 | -------------------------------------------------------------------------------- /Source/Builders/nick.shortcut.builder.IShortCutItem.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.builder.IShortCutItem; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.repository.IRegistry, 7 | nick.shortcut.repository.IIniFile, 8 | nick.shortcut.repository.ISystem, 9 | nick.shortcut.other.INodeXml; 10 | 11 | type 12 | TRegistryDecoder = reference to function (const ARegistryRepository : IRegistryRepository; const ASectionKey : string): T; 13 | TIniDecoder = reference to function (const AIniFileRepository : IIniFileRepository; const ASectionKey : string; const AKey : string): T; 14 | TXmlDecoder = reference to function (const ANodeXml : INodeXml): T; 15 | 16 | IBuildShortCut = interface 17 | ['{D93C7005-60B9-428E-84FF-A93534708841}'] 18 | procedure Build(); 19 | end; 20 | 21 | {$REGION 'Parent Active interfaces'} 22 | IBuildRegistryParentActiveDecoder = interface 23 | ['{4AF7C436-9DB3-4FCF-A309-6AA04C6893B1}'] 24 | function WithDecoder(const ADecoder : TRegistryDecoder) : IBuildShortCut; 25 | end; 26 | 27 | IBuildRegistryParentActiveKey = interface 28 | ['{D93550DB-A20B-4247-ACB0-416D76FA1430}'] 29 | function WithKey(const AKey : string) : IBuildRegistryParentActiveDecoder; 30 | end; 31 | 32 | IBuildRegistryParentActivePath = interface 33 | ['{F9362C10-3D8E-4986-8EDC-CEC70A792EBA}'] 34 | function WithPath(const APath : string) : IBuildRegistryParentActiveKey; 35 | end; 36 | 37 | IBuildIniParentActiveDecoder = interface 38 | ['{F3A4872D-63FA-4BC8-B322-C321725C9B50}'] 39 | function WithDecoder(const ADecoder : TIniDecoder) : IBuildShortCut; 40 | end; 41 | 42 | IBuildIniParentActiveKey = interface 43 | ['{7ED9E5C3-C8E1-4251-959E-84B2B3FD8303}'] 44 | function WithKey(const AKey : string) : IBuildIniParentActiveDecoder; 45 | end; 46 | 47 | IBuildIniParentActiveSection = interface 48 | ['{F7F88169-4BA0-4515-8F36-FDCFC7327597}'] 49 | function WithSection(const ASection : string) : IBuildIniParentActiveKey; 50 | end; 51 | 52 | IBuildIniParentActiveFileName = interface 53 | ['{AC2C165B-D812-4CA3-986D-088B9C74ADAD}'] 54 | function WithFileName(const AFileName : string) : IBuildIniParentActiveSection; 55 | end; 56 | 57 | IBuildXmlParentActiveDecoder = interface 58 | ['{2AB1723F-2038-40BB-B670-A7DE43F6B567}'] 59 | function WithDecoder(const ADecoder : TXmlDecoder) : IBuildShortCut; 60 | end; 61 | 62 | IBuildXmlParentActivePath = interface 63 | ['{49EBA339-55CD-4163-A569-84303C4CFF2B}'] 64 | function WithPath(const APath : array of string) : IBuildXmlParentActiveDecoder; 65 | end; 66 | 67 | IBuildXmlParentActiveFileName = interface 68 | ['{53669F9D-307C-4667-B5B0-101B1B885F3B}'] 69 | function WithFileName(const AFileName : string) : IBuildXmlParentActivePath; 70 | end; 71 | 72 | IBuildParentActiveType = interface 73 | ['{A33DA2F8-B20C-4DF1-9681-D981BCF1ECB7}'] 74 | function IsXMLFile() : IBuildXmlParentActiveFileName; 75 | function IsINIFile() : IBuildIniParentActiveFileName; 76 | function IsRegistry() : IBuildRegistryParentActivePath; 77 | end; 78 | 79 | IBuildParentActiveState = interface(IBuildShortCut) 80 | ['{EBEC5B82-E0BA-49E4-8F5F-B87FE6B301CF}'] 81 | function WithParentActiveState(const AIsActive : Boolean) : IBuildParentActiveType; 82 | //procedure Build(); 83 | end; 84 | {$ENDREGION} 85 | 86 | {$REGION 'Primary Active interfaces'} 87 | IBuildRegistryActiveDecoder = interface 88 | ['{4AF7C436-9DB3-4FCF-A309-6AA04C6893B1}'] 89 | function WithDecoder(const ADecoder : TRegistryDecoder) : IBuildParentActiveState; 90 | end; 91 | 92 | IBuildRegistryActiveKey = interface 93 | ['{D93550DB-A20B-4247-ACB0-416D76FA1430}'] 94 | function WithKey(const AKey : string) : IBuildRegistryActiveDecoder; 95 | end; 96 | 97 | IBuildRegistryActivePath = interface 98 | ['{F9362C10-3D8E-4986-8EDC-CEC70A792EBA}'] 99 | function WithPath(const APath : string) : IBuildRegistryActiveKey; 100 | end; 101 | 102 | IBuildIniActiveDecoder = interface 103 | ['{F3A4872D-63FA-4BC8-B322-C321725C9B50}'] 104 | function WithDecoder(const ADecoder : TIniDecoder) : IBuildParentActiveState; 105 | end; 106 | 107 | IBuildIniActiveKey = interface 108 | ['{7ED9E5C3-C8E1-4251-959E-84B2B3FD8303}'] 109 | function WithKey(const AKey : string) : IBuildIniActiveDecoder; 110 | end; 111 | 112 | IBuildIniActiveSection = interface 113 | ['{F7F88169-4BA0-4515-8F36-FDCFC7327597}'] 114 | function WithSection(const ASection : string) : IBuildIniActiveKey; 115 | end; 116 | 117 | IBuildIniActiveFileName = interface 118 | ['{AC2C165B-D812-4CA3-986D-088B9C74ADAD}'] 119 | function WithFileName(const AFileName : string) : IBuildIniActiveSection; 120 | end; 121 | 122 | IBuildXmlActiveDecoder = interface 123 | ['{2AB1723F-2038-40BB-B670-A7DE43F6B567}'] 124 | function WithDecoder(const ADecoder : TXmlDecoder) : IBuildParentActiveState; 125 | end; 126 | 127 | IBuildXmlActivePath = interface 128 | ['{49EBA339-55CD-4163-A569-84303C4CFF2B}'] 129 | function WithPath(const APath : array of string) : IBuildXmlActiveDecoder; 130 | end; 131 | 132 | IBuildXmlActiveFileName = interface 133 | ['{53669F9D-307C-4667-B5B0-101B1B885F3B}'] 134 | function WithFileName(const AFileName : string) : IBuildXmlActivePath; 135 | end; 136 | 137 | IBuildActiveType = interface 138 | ['{A33DA2F8-B20C-4DF1-9681-D981BCF1ECB7}'] 139 | function IsXMLFile() : IBuildXmlActiveFileName; 140 | function IsINIFile() : IBuildIniActiveFileName; 141 | function IsRegistry() : IBuildRegistryActivePath; 142 | end; 143 | 144 | IBuildActiveState = interface(IBuildShortCut) 145 | ['{EBEC5B82-E0BA-49E4-8F5F-B87FE6B301CF}'] 146 | function WithActiveState(const AIsActive : Boolean) : IBuildActiveType; 147 | //procedure Build(); 148 | end; 149 | {$ENDREGION} 150 | 151 | {$REGION 'Primary ShortCut interfaces'} 152 | IBuildRegistryShortCutDecoder = interface 153 | ['{D6EAFA7E-D225-4692-ACA1-78D2F52F0046}'] 154 | function WithDecoder(const ADecoder : TRegistryDecoder) : IBuildActiveState; 155 | end; 156 | 157 | IBuildRegistryShortCutKey = interface 158 | ['{8EFE25F5-2F17-4B93-8C11-70165D249F95}'] 159 | function WithKey(const AKey : string) : IBuildRegistryShortCutDecoder; 160 | end; 161 | 162 | IBuildRegistryShortCutPath = interface 163 | ['{6098974E-F54C-49E1-BC18-C744CEFB66E4}'] 164 | function WithPath(const APath : string) : IBuildRegistryShortCutKey; 165 | end; 166 | 167 | IBuildIniShortCutDecoder = interface 168 | ['{642EC77C-DE5D-45CD-AACE-1CE0B51E2C41}'] 169 | function WithDecoder(const ADecoder : TIniDecoder) : IBuildActiveState; 170 | end; 171 | 172 | IBuildIniShortCutKey = interface 173 | ['{4465342A-D5FE-4C4C-8CB1-5E246F96BB8D}'] 174 | function WithKey(const AKey : string) : IBuildIniShortCutDecoder; 175 | end; 176 | 177 | IBuildIniShortCutSection = interface 178 | ['{64057F37-7315-4466-920A-468C68387543}'] 179 | function WithSection(const ASection : string) : IBuildIniShortCutKey; 180 | end; 181 | 182 | IBuildIniShortCutFileName = interface 183 | ['{1B5C8560-CAF9-4548-A99B-AEA2BA938157}'] 184 | function WithFileName(const AFileName : string) : IBuildIniShortCutSection; 185 | end; 186 | 187 | IBuildXmlShortCutDecoder = interface 188 | ['{6170A81B-AC4B-4DE5-92C2-45B3AB3CACE9}'] 189 | function WithDecoder(const ADecoder : TXmlDecoder) : IBuildActiveState; 190 | end; 191 | 192 | IBuildXmlShortCutPath = interface 193 | ['{CBBB64F5-BB47-4029-8CF4-981490712810}'] 194 | function WithPath(const APath : array of string) : IBuildXmlShortCutDecoder; 195 | end; 196 | 197 | IBuildXmlShortCutFileName = interface 198 | ['{A08EBF17-A742-4DD5-8305-92D22C109592}'] 199 | function WithFileName(const AFileName : string) : IBuildXmlShortCutPath; 200 | end; 201 | 202 | IBuildShortCutType = interface(IBuildActiveState) 203 | ['{D68F6F0A-9EFA-4D29-A92A-450B53B85169}'] 204 | function IsXMLFile() : IBuildXmlShortCutFileName; 205 | function IsINIFile() : IBuildIniShortCutFileName; 206 | function IsRegistry() : IBuildRegistryShortCutPath; 207 | //function WithActiveState(const AIsActive : Boolean) : IBuildActiveType; 208 | //procedure Build(); 209 | end; 210 | 211 | IBuildPrimaryShortCut = interface 212 | ['{66B6B127-FD34-4673-84A5-AB969A0D78E0}'] 213 | function WithShortCut(const AShortCut : TShortCut) : IBuildShortCutType; 214 | end; 215 | {$ENDREGION} 216 | 217 | IBuildDescription = interface(IBuildPrimaryShortCut) 218 | ['{C499EEB7-4A6E-4C75-88A7-D1502F8B94BC}'] 219 | function WithDescription(const ADescription : string) : IBuildPrimaryShortCut; 220 | //function WithShortCut(const AShortCut : TShortCut) : IBuildShortCutType; 221 | end; 222 | 223 | IShortCutItemBuilder = interface 224 | ['{17697B34-C191-41D0-BA78-23B2ECEF69F8}'] 225 | function WithDetail(const ADetail : string) : IBuildDescription; 226 | end; 227 | 228 | implementation 229 | 230 | end. 231 | -------------------------------------------------------------------------------- /Source/Elements/Base/nick.shortcut.element.DLLExpertBase.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.element.DLLExpertBase; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.core.ShortCutList, 7 | {$IFDEF VER220} 8 | Windows; 9 | {$ELSE} 10 | WinApi.Windows; 11 | {$ENDIF} 12 | 13 | type 14 | TDLLExpertBaseElement = class abstract(TShortCutList) 15 | private 16 | protected 17 | function CheckForExpertDLL(const AExpertName : string) : Boolean; 18 | function IsVersionAllowed(const AVSFixedFileInfo : TVSFixedFileInfo) : Boolean; virtual; 19 | public 20 | end; 21 | 22 | implementation 23 | 24 | uses 25 | nick.shortcut.repository.IRegistry; 26 | 27 | function TDLLExpertBaseElement.IsVersionAllowed(const AVSFixedFileInfo: TVSFixedFileInfo): Boolean; 28 | begin 29 | Result := True; 30 | end; 31 | 32 | function TDLLExpertBaseElement.CheckForExpertDLL(const AExpertName: string): Boolean; 33 | var 34 | LRegistryRepository : IRegistryRepository; 35 | LBaseRegistryKey: string; 36 | LFilePath: string; 37 | LVSFixedFileInfo: TVSFixedFileInfo; 38 | begin 39 | Result := False; 40 | if not RepositoryFactory().ToolsApiRepository().GetBaseRegistryKey(LBaseRegistryKey) then 41 | Exit; 42 | 43 | LRegistryRepository := RepositoryFactory().RegistryRepository(); 44 | 45 | if not LRegistryRepository.OpenKeyReadOnly(LBaseRegistryKey + '\Experts\') then 46 | Exit; 47 | 48 | try 49 | LFilePath := LRegistryRepository.ReadString(AExpertName); 50 | 51 | if not RepositoryFactory().SystemRepository().FileExists(LFilePath) then 52 | Exit; 53 | 54 | if not RepositoryFactory().SystemRepository().GetVersionInformation(LFilePath, LVSFixedFileInfo) then 55 | Exit; 56 | 57 | Result := IsVersionAllowed(LVSFixedFileInfo); 58 | finally 59 | LRegistryRepository.CloseKey; 60 | end; 61 | end; 62 | 63 | end. 64 | -------------------------------------------------------------------------------- /Source/Elements/Base/nick.shortcut.element.DelphiEditorBase.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.element.DelphiEditorBase; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.core.ShortCutList, 7 | nick.shortcut.core.ShortCutItem; 8 | 9 | type 10 | TDelphiEditorBaseElement = class abstract(TShortCutList) 11 | private 12 | FCtrlAltKeysInUse: Boolean; 13 | procedure SetCtrlAltKeysInUse(); 14 | protected 15 | function GetSpeedSetting : string; virtual; abstract; 16 | 17 | procedure PopulateShortCuts(); override; 18 | procedure Populate(); virtual; abstract; 19 | 20 | procedure AddShortCut(const AShortCut : IShortCutItem); 21 | function GetName() : string; override; 22 | property CtrlAltKeysInUse : Boolean read FCtrlAltKeysInUse; 23 | public 24 | function IsUseable() : Boolean; override; 25 | end; 26 | 27 | implementation 28 | 29 | uses 30 | {$IFDEF VER220} 31 | SysUtils, 32 | Classes, 33 | {$ELSE} 34 | System.SysUtils, 35 | System.Classes, 36 | {$ENDIF} 37 | nick.shortcut.repository.IRegistry; 38 | 39 | function TDelphiEditorBaseElement.GetName: string; 40 | begin 41 | Result := 'Delphi Editor : '; 42 | end; 43 | 44 | function TDelphiEditorBaseElement.IsUseable: Boolean; 45 | var 46 | LBaseRegistryKey: string; 47 | LEditorSpeedSetting: string; 48 | LRegistryRepository : IRegistryRepository; 49 | begin 50 | Result := False; 51 | 52 | if not RepositoryFactory().ToolsApiRepository().GetBaseRegistryKey(LBaseRegistryKey) then 53 | Exit; 54 | 55 | LRegistryRepository := RepositoryFactory().RegistryRepository(); 56 | 57 | if not LRegistryRepository.OpenKeyReadOnly(LBaseRegistryKey + '\Editor\Options\') then 58 | Exit; 59 | 60 | try 61 | LEditorSpeedSetting := LRegistryRepository.ReadString('Editor SpeedSetting'); 62 | 63 | Result := SameText(LEditorSpeedSetting, GetSpeedSetting()); 64 | finally 65 | LRegistryRepository.CloseKey; 66 | end; 67 | end; 68 | 69 | procedure TDelphiEditorBaseElement.PopulateShortCuts; 70 | begin 71 | SetCtrlAltKeysInUse(); 72 | Populate; 73 | end; 74 | 75 | procedure TDelphiEditorBaseElement.AddShortCut(const AShortCut: IShortCutItem); 76 | const 77 | scCtrlAlt = scCtrl or scAlt; 78 | begin 79 | if (not FCtrlAltKeysInUse) and 80 | ((AShortCut.Primary and scCtrlAlt) = scCtrlAlt) then 81 | begin 82 | Exit; 83 | end; 84 | 85 | inherited Add(AShortCut); 86 | end; 87 | 88 | procedure TDelphiEditorBaseElement.SetCtrlAltKeysInUse; 89 | var 90 | LBaseRegistryKey: string; 91 | LRegistryRepository: IRegistryRepository; 92 | LUseCtrlAltKeys: string; 93 | begin 94 | FCtrlAltKeysInUse := False; 95 | 96 | if not RepositoryFactory().ToolsApiRepository().GetBaseRegistryKey(LBaseRegistryKey) then 97 | Exit; 98 | 99 | LRegistryRepository := RepositoryFactory().RegistryRepository(); 100 | 101 | if not LRegistryRepository.OpenKeyReadOnly(LBaseRegistryKey + '\Editor\Options\') then 102 | Exit; 103 | 104 | try 105 | LUseCtrlAltKeys := LRegistryRepository.ReadString('Use CtrlAlt Keys'); 106 | 107 | {$IFDEF VER220} 108 | FCtrlAltKeysInUse := SysUtils.StrToBoolDef(LUseCtrlAltKeys, False); 109 | {$ELSE} 110 | FCtrlAltKeysInUse := System.SysUtils.StrToBoolDef(LUseCtrlAltKeys, False); 111 | {$ENDIF} 112 | finally 113 | LRegistryRepository.CloseKey; 114 | end; 115 | end; 116 | 117 | end. 118 | -------------------------------------------------------------------------------- /Source/Elements/Base/nick.shortcut.element.PackageExpertBase.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.element.PackageExpertBase; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.core.ShortCutList; 7 | 8 | type 9 | TPackageExpertBaseElement = class abstract(TShortCutList) 10 | protected 11 | function IsPackageLoaded(const APackageName : string) : Boolean; 12 | end; 13 | 14 | implementation 15 | 16 | function TPackageExpertBaseElement.IsPackageLoaded(const APackageName: string): Boolean; 17 | begin 18 | Result := RepositoryFactory().ToolsApiRepository().IsPackageLoaded(APackageName); 19 | end; 20 | 21 | end. 22 | -------------------------------------------------------------------------------- /Source/Elements/Delphi/nick.shortcut.element.DelphiEditorBrief.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickRing/Delphi-Shortcut-Finder/41747b940e5687c84fa7f9955f51b2880cbc307a/Source/Elements/Delphi/nick.shortcut.element.DelphiEditorBrief.pas -------------------------------------------------------------------------------- /Source/Elements/Delphi/nick.shortcut.element.DelphiEditorClassic.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickRing/Delphi-Shortcut-Finder/41747b940e5687c84fa7f9955f51b2880cbc307a/Source/Elements/Delphi/nick.shortcut.element.DelphiEditorClassic.pas -------------------------------------------------------------------------------- /Source/Elements/Delphi/nick.shortcut.element.DelphiEditorEpsilon.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickRing/Delphi-Shortcut-Finder/41747b940e5687c84fa7f9955f51b2880cbc307a/Source/Elements/Delphi/nick.shortcut.element.DelphiEditorEpsilon.pas -------------------------------------------------------------------------------- /Source/Elements/Delphi/nick.shortcut.element.DelphiEditorVisualBasic.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickRing/Delphi-Shortcut-Finder/41747b940e5687c84fa7f9955f51b2880cbc307a/Source/Elements/Delphi/nick.shortcut.element.DelphiEditorVisualBasic.pas -------------------------------------------------------------------------------- /Source/Elements/Delphi/nick.shortcut.element.DelphiEditorVisualStudio.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickRing/Delphi-Shortcut-Finder/41747b940e5687c84fa7f9955f51b2880cbc307a/Source/Elements/Delphi/nick.shortcut.element.DelphiEditorVisualStudio.pas -------------------------------------------------------------------------------- /Source/Elements/Delphi/nick.shortcut.element.DelphiMenu.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.element.DelphiMenu; 2 | 3 | interface 4 | 5 | implementation 6 | 7 | uses 8 | nick.shortcut.core.ShortCutItem, 9 | nick.shortcut.repository.ShortCut, 10 | nick.shortcut.core.ShortCutList, 11 | {$IFDEF VER220} 12 | Classes, 13 | Menus; 14 | {$ELSE} 15 | System.Classes, 16 | Vcl.Menus; 17 | {$ENDIF} 18 | 19 | type 20 | TDelphiMenuElement = class(TShortCutList) 21 | private 22 | procedure IterateMenus(const AMenu : TMenuItem; const AMenuPath : string); 23 | protected 24 | procedure PopulateShortCuts(); override; 25 | function GetName() : string; override; 26 | public 27 | function IsUseable() : Boolean; override; 28 | end; 29 | 30 | function TDelphiMenuElement.GetName: string; 31 | begin 32 | Result := 'Delphi Menu'; 33 | end; 34 | 35 | function TDelphiMenuElement.IsUseable: Boolean; 36 | begin 37 | Result := True; 38 | end; 39 | 40 | procedure TDelphiMenuElement.IterateMenus(const AMenu: TMenuItem; const AMenuPath : string); 41 | var 42 | LMenuItem : TMenuItem; 43 | LMenuCaption: string; 44 | LMenuPath: string; 45 | begin 46 | LMenuCaption := StripHotkey(AMenu.Caption); 47 | if (AMenuPath <> '') then 48 | LMenuPath := AMenuPath + ' -> ' + LMenuCaption 49 | else 50 | LMenuPath := LMenuCaption; 51 | 52 | if (AMenu.ShortCut <> 0) then 53 | Add(NewShortCut(LMenuCaption, AMenu.ShortCut, scNone, LMenuPath)); 54 | 55 | for LMenuItem in AMenu do 56 | IterateMenus(LMenuItem, LMenuPath); 57 | end; 58 | 59 | procedure TDelphiMenuElement.PopulateShortCuts(); 60 | var 61 | LMainMenu: TMainMenu; 62 | begin 63 | LMainMenu := RepositoryFactory().ToolsApiRepository().GetMainMenu(); 64 | 65 | if Assigned(LMainMenu) then 66 | IterateMenus(LMainMenu.Items, ''); 67 | end; 68 | 69 | initialization 70 | nick.shortcut.repository.ShortCut.GetShortCutRepository().Add(TDelphiMenuElement); 71 | 72 | end. 73 | 74 | -------------------------------------------------------------------------------- /Source/Elements/ThirdParty/nick.shortcut.element.DDevExtensions2.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.element.DDevExtensions2; 2 | 3 | interface 4 | 5 | implementation 6 | 7 | uses 8 | nick.shortcut.repository.ShortCut, 9 | nick.shortcut.builder.IShortCutItem, 10 | nick.shortcut.builder.ShortCutItem, 11 | nick.shortcut.repository.IRegistry, 12 | nick.shortcut.other.INodeXml, 13 | nick.shortcut.element.DLLExpertBase, 14 | {$IFDEF VER220} 15 | SysUtils, 16 | Menus, 17 | Classes, 18 | Windows; 19 | {$ELSE} 20 | System.SysUtils, 21 | Vcl.Menus, 22 | System.Classes, 23 | WinApi.Windows; 24 | {$ENDIF} 25 | 26 | type 27 | TDDevExtensions2Element = class(TDLLExpertBaseElement) 28 | private 29 | protected 30 | procedure PopulateShortCuts(); override; 31 | function GetName() : string; override; 32 | function IsVersionAllowed(const AVSFixedFileInfo : TVSFixedFileInfo) : Boolean; override; 33 | function GetDescription() : string; override; 34 | public 35 | function IsUseable() : Boolean; override; 36 | end; 37 | 38 | function TDDevExtensions2Element.GetDescription: string; 39 | begin 40 | Result := 'DDevExtensions extends the Delphi/C++Builder IDE by adding some ' + 41 | 'new productivity features.' + System.sLineBreak + System.sLineBreak + 42 | 'http://andy.jgknet.de/blog/ide-tools/ddevextensions/'; 43 | end; 44 | 45 | function TDDevExtensions2Element.GetName: string; 46 | begin 47 | Result := 'DDevExtensions v2'; 48 | end; 49 | 50 | function TDDevExtensions2Element.IsUseable: Boolean; 51 | begin 52 | Result := CheckForExpertDLL('DDevExtensions'); 53 | end; 54 | 55 | function TDDevExtensions2Element.IsVersionAllowed(const AVSFixedFileInfo: TVSFixedFileInfo): Boolean; 56 | begin 57 | Result := (HiWord(AVSFixedFileInfo.dwFileVersionMS) = 2) (*and 58 | (LoWord(AVSFixedFileInfo.dwFileVersionMS) = 8)*); 59 | end; 60 | 61 | procedure TDDevExtensions2Element.PopulateShortCuts; 62 | var 63 | LAppDataDirectory: string; 64 | LPackageVersion: Integer; 65 | LRegistryKey: string; 66 | LRegistryShortCutDecoder : TRegistryDecoder; 67 | LRegistryEnabledDecoder : TRegistryDecoder; 68 | LXmlShortCutDecoder : TXmlDecoder; 69 | LXmlEnabledDecoder : TXmlDecoder; 70 | LXmlFileName: string; 71 | begin 72 | LRegistryShortCutDecoder := function(const ARegistryRepository : IRegistryRepository; const ASectionKey : string) : TShortCut 73 | begin 74 | Result := scNone; 75 | if (ARegistryRepository.ValueExists(ASectionKey)) then 76 | Result := ARegistryRepository.ReadInteger(ASectionKey); 77 | end; 78 | 79 | LRegistryEnabledDecoder := function(const ARegistryRepository : IRegistryRepository; const ASectionKey : string) : Boolean 80 | var 81 | LBytes: TArray; 82 | LToolBarDataSize: Integer; 83 | begin 84 | Result := False; 85 | if (ARegistryRepository.ValueExists(ASectionKey)) then 86 | begin 87 | LToolBarDataSize := ARegistryRepository.GetDataSize(ASectionKey); 88 | SetLength(LBytes, LToolBarDataSize); 89 | ARegistryRepository.ReadBinaryData(ASectionKey, Pointer(LBytes)^, LToolBarDataSize); 90 | Result := (LBytes[Length(LBytes) - 1] <> 0); 91 | end; 92 | end; 93 | 94 | LXmlShortCutDecoder := function(const ANodeXml : INodeXml) : TShortCut 95 | var 96 | LAttributeNode : INodeXml; 97 | begin 98 | Result := scNone; 99 | if not Assigned(ANodeXml) then 100 | Exit; 101 | 102 | LAttributeNode := ANodeXml.FindAttribute('Value'); 103 | if Assigned(LAttributeNode) then 104 | Result := StrToIntDef(LAttributeNode.NodeValue, scNone); 105 | end; 106 | 107 | LXmlEnabledDecoder := function(const ANodeXml : INodeXml) : Boolean 108 | var 109 | LAttributeNode : INodeXml; 110 | begin 111 | Result := False; 112 | if not Assigned(ANodeXml) then 113 | Exit; 114 | 115 | LAttributeNode := ANodeXml.FindAttribute('Value'); 116 | if Assigned(LAttributeNode) then 117 | Result := StrToBoolDef(LAttributeNode.NodeValue, False); 118 | end; 119 | 120 | LPackageVersion := RepositoryFactory().ToolsApiRepository().GetPackageVersion(); 121 | 122 | LRegistryKey := '\Software\DelphiTools\DDevExtensions\' + IntToStr(LPackageVersion) + '\ComponentSelector'; 123 | 124 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 125 | .WithDetail('Component Selector') 126 | .WithDescription('Component Selector') 127 | .WithShortCut(scNone) 128 | .IsRegistry() 129 | .WithPath(LRegistryKey) 130 | .WithKey('Hotkey') 131 | .WithDecoder(LRegistryShortCutDecoder) 132 | .WithActiveState(False) 133 | .IsRegistry() 134 | .WithPath(LRegistryKey) 135 | .WithKey('Toolbar') 136 | .WithDecoder(LRegistryEnabledDecoder) 137 | .Build(); 138 | 139 | if not (RepositoryFactory().SystemRepository().GetAppDataDirectory(LAppDataDirectory)) then 140 | Exit; 141 | 142 | LXmlFileName := LAppDataDirectory + 'DDevExtensions\DDevExtensions' + IntToStr(LPackageVersion) + '.xml'; 143 | 144 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 145 | .WithDetail('Extended IDE Settings') 146 | .WithShortCut(scNone) 147 | .IsXMLFile() 148 | .WithFileName(LXmlFileName) 149 | .WithPath(['DDevExtensions', 'DSUFeatures', 'StructureViewSearchHotKey']) 150 | .WithDecoder(LXmlShortCutDecoder) 151 | .Build(); 152 | 153 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 154 | .WithDetail('Find Unit/Use Unit') 155 | .WithShortCut(scNone) 156 | .IsXMLFile() 157 | .WithFileName(LXmlFileName) 158 | .WithPath(['DDevExtensions', 'UnitSelector', 'FindUseUnitHotKey']) 159 | .WithDecoder(LXmlShortCutDecoder) 160 | .WithActiveState(True) 161 | .IsXMLFile() 162 | .WithFileName(LXmlFileName) 163 | .WithPath(['DDevExtensions', 'UnitSelector', 'ReplaceUseUnit']) 164 | .WithDecoder(LXmlEnabledDecoder) 165 | .Build(); 166 | 167 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 168 | .WithDetail('Indent text block with Tab') 169 | .WithShortCut(SystemRepository().ShortCut(VK_TAB, [])) 170 | .WithActiveState(True) 171 | .IsXMLFile() 172 | .WithFileName(LXmlFileName) 173 | .WithPath(['DDevExtensions', 'KeyBindings', 'TabIndent']) 174 | .WithDecoder(LXmlEnabledDecoder) 175 | .Build(); 176 | 177 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 178 | .WithDetail('Extended Home') 179 | .WithShortCut(SystemRepository().ShortCut(VK_HOME, [])) 180 | .WithActiveState(True) 181 | .IsXMLFile() 182 | .WithFileName(LXmlFileName) 183 | .WithPath(['DDevExtensions', 'KeyBindings', 'ExtendedHome']) 184 | .WithDecoder(LXmlEnabledDecoder) 185 | .Build(); 186 | 187 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 188 | .WithDetail('Extended Ctrl-Left') 189 | .WithShortCut(SystemRepository().ShortCut(VK_LEFT, [ssCtrl])) 190 | .WithActiveState(False) 191 | .IsXMLFile() 192 | .WithFileName(LXmlFileName) 193 | .WithPath(['DDevExtensions', 'KeyBindings', 'ExtendedCtrlLeftRight']) 194 | .WithDecoder(LXmlEnabledDecoder) 195 | .Build(); 196 | 197 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 198 | .WithDetail('Extended Ctrl-Right') 199 | .WithShortCut(SystemRepository().ShortCut(VK_RIGHT, [ssCtrl])) 200 | .WithActiveState(False) 201 | .IsXMLFile() 202 | .WithFileName(LXmlFileName) 203 | .WithPath(['DDevExtensions', 'KeyBindings', 'ExtendedCtrlLeftRight']) 204 | .WithDecoder(LXmlEnabledDecoder) 205 | .Build(); 206 | 207 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 208 | .WithDetail('Shift-Ctrl-Alt-Up move line/block') 209 | .WithShortCut(SystemRepository().ShortCut(VK_UP, [ssShift, ssAlt, ssCtrl])) 210 | .WithActiveState(True) 211 | .IsXMLFile() 212 | .WithFileName(LXmlFileName) 213 | .WithPath(['DDevExtensions', 'KeyBindings', 'MoveLineBlock']) 214 | .WithDecoder(LXmlEnabledDecoder) 215 | .Build(); 216 | 217 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 218 | .WithDetail('Shift-Ctrl-Alt-Down move line/block') 219 | .WithShortCut(SystemRepository().ShortCut(VK_DOWN, [ssShift, ssAlt, ssCtrl])) 220 | .WithActiveState(True) 221 | .IsXMLFile() 222 | .WithFileName(LXmlFileName) 223 | .WithPath(['DDevExtensions', 'KeyBindings', 'MoveLineBlock']) 224 | .WithDecoder(LXmlEnabledDecoder) 225 | .Build(); 226 | 227 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 228 | .WithDetail('Find declaration on Ctrl-Alt-PgUp') 229 | .WithShortCut(SystemRepository().ShortCut(VK_PRIOR, [ssAlt, ssCtrl])) 230 | .WithActiveState(True) 231 | .IsXMLFile() 232 | .WithFileName(LXmlFileName) 233 | .WithPath(['DDevExtensions', 'KeyBindings', 'FindDeclOnCaret']) 234 | .WithDecoder(LXmlEnabledDecoder) 235 | .Build(); 236 | end; 237 | 238 | initialization 239 | nick.shortcut.repository.ShortCut.GetShortCutRepository().Add(TDDevExtensions2Element); 240 | 241 | end. 242 | 243 | -------------------------------------------------------------------------------- /Source/Elements/ThirdParty/nick.shortcut.element.DocumentInsight3.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.element.DocumentInsight3; 2 | 3 | interface 4 | 5 | implementation 6 | 7 | uses 8 | nick.shortcut.repository.ShortCut, 9 | nick.shortcut.builder.IShortCutItem, 10 | nick.shortcut.builder.ShortCutItem, 11 | nick.shortcut.repository.IIniFile, 12 | nick.shortcut.element.DLLExpertBase, 13 | {$IFDEF VER220} 14 | Classes, 15 | Windows; 16 | {$ELSE} 17 | System.Classes, 18 | WinApi.Windows; 19 | {$ENDIF} 20 | 21 | type 22 | TDocumentInsight3Element = class(TDLLExpertBaseElement) 23 | private 24 | protected 25 | procedure PopulateShortCuts(); override; 26 | function GetName() : string; override; 27 | function IsVersionAllowed(const AVSFixedFileInfo : TVSFixedFileInfo) : Boolean; override; 28 | function GetDescription() : string; override; 29 | public 30 | function IsUseable() : Boolean; override; 31 | end; 32 | 33 | function TDocumentInsight3Element.GetDescription: string; 34 | begin 35 | Result := 'Documentation Insight integrates into RAD Studio IDE to enable you ' + 36 | 'naturally browse and document source code. It also helps you to produce ' + 37 | 'professional API documentation files and deliver to your customers.' + 38 | System.sLineBreak + System.sLineBreak + 39 | 'http://www.devjetsoftware.com/products/documentation-insight/'; 40 | end; 41 | 42 | function TDocumentInsight3Element.GetName: string; 43 | begin 44 | Result := 'Document Insight 3'; 45 | end; 46 | 47 | function TDocumentInsight3Element.IsUseable: Boolean; 48 | begin 49 | Result := CheckForExpertDLL('Documentation Insight'); 50 | end; 51 | 52 | function TDocumentInsight3Element.IsVersionAllowed(const AVSFixedFileInfo: TVSFixedFileInfo): Boolean; 53 | begin 54 | Result := (HiWord(AVSFixedFileInfo.dwFileVersionMS) = 3) and 55 | (LoWord(AVSFixedFileInfo.dwFileVersionMS) = 1); 56 | end; 57 | 58 | procedure TDocumentInsight3Element.PopulateShortCuts; 59 | var 60 | LAppDataDirectory: string; 61 | LIniFileName: string; 62 | LShortCutDecoder : TIniDecoder; 63 | begin 64 | if not RepositoryFactory().SystemRepository.GetAppDataDirectory(LAppDataDirectory) then 65 | Exit; 66 | 67 | LShortCutDecoder := function(const AIniFileRepository : IIniFileRepository; const ASectionKey : string; const AKey : string) : TShortCut 68 | var 69 | LHotKeyString: string; 70 | begin 71 | LHotKeyString := AIniFileRepository.ReadString(ASectionKey, AKey, ''); 72 | Result := RepositoryFactory().SystemRepository().TextToShortCut(LHotKeyString); 73 | end; 74 | 75 | LIniFileName := LAppDataDirectory + 'DevJet\DocInsight\3.0\Settings.ini:HotKeys#'; 76 | 77 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 78 | .WithDetail('Documentation Inspector') 79 | .WithDescription('Documentation -> Documentation Inspector') 80 | .WithShortCut(SystemRepository().ShortCut(Ord('D'), [ssShift, ssCtrl])) 81 | .IsINIFile() 82 | .WithFIleName(LIniFileName) 83 | .WithSection('HotKeys') 84 | .WithKey('DocInspector') 85 | .WithDecoder(LShortCutDecoder) 86 | .Build(); 87 | 88 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 89 | .WithDetail('Documentation Explorer') 90 | .WithDescription('Documentation -> Documentation Explorer') 91 | .WithShortCut(SystemRepository().ShortCut(Ord('N'), [ssCtrl, ssAlt])) 92 | .IsINIFile() 93 | .WithFIleName(LIniFileName) 94 | .WithSection('HotKeys') 95 | .WithKey('DocExplorer') 96 | .WithDecoder(LShortCutDecoder) 97 | .Build(); 98 | 99 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 100 | .WithDetail('Fold Documentation') 101 | .WithDescription('Documentation -> Fold Documentation') 102 | .WithShortCut(SystemRepository().ShortCut(Ord('C'), [ssCtrl, ssAlt])) 103 | .IsINIFile() 104 | .WithFIleName(LIniFileName) 105 | .WithSection('HotKeys') 106 | .WithKey('FoldDocs') 107 | .WithDecoder(LShortCutDecoder) 108 | .Build(); 109 | 110 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 111 | .WithDetail('Unfold Documentation') 112 | .WithDescription('Documentation -> Unfold Documentation') 113 | .WithShortCut(SystemRepository().ShortCut(Ord('E'), [ssCtrl, ssAlt])) 114 | .IsINIFile() 115 | .WithFIleName(LIniFileName) 116 | .WithSection('HotKeys') 117 | .WithKey('UnfoldDocs') 118 | .WithDecoder(LShortCutDecoder) 119 | .Build(); 120 | end; 121 | 122 | initialization 123 | nick.shortcut.repository.ShortCut.GetShortCutRepository().Add(TDocumentInsight3Element); 124 | 125 | end. 126 | -------------------------------------------------------------------------------- /Source/Elements/ThirdParty/nick.shortcut.element.MMX11.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.element.MMX11; 2 | 3 | interface 4 | 5 | implementation 6 | 7 | uses 8 | nick.shortcut.repository.ShortCut, 9 | nick.shortcut.builder.ShortCutItem, 10 | nick.shortcut.element.MMX10, 11 | {$IFDEF VER220} 12 | Classes; 13 | {$ELSE} 14 | System.Classes; 15 | {$ENDIF} 16 | 17 | type 18 | TMMX11Element = class(TMMX10Element) 19 | protected 20 | function GetMmxHighVersion() : Integer; override; 21 | end; 22 | 23 | type 24 | TMMX111Element = class(TMMX11Element) 25 | protected 26 | function GetMmxLowVersion() : Integer; override; 27 | procedure GetShortCuts(const ARegistryKey: string); override; 28 | end; 29 | 30 | function TMMX11Element.GetMmxHighVersion: Integer; 31 | begin 32 | Result := 11; 33 | end; 34 | 35 | { TMMX111Element } 36 | 37 | function TMMX111Element.GetMmxLowVersion: Integer; 38 | begin 39 | Result := 1; 40 | end; 41 | 42 | procedure TMMX111Element.GetShortCuts(const ARegistryKey: string); 43 | begin 44 | inherited; 45 | 46 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 47 | .WithDetail('Reverse Lines') 48 | .WithDescription('MMX -> Text Tools -> Reverse Lines') 49 | .WithShortCut(scNone) 50 | .IsRegistry() 51 | .WithPath(ARegistryKey) 52 | .WithKey('MMXReverseLinesAction') 53 | .WithDecoder(ShortCutDecoder) 54 | .WithActiveState(True) 55 | .IsRegistry() 56 | .WithPath(ARegistryKey) 57 | .WithKey('Enabled') 58 | .WithDecoder(EnabledDecoder) 59 | .Build(); 60 | 61 | end; 62 | 63 | initialization 64 | nick.shortcut.repository.ShortCut.GetShortCutRepository().Add(TMMX11Element); 65 | nick.shortcut.repository.ShortCut.GetShortCutRepository().Add(TMMX111Element); 66 | 67 | end. 68 | 69 | -------------------------------------------------------------------------------- /Source/Elements/ThirdParty/nick.shortcut.element.OSRegisteredHotKeys.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.element.OSRegisteredHotKeys; 2 | 3 | interface 4 | 5 | implementation 6 | 7 | uses 8 | nick.shortcut.core.ShortCutItem, 9 | nick.shortcut.repository.ShortCut, 10 | nick.shortcut.core.ShortCutList, 11 | nick.shortcut.repository.ISystem, 12 | nick.shortcut.other.VirtualKeys, 13 | {$IFDEF VER220} 14 | Windows, 15 | Menus, 16 | Classes, 17 | SysUtils, 18 | Consts; 19 | {$ELSE} 20 | Winapi.Windows, 21 | Vcl.Menus, 22 | System.Classes, 23 | System.SysUtils, 24 | Vcl.Consts; 25 | {$ENDIF} 26 | 27 | type 28 | TOSRegisteredHotKeysElement = class(TShortCutList) 29 | private 30 | protected 31 | procedure PopulateShortCuts(); override; 32 | function GetName() : string; override; 33 | public 34 | function IsUseable() : Boolean; override; 35 | end; 36 | 37 | function TOSRegisteredHotKeysElement.GetName: string; 38 | begin 39 | Result := 'OS Registered Hot Keys'; 40 | end; 41 | 42 | function TOSRegisteredHotKeysElement.IsUseable: Boolean; 43 | begin 44 | Result := True; 45 | end; 46 | 47 | procedure TOSRegisteredHotKeysElement.PopulateShortCuts; 48 | var 49 | LAtom: Atom; 50 | LModifier: Integer; 51 | LShiftState: TShiftState; 52 | LShortCut: TShortcut; 53 | LShortCutText: string; 54 | LSystemRepository: ISystemRepository; 55 | LVirtualKeyDetail: TVirtualKeyDetail; 56 | begin 57 | LSystemRepository := RepositoryFactory().SystemRepository; 58 | 59 | LAtom := LSystemRepository.GlobalAddAtom(GetName()); 60 | try 61 | for LVirtualKeyDetail in TVirtualKeys do 62 | begin 63 | if ((LVirtualKeyDetail.CheckedBy * [TCheck.Elements]) = []) then 64 | Continue; 65 | 66 | for LModifier in TModifterCheckingOrder do 67 | begin 68 | if (LSystemRepository.IsHotKeyRegisteredByTheOperatingSystem(0, LAtom, LModifier, LVirtualKeyDetail.Value)) then 69 | begin 70 | LShiftState := LSystemRepository.ModifiersToShiftState(LModifier); 71 | 72 | {$IFDEF VER220} 73 | LShortCut := Menus.ShortCut(LVirtualKeyDetail.Value, LShiftState); 74 | {$ELSE} 75 | LShortCut := Vcl.Menus.ShortCut(LVirtualKeyDetail.Value, LShiftState); 76 | {$ENDIF} 77 | LShortCutText := ShortCutToText(LShortCut); 78 | if (trim(LShortCutText) = EmptyStr) then 79 | begin 80 | if ((LModifier and MOD_SHIFT) <> 0) then 81 | LShortCutText := LShortCutText + SmkcShift; 82 | if ((LModifier and MOD_CONTROL) <> 0) then 83 | LShortCutText := LShortCutText + SmkcCtrl; 84 | if ((LModifier and MOD_ALT) <> 0) then 85 | LShortCutText := LShortCutText + SmkcAlt; 86 | 87 | LShortCutText := LShortCutText + LVirtualKeyDetail.ConstantName; 88 | end; 89 | 90 | Add(NewShortCut(LShortCutText, LShortCut, scNone, LVirtualKeyDetail.Description)); 91 | end; 92 | end; 93 | end; 94 | finally 95 | LSystemRepository.GlobalDeleteAtom(LAtom); 96 | end; 97 | end; 98 | 99 | initialization 100 | nick.shortcut.repository.ShortCut.GetShortCutRepository().Add(TOSRegisteredHotKeysElement); 101 | 102 | end. 103 | 104 | -------------------------------------------------------------------------------- /Source/Elements/ThirdParty/nick.shortcut.element.ParnassusOUBookmarks.pas: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/NickRing/Delphi-Shortcut-Finder/41747b940e5687c84fa7f9955f51b2880cbc307a/Source/Elements/ThirdParty/nick.shortcut.element.ParnassusOUBookmarks.pas -------------------------------------------------------------------------------- /Source/Elements/ThirdParty/nick.shortcut.element.SmartInspect.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.element.SmartInspect; 2 | 3 | interface 4 | 5 | implementation 6 | 7 | uses 8 | nick.shortcut.repository.ShortCut, 9 | nick.shortcut.builder.IShortCutItem, 10 | nick.shortcut.builder.ShortCutItem, 11 | nick.shortcut.element.DLLExpertBase, 12 | {$IFDEF VER220} 13 | SysUtils, 14 | Classes, 15 | Windows; 16 | {$ELSE} 17 | System.SysUtils, 18 | Vcl.Menus, 19 | System.Classes, 20 | Winapi.Windows; 21 | {$ENDIF} 22 | 23 | type 24 | TSmartInspectElement = class(TDLLExpertBaseElement) 25 | private 26 | protected 27 | procedure PopulateShortCuts(); override; 28 | function GetName() : string; override; 29 | function IsVersionAllowed(const AVSFixedFileInfo : TVSFixedFileInfo) : Boolean; override; 30 | function GetDescription() : string; override; 31 | public 32 | function IsUseable() : Boolean; override; 33 | end; 34 | 35 | function TSmartInspectElement.GetDescription: string; 36 | begin 37 | Result := 'SmartInspect is an advanced .NET logging, Java logging and Delphi logging tool for ' + 38 | 'debugging and monitoring software applications.' + System.sLineBreak + System.sLineBreak + 39 | 'It helps you identify bugs, find solutions to user-reported issues and gives you a precise ' + 40 | 'picture of how your software performs in different environments.' + System.sLineBreak + System.sLineBreak + 41 | 'Whether you need logging in the development phase, on production systems or at customer sites, ' + 42 | 'SmartInspect is the perfect choice.' + System.sLineBreak + System.sLineBreak + 43 | 'http://www.gurock.com/smartinspect/'; 44 | end; 45 | 46 | function TSmartInspectElement.GetName: string; 47 | begin 48 | Result := 'Smart Inspect IDE Plug-in'; 49 | end; 50 | 51 | function TSmartInspectElement.IsUseable: Boolean; 52 | begin 53 | Result := CheckForExpertDLL('SmartInspect'); 54 | end; 55 | 56 | function TSmartInspectElement.IsVersionAllowed(const AVSFixedFileInfo: TVSFixedFileInfo): Boolean; 57 | begin 58 | Result := (HiWord(AVSFixedFileInfo.dwFileVersionMS) = 3) and 59 | (LoWord(AVSFixedFileInfo.dwFileVersionMS) = 3) and 60 | (HiWord(AVSFixedFileInfo.dwFileVersionLS) = 7) (*and 61 | (LoWord(AVSFixedFileInfo.dwFileVersionLS) = 150)*); 62 | end; 63 | 64 | procedure TSmartInspectElement.PopulateShortCuts; 65 | begin 66 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 67 | .WithDetail('Instrument Unit') 68 | .WithDescription('Opens a dialog and allows you to select which methods should be instrumented or uninstrumented.' + 69 | System.sLineBreak + 'SmartInspect -> Instrument Unit...') 70 | .WithShortCut(SystemRepository().ShortCut(Ord('I'), [ssCtrl, ssAlt])) 71 | .Build; 72 | 73 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 74 | .WithDetail('Instrument Current Method') 75 | .WithDescription('Instruments the method where your text cursor is positioned.' + 76 | System.sLineBreak + 'SmartInspect -> Instrument Current Method') 77 | .WithShortCut(SystemRepository().ShortCut(Ord('N'), [ssCtrl, ssAlt])) 78 | .Build; 79 | 80 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 81 | .WithDetail('Uninstrument Current Method') 82 | .WithDescription('Uninstruments the method where your text cursor is positioned.' + 83 | System.sLineBreak + 'SmartInspect -> Uninstrument Current Method') 84 | .WithShortCut(SystemRepository().ShortCut(Ord('J'), [ssCtrl, ssAlt])) 85 | .Build; 86 | 87 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 88 | .WithDetail('Instrument All Methods') 89 | .WithDescription('Instruments all methods and functions in the current unit.' + 90 | System.sLineBreak + 'SmartInspect -> Instrument All Methods') 91 | .WithShortCut(SystemRepository().ShortCut(Ord('A'), [ssCtrl, ssAlt])) 92 | .Build; 93 | 94 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 95 | .WithDetail('Uninstrument All Methods') 96 | .WithDescription('Uninstruments all methods and functions in the current unit.' + 97 | System.sLineBreak + 'SmartInspect -> Uninstrument All Methods') 98 | .WithShortCut(SystemRepository().ShortCut(Ord('X'), [ssCtrl, ssAlt])) 99 | .Build; 100 | 101 | nick.shortcut.builder.ShortCutItem.NewShortCutItemBuilder(Self) 102 | .WithDetail('Update All Methods') 103 | .WithDescription('Updates the method names in the Enter- and LeaveMethod calls of ' + 104 | 'all instrumented methods and functions in the current unit.' + 105 | System.sLineBreak + 'SmartInspect -> Update All Methods') 106 | .WithShortCut(SystemRepository().ShortCut(Ord('U'), [ssCtrl, ssAlt])) 107 | .Build; 108 | end; 109 | 110 | initialization 111 | nick.shortcut.repository.ShortCut.GetShortCutRepository().Add(TSmartInspectElement); 112 | 113 | end. 114 | 115 | -------------------------------------------------------------------------------- /Source/Exports/nick.shortcut.export.Csv.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.export.Csv; 2 | 3 | interface 4 | 5 | implementation 6 | 7 | uses 8 | nick.shortcut.repository.ShortcutExport, 9 | nick.shortcut.core.ShortcutExport, 10 | nick.shortcut.other.VirtualKeys, 11 | {$IFDEF VER220} 12 | SysUtils, 13 | Classes, 14 | Forms; 15 | {$ELSE} 16 | System.SysUtils, 17 | System.Classes, 18 | Vcl.Forms; 19 | {$ENDIF} 20 | 21 | type 22 | TCsvShortcutExport = class(TShortcutExport) 23 | private 24 | type 25 | TCsvShortcutData = class(TObject) 26 | private 27 | FStreamWriter : TStreamWriter; 28 | FRowDetails : TStrings; 29 | FCellDetails : TStrings; 30 | public 31 | constructor Create(const AFileName : string); 32 | destructor Destroy; override; 33 | 34 | property CellDetails : TStrings read FCellDetails; 35 | property RowDetails : TStrings read FRowDetails; 36 | end; 37 | private 38 | function GetUserData(const AExportData : Pointer) : TCsvShortcutData; 39 | public 40 | class function ExportName() : string; override; 41 | 42 | function FileExtension : string; override; 43 | 44 | function InitialiseExport(const AFileName : string; out AExportData : Pointer) : Boolean; override; 45 | procedure FinaliseExport(const AExportData : Pointer); override; 46 | 47 | procedure StartHeader(const AExportData : Pointer); override; 48 | procedure AddHeader(const AExportData : Pointer; const AHeader : string); override; 49 | procedure EndHeader(const AExportData : Pointer); override; 50 | 51 | procedure StartKey(const AExportData : Pointer; const AVirtualKeyDetail: TVirtualKeyDetail); override; 52 | procedure EndKey(const AExportData : Pointer); override; 53 | 54 | procedure StartKeyWithModifier(const AExportData : Pointer); override; 55 | procedure AddKeyWithModifierDetails(const AExportData : Pointer; const ADetails : string; const ADetailsType : TDetailsType); override; 56 | procedure EndKeyWithModifier(const AExportData : Pointer); override; 57 | end; 58 | 59 | { TCsvShortcutExport } 60 | 61 | class function TCsvShortcutExport.ExportName: string; 62 | begin 63 | Result := 'CSV'; 64 | end; 65 | 66 | function TCsvShortcutExport.InitialiseExport(const AFileName : string; out AExportData: Pointer): Boolean; 67 | begin 68 | Result := False; 69 | try 70 | AExportData := TCsvShortcutData.Create(AFileName); 71 | Result := True; 72 | except 73 | TCsvShortcutData(AExportData).Free; 74 | end; 75 | end; 76 | 77 | function TCsvShortcutExport.FileExtension: string; 78 | begin 79 | Result := 'csv'; 80 | end; 81 | 82 | procedure TCsvShortcutExport.FinaliseExport(const AExportData: Pointer); 83 | begin 84 | GetUserData(AExportData).Free; 85 | end; 86 | 87 | function TCsvShortcutExport.GetUserData(const AExportData: Pointer): TCsvShortcutData; 88 | begin 89 | Result := (TObject(AExportData) as TCsvShortcutData); 90 | end; 91 | 92 | procedure TCsvShortcutExport.StartHeader(const AExportData: Pointer); 93 | begin 94 | GetUserData(AExportData).RowDetails.Clear; 95 | end; 96 | 97 | procedure TCsvShortcutExport.AddHeader(const AExportData: Pointer; const AHeader: string); 98 | begin 99 | GetUserData(AExportData).RowDetails.Add(AHeader); 100 | end; 101 | 102 | procedure TCsvShortcutExport.EndHeader(const AExportData: Pointer); 103 | begin 104 | EndKey(AExportData); 105 | end; 106 | 107 | procedure TCsvShortcutExport.StartKey(const AExportData: Pointer; const AVirtualKeyDetail: TVirtualKeyDetail); 108 | var 109 | LExportData: TCsvShortcutData; 110 | begin 111 | LExportData := GetUserData(AExportData); 112 | LExportData.RowDetails.Clear; 113 | 114 | if (AVirtualKeyDetail.ConstantName <> '') then 115 | LExportData.RowDetails.Add(AVirtualKeyDetail.ConstantName) 116 | else 117 | LExportData.RowDetails.Add('$' + IntToHex(AVirtualKeyDetail.Value, 2)); 118 | 119 | LExportData.RowDetails.Add(AVirtualKeyDetail.Description); 120 | end; 121 | 122 | procedure TCsvShortcutExport.EndKey(const AExportData: Pointer); 123 | var 124 | LExportData: TCsvShortcutData; 125 | begin 126 | LExportData := GetUserData(AExportData); 127 | LExportData.FStreamWriter.WriteLine(LExportData.RowDetails.CommaText); 128 | end; 129 | 130 | procedure TCsvShortcutExport.StartKeyWithModifier(const AExportData: Pointer); 131 | begin 132 | GetUserData(AExportData).CellDetails.Clear; 133 | end; 134 | 135 | procedure TCsvShortcutExport.AddKeyWithModifierDetails(const AExportData: Pointer; const ADetails: string; const ADetailsType: TDetailsType); 136 | begin 137 | GetUserData(AExportData).CellDetails.Add(ADetails) 138 | end; 139 | 140 | procedure TCsvShortcutExport.EndKeyWithModifier(const AExportData: Pointer); 141 | var 142 | LExportData: TCsvShortcutData; 143 | begin 144 | LExportData := GetUserData(AExportData); 145 | LExportData.RowDetails.Add(LExportData.CellDetails.CommaText); 146 | end; 147 | 148 | { TCsvShortcutExport.TUserData } 149 | 150 | constructor TCsvShortcutExport.TCsvShortcutData.Create(const AFileName: string); 151 | begin 152 | inherited Create; 153 | 154 | FStreamWriter := TStreamWriter.Create(AFileName, False, TEncoding.Default, 4096); 155 | FRowDetails := TStringList.Create; 156 | FCellDetails := TStringList.Create; 157 | end; 158 | 159 | destructor TCsvShortcutExport.TCsvShortcutData.Destroy; 160 | begin 161 | FRowDetails.Free; 162 | FCellDetails.Free; 163 | FStreamWriter.Free; 164 | inherited; 165 | end; 166 | 167 | initialization 168 | GetShortcutExportRepository().Add(TCsvShortcutExport); 169 | 170 | end. 171 | 172 | -------------------------------------------------------------------------------- /Source/Frames/nick.shortcut.frame.Base.dfm: -------------------------------------------------------------------------------- 1 | object BaseFrame: TBaseFrame 2 | Left = 0 3 | Top = 0 4 | Width = 320 5 | Height = 240 6 | TabOrder = 0 7 | end 8 | -------------------------------------------------------------------------------- /Source/Frames/nick.shortcut.frame.Base.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.frame.Base; 2 | 3 | interface 4 | 5 | uses 6 | {$IFDEF VER220} 7 | Classes, 8 | Controls, 9 | Forms, 10 | {$ELSE} 11 | System.Classes, 12 | Vcl.Controls, 13 | Vcl.Forms, 14 | {$ENDIF} 15 | nick.shortcut.factory.IRepository, 16 | nick.shortcut.repository.IRegistry; 17 | 18 | type 19 | TBaseFrame = class(TFrame) 20 | private 21 | FRepositoryFactory : IRepositoryFactory; 22 | protected 23 | procedure ReadRegistrySettings(const ARegistryRepository : IRegistryRepository); virtual; 24 | procedure WriteRegistrySettings(const ARegistryRepository : IRegistryRepository); virtual; 25 | 26 | property RepositoryFactory : IRepositoryFactory read FRepositoryFactory; 27 | public 28 | constructor Create(const AOwner: TComponent; const ARepositoryFactory : IRepositoryFactory); reintroduce; virtual; 29 | destructor Destroy; override; 30 | end; 31 | 32 | implementation 33 | 34 | uses 35 | {$IFDEF VER220} 36 | Windows; 37 | {$ELSE} 38 | Winapi.Windows; 39 | {$ENDIF} 40 | 41 | {$R *.dfm} 42 | 43 | { TBaseFrame } 44 | 45 | constructor TBaseFrame.Create(const AOwner: TComponent; const ARepositoryFactory : IRepositoryFactory); 46 | var 47 | LBaseRegistryKey: string; 48 | LRegistryRepository: IRegistryRepository; 49 | begin 50 | inherited Create(AOwner); 51 | 52 | FRepositoryFactory := ARepositoryFactory; 53 | 54 | if FRepositoryFactory.ToolsApiRepository().GetBaseRegistryKey(LBaseRegistryKey) then 55 | begin 56 | LRegistryRepository := FRepositoryFactory.RegistryRepository(); 57 | if not LRegistryRepository.OpenKeyReadOnly(LBaseRegistryKey + '\nick.toolsapi\Shortcuts\' + Self.ClassName) then 58 | begin 59 | LRegistryRepository := nil; 60 | exit; 61 | end; 62 | 63 | ReadRegistrySettings(LRegistryRepository) 64 | end; 65 | end; 66 | 67 | destructor TBaseFrame.Destroy; 68 | var 69 | LBaseRegistryKey: string; 70 | LRegistryRepository: IRegistryRepository; 71 | begin 72 | if FRepositoryFactory.ToolsApiRepository().GetBaseRegistryKey(LBaseRegistryKey) then 73 | begin 74 | LRegistryRepository := FRepositoryFactory.RegistryRepository(KEY_ALL_ACCESS); 75 | if not LRegistryRepository.OpenKey(LBaseRegistryKey + '\nick.toolsapi\Shortcuts\' + Self.ClassName, True) then 76 | begin 77 | LRegistryRepository := nil; 78 | exit; 79 | end; 80 | 81 | WriteRegistrySettings(LRegistryRepository) 82 | end; 83 | 84 | inherited Destroy; 85 | end; 86 | 87 | procedure TBaseFrame.ReadRegistrySettings(const ARegistryRepository: IRegistryRepository); 88 | begin 89 | 90 | end; 91 | 92 | procedure TBaseFrame.WriteRegistrySettings(const ARegistryRepository: IRegistryRepository); 93 | begin 94 | 95 | end; 96 | 97 | end. 98 | 99 | -------------------------------------------------------------------------------- /Source/Frames/nick.shortcut.frame.KnownShortcuts.dfm: -------------------------------------------------------------------------------- 1 | inherited frmKnownShortcuts: TfrmKnownShortcuts 2 | Width = 415 3 | Height = 437 4 | ExplicitWidth = 415 5 | ExplicitHeight = 437 6 | object splDescription: TSplitter 7 | Left = 0 8 | Top = 351 9 | Width = 415 10 | Height = 3 11 | Cursor = crVSplit 12 | Align = alBottom 13 | ExplicitLeft = -51 14 | ExplicitTop = 260 15 | ExplicitWidth = 466 16 | end 17 | object grpFiltering: TGroupBox 18 | Left = 0 19 | Top = 0 20 | Width = 415 21 | Height = 145 22 | Align = alTop 23 | Caption = ' Filtering : ' 24 | TabOrder = 0 25 | DesignSize = ( 26 | 415 27 | 145) 28 | object lblPrimary: TLabel 29 | Left = 8 30 | Top = 25 31 | Width = 43 32 | Height = 13 33 | Caption = '&Primary :' 34 | FocusControl = hkPrimary 35 | end 36 | object lblSecondary: TLabel 37 | Left = 8 38 | Top = 49 39 | Width = 58 40 | Height = 13 41 | Caption = '&Secondary :' 42 | FocusControl = hkSecondary 43 | end 44 | object lbDescription: TLabel 45 | Left = 8 46 | Top = 75 47 | Width = 60 48 | Height = 13 49 | Caption = '&Description :' 50 | FocusControl = edtDesc 51 | end 52 | object chkConficts: TCheckBox 53 | Left = 8 54 | Top = 115 55 | Width = 217 56 | Height = 17 57 | Alignment = taLeftJustify 58 | Caption = '&Filter out non-conflicting options' 59 | TabOrder = 6 60 | OnClick = chkConfictsClick 61 | end 62 | object hkPrimary: THotKey 63 | Left = 75 64 | Top = 23 65 | Width = 150 66 | Height = 19 67 | HotKey = 0 68 | InvalidKeys = [] 69 | Modifiers = [] 70 | TabOrder = 1 71 | OnChange = hkPrimaryChange 72 | end 73 | object hkSecondary: THotKey 74 | Left = 75 75 | Top = 48 76 | Width = 150 77 | Height = 19 78 | HotKey = 0 79 | InvalidKeys = [] 80 | Modifiers = [] 81 | TabOrder = 2 82 | OnChange = hkSecondaryChange 83 | end 84 | object edtDesc: TEdit 85 | Left = 75 86 | Top = 72 87 | Width = 382 88 | Height = 21 89 | TabOrder = 3 90 | OnChange = edtDescChange 91 | end 92 | object btnRescan: TButton 93 | Left = 516 94 | Top = 20 95 | Width = 75 96 | Height = 25 97 | Anchors = [akTop, akRight] 98 | Caption = '&Rescan' 99 | TabOrder = 0 100 | end 101 | object chkRegExp: TCheckBox 102 | Left = 75 103 | Top = 96 104 | Width = 113 105 | Height = 17 106 | Caption = 'Regular e&xpression' 107 | TabOrder = 4 108 | OnClick = chkRegExpClick 109 | end 110 | object chkCaseSensitive: TCheckBox 111 | Left = 212 112 | Top = 96 113 | Width = 97 114 | Height = 17 115 | Caption = '&Case sensitive' 116 | TabOrder = 5 117 | OnClick = chkCaseSensitiveClick 118 | end 119 | end 120 | object vtAssignments: TVirtualStringTree 121 | Left = 0 122 | Top = 145 123 | Width = 415 124 | Height = 206 125 | Align = alClient 126 | BorderWidth = 1 127 | Colors.UnfocusedColor = clMedGray 128 | Header.AutoSizeIndex = 0 129 | Header.Font.Charset = DEFAULT_CHARSET 130 | Header.Font.Color = clWindowText 131 | Header.Font.Height = -11 132 | Header.Font.Name = 'Tahoma' 133 | Header.Font.Style = [] 134 | Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoShowSortGlyphs, hoVisible, hoAutoSpring] 135 | HintMode = hmHint 136 | NodeDataSize = 0 137 | TabOrder = 1 138 | TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScrollOnExpand, toAutoSort, toAutoSpanColumns, toAutoTristateTracking, toAutoDeleteMovedNodes, toAutoChangeScale] 139 | TreeOptions.MiscOptions = [toAcceptOLEDrop, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning, toReadOnly] 140 | OnChange = vtAssignmentsChange 141 | OnFreeNode = vtAssignmentsFreeNode 142 | OnGetText = vtAssignmentsGetText 143 | OnGetHint = vtAssignmentsGetHint 144 | OnInitNode = vtAssignmentsInitNode 145 | Columns = < 146 | item 147 | Options = [coEnabled, coParentBidiMode, coParentColor, coResizable, coVisible, coAutoSpring, coSmartResize, coAllowFocus] 148 | Position = 0 149 | Width = 10 150 | WideText = 'Details' 151 | end 152 | item 153 | Options = [coEnabled, coParentBidiMode, coParentColor, coResizable, coVisible, coSmartResize, coAllowFocus] 154 | Position = 1 155 | Width = 150 156 | WideText = 'Primary' 157 | end 158 | item 159 | Options = [coEnabled, coParentBidiMode, coParentColor, coResizable, coVisible, coSmartResize, coAllowFocus] 160 | Position = 2 161 | Width = 150 162 | WideText = 'Secondary' 163 | end 164 | item 165 | Options = [coEnabled, coParentBidiMode, coParentColor, coResizable, coVisible, coSmartResize, coAllowFocus] 166 | Position = 3 167 | Width = 180 168 | WideText = 'Description' 169 | end> 170 | end 171 | object mmoExtraInfo: TRichEdit 172 | Left = 0 173 | Top = 354 174 | Width = 415 175 | Height = 83 176 | Align = alBottom 177 | Font.Charset = ANSI_CHARSET 178 | Font.Color = clWindowText 179 | Font.Height = -11 180 | Font.Name = 'Tahoma' 181 | Font.Style = [] 182 | ParentFont = False 183 | ReadOnly = True 184 | ScrollBars = ssVertical 185 | TabOrder = 2 186 | end 187 | end 188 | -------------------------------------------------------------------------------- /Source/Frames/nick.shortcut.frame.SearchRegisteredShortcuts.dfm: -------------------------------------------------------------------------------- 1 | inherited frmSearchRegisteredShortcuts: TfrmSearchRegisteredShortcuts 2 | Width = 404 3 | ParentFont = False 4 | OnResize = FrameResize 5 | ExplicitWidth = 404 6 | object vtShortCutModuleDetails: TVirtualStringTree 7 | Left = 0 8 | Top = 57 9 | Width = 404 10 | Height = 166 11 | Align = alClient 12 | Colors.UnfocusedColor = clMedGray 13 | Header.AutoSizeIndex = 0 14 | Header.Font.Charset = DEFAULT_CHARSET 15 | Header.Font.Color = clWindowText 16 | Header.Font.Height = -11 17 | Header.Font.Name = 'Tahoma' 18 | Header.Font.Style = [] 19 | Header.Options = [hoAutoResize, hoColumnResize, hoDblClickResize, hoShowSortGlyphs, hoVisible, hoAutoSpring] 20 | TabOrder = 1 21 | TreeOptions.AutoOptions = [toAutoDropExpand, toAutoScrollOnExpand, toAutoSort, toAutoSpanColumns, toAutoTristateTracking, toAutoDeleteMovedNodes, toAutoChangeScale] 22 | TreeOptions.MiscOptions = [toAcceptOLEDrop, toFullRepaintOnResize, toInitOnSave, toToggleOnDblClick, toWheelPanning, toReadOnly] 23 | OnGetText = vtShortCutModuleDetailsGetText 24 | Columns = < 25 | item 26 | Options = [coEnabled, coParentBidiMode, coParentColor, coResizable, coVisible, coAutoSpring, coSmartResize, coAllowFocus] 27 | Position = 0 28 | Width = 113 29 | WideText = 'Attribute' 30 | end 31 | item 32 | Options = [coEnabled, coParentBidiMode, coParentColor, coResizable, coVisible, coSmartResize, coAllowFocus] 33 | Position = 1 34 | Width = 287 35 | WideText = 'Value' 36 | end> 37 | end 38 | object pbProgressBar: TProgressBar 39 | Left = 0 40 | Top = 223 41 | Width = 404 42 | Height = 17 43 | Align = alBottom 44 | TabOrder = 2 45 | end 46 | object pnlTop: TPanel 47 | Left = 0 48 | Top = 0 49 | Width = 404 50 | Height = 57 51 | Align = alTop 52 | TabOrder = 0 53 | object grpAdvanceFiltering: TGroupBox 54 | Left = 1 55 | Top = 1 56 | Width = 196 57 | Height = 55 58 | Align = alLeft 59 | Caption = ' Advance Filtering ' 60 | TabOrder = 0 61 | object lblHotkey: TLabel 62 | Left = 8 63 | Top = 26 64 | Width = 41 65 | Height = 13 66 | Caption = '&Hotkey :' 67 | FocusControl = hkAdvance 68 | end 69 | object hkAdvance: THotKey 70 | Left = 61 71 | Top = 24 72 | Width = 121 73 | Height = 21 74 | HotKey = 0 75 | InvalidKeys = [] 76 | Modifiers = [] 77 | TabOrder = 0 78 | OnChange = hkAdvanceChange 79 | end 80 | end 81 | object grpExport: TGroupBox 82 | Left = 197 83 | Top = 1 84 | Width = 206 85 | Height = 55 86 | Align = alClient 87 | Caption = ' Export Known Hotkeys ' 88 | TabOrder = 1 89 | object cbbExports: TComboBox 90 | Left = 8 91 | Top = 23 92 | Width = 108 93 | Height = 21 94 | Style = csDropDownList 95 | TabOrder = 0 96 | OnChange = ActionListChange 97 | end 98 | object btnExport: TButton 99 | Left = 122 100 | Top = 21 101 | Width = 75 102 | Height = 25 103 | Action = actExport 104 | TabOrder = 1 105 | end 106 | end 107 | end 108 | object ActionList: TActionList 109 | Left = 80 110 | Top = 136 111 | object actExport: TAction 112 | Caption = '&Export' 113 | OnExecute = actExportExecute 114 | OnUpdate = actExportUpdate 115 | end 116 | end 117 | end 118 | -------------------------------------------------------------------------------- /Source/Frames/nick.shortcut.frame.SearchRegisteredShortcuts.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.frame.SearchRegisteredShortcuts; 2 | 3 | interface 4 | 5 | uses 6 | {$IFDEF VER220} 7 | SysUtils, 8 | Messages, 9 | StdCtrls, 10 | ComCtrls, 11 | Controls, 12 | Classes, 13 | Forms, 14 | ActnList, 15 | ExtCtrls, 16 | {$ELSE} 17 | System.SysUtils, 18 | Winapi.Messages, 19 | Vcl.StdCtrls, 20 | Vcl.ComCtrls, 21 | Vcl.Controls, 22 | System.Classes, 23 | Vcl.Forms, 24 | System.Actions, 25 | Vcl.ActnList, 26 | Vcl.ExtCtrls, 27 | {$ENDIF} 28 | ToolsApi, 29 | VirtualTrees, 30 | nick.shortcut.factory.IRepository, 31 | nick.shortcut.other.IFileVersionInformation, 32 | nick.shortcut.frame.Base, 33 | nick.shortcut.core.ShortcutExport, 34 | nick.shortcut.repository.IToolsApi, 35 | nick.shortcut.repository.IRegistry; 36 | 37 | type 38 | TfrmSearchRegisteredShortcuts = class(TBaseFrame) 39 | vtShortCutModuleDetails: TVirtualStringTree; 40 | ActionList: TActionList; 41 | actExport: TAction; 42 | pbProgressBar: TProgressBar; 43 | pnlTop: TPanel; 44 | grpAdvanceFiltering: TGroupBox; 45 | lblHotkey: TLabel; 46 | hkAdvance: THotKey; 47 | grpExport: TGroupBox; 48 | cbbExports: TComboBox; 49 | btnExport: TButton; 50 | procedure actExportExecute(Sender: TObject); 51 | procedure actExportUpdate(Sender: TObject); 52 | procedure ActionListChange(Sender: TObject); 53 | procedure FrameResize(Sender: TObject); 54 | procedure hkAdvanceChange(Sender: TObject); 55 | procedure vtShortCutModuleDetailsGetText(Sender: TBaseVirtualTree; 56 | Node: PVirtualNode; 57 | Column: TColumnIndex; 58 | TextType: TVSTTextType; 59 | var CellText: string); 60 | private 61 | FModuleDetails : TArray; 62 | FCurrentShortcutExport: IShortcutExport; 63 | 64 | procedure ModifyVirtualTree(const AProc : TProc); 65 | procedure FindShortCutInformation; 66 | protected 67 | procedure CMShowingChanged(var AMessage: TMessage); message CM_SHOWINGCHANGED; 68 | 69 | procedure ReadRegistrySettings(const ARegistryRepository : IRegistryRepository); override; 70 | procedure WriteRegistrySettings(const ARegistryRepository : IRegistryRepository); override; 71 | public 72 | constructor Create(const AOwner: TComponent; const ARepositoryFactory : IRepositoryFactory); reintroduce; 73 | end; 74 | 75 | implementation 76 | 77 | uses 78 | nick.shortcut.repository.ShortcutExport, 79 | nick.shortcut.repository.IIniFile, 80 | nick.shortcut.repository.System, 81 | nick.shortcut.repository.ISystem, 82 | nick.shortcut.other.VirtualKeys, 83 | {$IFDEF VER220} 84 | Windows, 85 | Menus, 86 | Dialogs, 87 | IOUtils; 88 | {$ELSE} 89 | Winapi.Windows, 90 | Vcl.Menus, 91 | Vcl.Dialogs, 92 | System.IOUtils; 93 | {$ENDIF} 94 | 95 | const 96 | cCOLUMN_REGISTRY_ENTRY_PREFIX = 'Column'; 97 | 98 | {$R *.dfm} 99 | 100 | constructor TfrmSearchRegisteredShortcuts.Create(const AOwner: TComponent; const ARepositoryFactory: IRepositoryFactory); 101 | begin 102 | inherited Create(AOwner, ARepositoryFactory); 103 | pbProgressBar.Visible := False; 104 | 105 | vtShortCutModuleDetails.TreeOptions.SelectionOptions := vtShortCutModuleDetails.TreeOptions.SelectionOptions + [toFullRowSelect]; 106 | vtShortCutModuleDetails.TreeOptions.PaintOptions := vtShortCutModuleDetails.TreeOptions.PaintOptions + [toUseExplorerTheme]; 107 | end; 108 | 109 | procedure TfrmSearchRegisteredShortcuts.CMShowingChanged(var AMessage: TMessage); 110 | var 111 | LShortcutExportClass : TShortcutExportClass; 112 | begin 113 | inherited; 114 | 115 | if Showing and (cbbExports.Items.Count = 0) then 116 | begin 117 | cbbExports.Items.BeginUpdate; 118 | try 119 | for LShortcutExportClass in GetShortcutExportRepository().ExportsList do 120 | cbbExports.Items.AddObject(LShortcutExportClass.ExportName, Pointer(LShortcutExportClass)); 121 | finally 122 | cbbExports.Items.EndUpdate; 123 | end; 124 | end; 125 | end; 126 | 127 | procedure TfrmSearchRegisteredShortcuts.actExportExecute(Sender: TObject); 128 | var 129 | LAtom: Atom; 130 | LVirtualKeyDetail: TVirtualKeyDetail; 131 | LExportData : Pointer; 132 | LFileName: string; 133 | LModifier: Integer; 134 | LSystemRepository: ISystemRepository; 135 | LModuleDetailArray : TArray; 136 | LShiftState: TShiftState; 137 | LShortCut: TShortCut; 138 | LToolsApiRepository: IToolsApiRepository; 139 | LModuleDetail: TModuleDetail; 140 | lp: Integer; 141 | begin 142 | LSystemRepository := RepositoryFactory.SystemRepository; 143 | LToolsApiRepository := RepositoryFactory.ToolsApiRepository(); 144 | 145 | if not Assigned(FCurrentShortcutExport) then 146 | Exit; 147 | 148 | if not LSystemRepository.GetSaveFileName(Self.Handle, FCurrentShortcutExport.FileExtension, LFileName) then 149 | Exit; 150 | 151 | if not FCurrentShortcutExport.InitialiseExport(LFileName, LExportData) then 152 | Exit; 153 | 154 | try 155 | LAtom := LSystemRepository.GlobalAddAtom(Self.ClassName); 156 | try 157 | pbProgressBar.Min := 0; 158 | pbProgressBar.Max := Length(TVirtualKeys); 159 | pbProgressBar.Position := pbProgressBar.Min; 160 | pbProgressBar.StepBy(1); 161 | pbProgressBar.Visible := True; 162 | 163 | FCurrentShortcutExport.StartHeader(LExportData); 164 | 165 | FCurrentShortcutExport.AddHeader(LExportData, 'Value/Constant'); 166 | FCurrentShortcutExport.AddHeader(LExportData, 'Description'); 167 | 168 | for LModifier in TModifterCheckingOrder do 169 | begin 170 | FCurrentShortcutExport.AddHeader(LExportData, LSystemRepository.ModifiersToString(LModifier)); 171 | end; 172 | 173 | FCurrentShortcutExport.EndHeader(LExportData); 174 | 175 | for lp := Low(TVirtualKeys) to High(TVirtualKeys) do 176 | try 177 | LVirtualKeyDetail := TVirtualKeys[lp]; 178 | 179 | if ((LVirtualKeyDetail.CheckedBy * [TCheck.Matrix]) = []) then 180 | Continue; 181 | 182 | FCurrentShortcutExport.StartKey(LExportData, LVirtualKeyDetail); 183 | 184 | for LModifier in TModifterCheckingOrder do 185 | begin 186 | FCurrentShortcutExport.StartKeyWithModifier(LExportData); 187 | 188 | if (LSystemRepository.IsHotKeyRegisteredByTheOperatingSystem(Self.Handle, LAtom, LModifier, LVirtualKeyDetail.Value)) then 189 | begin 190 | FCurrentShortcutExport.AddKeyWithModifierDetails(LExportData, 'OS Hotkey', TDetailsType.OperatingSystem); 191 | end; 192 | 193 | LShiftState := LSystemRepository.ModifiersToShiftState(LModifier); 194 | 195 | LShortCut := LSystemRepository.ShortCut(LVirtualKeyDetail.Value, LShiftState); 196 | LModuleDetailArray := LToolsApiRepository.GetKeyboardBindingsDetails(LShortCut); 197 | for LModuleDetail in LModuleDetailArray do 198 | begin 199 | FCurrentShortcutExport.AddKeyWithModifierDetails(LExportData, LModuleDetail.GetDisplayText(), TDetailsType.IDE); 200 | end; 201 | 202 | FCurrentShortcutExport.EndKeyWithModifier(LExportData); 203 | end; 204 | 205 | FCurrentShortcutExport.EndKey(LExportData); 206 | finally 207 | pbProgressBar.StepIt; 208 | pbProgressBar.Repaint; 209 | end; 210 | finally 211 | LSystemRepository.GlobalDeleteAtom(LAtom); 212 | pbProgressBar.Visible := False; 213 | end; 214 | finally 215 | FCurrentShortcutExport.FinaliseExport(LExportData); 216 | 217 | if LSystemRepository.FileExists(LFileName) then 218 | LSystemRepository.ShellExecute(Self.Handle, 'open', PChar(LFileName), nil, nil, SW_SHOWNORMAL); 219 | end; 220 | end; 221 | 222 | procedure TfrmSearchRegisteredShortcuts.actExportUpdate(Sender: TObject); 223 | begin 224 | actExport.Enabled := Assigned(FCurrentShortcutExport); 225 | end; 226 | 227 | procedure TfrmSearchRegisteredShortcuts.ActionListChange(Sender: TObject); 228 | var 229 | LShortcutExportClass : TShortcutExportClass; 230 | begin 231 | FCurrentShortcutExport := nil; 232 | 233 | if (cbbExports.ItemIndex < 0) then 234 | Exit; 235 | 236 | LShortcutExportClass := TShortcutExportClass(cbbExports.Items.Objects[cbbExports.ItemIndex]); 237 | 238 | if not Assigned(LShortcutExportClass) then 239 | Exit; 240 | 241 | FCurrentShortcutExport := LShortcutExportClass.Create(RepositoryFactory); 242 | end; 243 | 244 | procedure TfrmSearchRegisteredShortcuts.ReadRegistrySettings(const ARegistryRepository: IRegistryRepository); 245 | var 246 | lp: TColumnIndex; 247 | LVirtualTreeColumn: TVirtualTreeColumn; 248 | begin 249 | inherited; 250 | for lp := 0 to vtShortCutModuleDetails.Header.Columns.Count - 1 do 251 | begin 252 | LVirtualTreeColumn := vtShortCutModuleDetails.Header.Columns.Items[lp]; 253 | LVirtualTreeColumn.Width := ARegistryRepository.ReadInteger(cCOLUMN_REGISTRY_ENTRY_PREFIX + IntToStr(lp), LVirtualTreeColumn.Width); 254 | end; 255 | end; 256 | 257 | procedure TfrmSearchRegisteredShortcuts.WriteRegistrySettings(const ARegistryRepository: IRegistryRepository); 258 | var 259 | lp: TColumnIndex; 260 | LVirtualTreeColumn: TVirtualTreeColumn; 261 | begin 262 | inherited; 263 | for lp := 0 to vtShortCutModuleDetails.Header.Columns.Count - 1 do 264 | begin 265 | LVirtualTreeColumn := vtShortCutModuleDetails.Header.Columns.Items[lp]; 266 | ARegistryRepository.WriteInteger(cCOLUMN_REGISTRY_ENTRY_PREFIX + IntToStr(lp), LVirtualTreeColumn.Width); 267 | end; 268 | end; 269 | 270 | procedure TfrmSearchRegisteredShortcuts.ModifyVirtualTree(const AProc: TProc); 271 | begin 272 | vtShortCutModuleDetails.TreeOptions.MiscOptions := vtShortCutModuleDetails.TreeOptions.MiscOptions - [toReadOnly]; 273 | try 274 | AProc(); 275 | finally 276 | vtShortCutModuleDetails.TreeOptions.MiscOptions := vtShortCutModuleDetails.TreeOptions.MiscOptions + [toReadOnly]; 277 | end; 278 | end; 279 | 280 | procedure TfrmSearchRegisteredShortcuts.hkAdvanceChange(Sender: TObject); 281 | begin 282 | FindShortCutInformation(); 283 | end; 284 | 285 | procedure TfrmSearchRegisteredShortcuts.FindShortCutInformation(); 286 | begin 287 | FModuleDetails := RepositoryFactory.ToolsApiRepository().GetKeyboardBindingsDetails(hkAdvance.HotKey); 288 | 289 | ModifyVirtualTree(procedure 290 | begin 291 | vtShortCutModuleDetails.RootNodeCount := 0; 292 | vtShortCutModuleDetails.RootNodeCount := Length(FModuleDetails); 293 | end); 294 | end; 295 | 296 | procedure TfrmSearchRegisteredShortcuts.FrameResize(Sender: TObject); 297 | begin 298 | grpAdvanceFiltering.Width := grpAdvanceFiltering.Parent.Width shr 1; 299 | end; 300 | 301 | procedure TfrmSearchRegisteredShortcuts.vtShortCutModuleDetailsGetText(Sender: TBaseVirtualTree; 302 | Node: PVirtualNode; 303 | Column: TColumnIndex; 304 | TextType: TVSTTextType; 305 | var CellText: string); 306 | var 307 | LKeyBindingRec: TKeyBindingRec; 308 | LModuleDetail : TModuleDetail; 309 | begin 310 | CellText := ''; 311 | 312 | if (not Assigned(Node.Parent)) or (Node.Parent = Sender.RootNode) then 313 | begin 314 | if (Column <> 0) then 315 | Exit; 316 | 317 | CellText := FModuleDetails[Node.Index].GetDisplayText(); 318 | 319 | ModifyVirtualTree(procedure 320 | var 321 | LCount : Integer; 322 | begin 323 | LCount := 4; 324 | if (FModuleDetails[Node.Index].FileVersionInformation.HasErrored) or 325 | (FModuleDetails[Node.Index].FileVersionInformation.Count = 0) then 326 | LCount := 3; 327 | 328 | Sender.ChildCount[Node] := LCount; 329 | end); 330 | Exit; 331 | end; 332 | 333 | if (Assigned(Node.Parent.Parent) and (Node.Parent.Parent <> Sender.RootNode)) then 334 | begin 335 | // Sub-items.. 336 | LModuleDetail := FModuleDetails[Node.Parent.Parent.Index]; 337 | LKeyBindingRec := LModuleDetail.KeyBindingRec; 338 | 339 | case Node.Parent.Index of 340 | 2 : 341 | case Column of 342 | 0 : 343 | case Node.Index of 344 | 0 : CellText := 'KeyProc'; 345 | 1 : CellText := 'Context'; 346 | 2 : CellText := 'Next'; 347 | 3 : CellText := 'Reserved'; 348 | end; 349 | 1 : 350 | case Node.Index of 351 | 0 : CellText := Format('$%p (Code: $%p, Data: $%p)', [@LKeyBindingRec.KeyProc, TMethod(LKeyBindingRec.KeyProc).Code, TMethod(LKeyBindingRec.KeyProc).Data]); 352 | 1 : CellText := Format('$%p', [LKeyBindingRec.Context]); 353 | 2 : CellText := Format('$%0:.8x (%0:d)', [LKeyBindingRec.Next]); 354 | 3 : CellText := Format('$%0:.8x (%0:d)', [LKeyBindingRec.Reserved]); 355 | end; 356 | end; 357 | 3 : 358 | case Column of 359 | 0 : CellText := LModuleDetail.FileVersionInformation.FieldName[Node.Index]; 360 | 1 : CellText := LModuleDetail.FileVersionInformation.FieldValue[Node.Index]; 361 | end; 362 | end; 363 | 364 | Exit; 365 | end; 366 | 367 | LModuleDetail := FModuleDetails[Node.Parent.Index]; 368 | 369 | case Column of 370 | 0 : 371 | case Node.Index of 372 | 0 : CellText := 'Module'; 373 | 1 : CellText := 'Path'; 374 | 2 : CellText := 'Advance'; 375 | 3 : CellText := 'File Information'; 376 | end; 377 | 1 : 378 | case Node.Index of 379 | 0 : CellText := LModuleDetail.Module; 380 | 1 : CellText := LModuleDetail.Path; 381 | 2 : ModifyVirtualTree(procedure 382 | begin 383 | Sender.ChildCount[Node] := 4; 384 | end); 385 | 3 : ModifyVirtualTree(procedure 386 | begin 387 | Sender.ChildCount[Node] := LModuleDetail.FileVersionInformation.Count; 388 | end); 389 | end; 390 | end; 391 | end; 392 | 393 | end. 394 | 395 | 396 | -------------------------------------------------------------------------------- /Source/Frames/nick.shortcut.frame.ShortCutKeyAllocation.dfm: -------------------------------------------------------------------------------- 1 | inherited frmShortcutKeyAllocation: TfrmShortcutKeyAllocation 2 | Width = 435 3 | Height = 323 4 | ParentFont = False 5 | ParentShowHint = False 6 | ShowHint = True 7 | ExplicitWidth = 435 8 | ExplicitHeight = 323 9 | object pgc1: TPageControl 10 | Left = 0 11 | Top = 0 12 | Width = 435 13 | Height = 323 14 | ActivePage = tsSearchRegisteredShortcuts 15 | Align = alClient 16 | TabOrder = 0 17 | object tsKnownShortcuts: TTabSheet 18 | Caption = '&Known Shortcuts' 19 | ExplicitLeft = 0 20 | ExplicitTop = 0 21 | ExplicitWidth = 0 22 | ExplicitHeight = 0 23 | end 24 | object tsSearchRegisteredShortcuts: TTabSheet 25 | Caption = '&Search Registered Shortcuts' 26 | ImageIndex = 1 27 | ExplicitLeft = 0 28 | ExplicitTop = 0 29 | ExplicitWidth = 0 30 | ExplicitHeight = 0 31 | end 32 | end 33 | end 34 | -------------------------------------------------------------------------------- /Source/Frames/nick.shortcut.frame.ShortCutKeyAllocation.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.frame.ShortCutKeyAllocation; 2 | 3 | interface 4 | 5 | uses 6 | {$IFDEF VER220} 7 | ComCtrls, 8 | Controls, 9 | Classes, 10 | Forms, 11 | {$ELSE} 12 | Vcl.ComCtrls, 13 | Vcl.Controls, 14 | System.Classes, 15 | Vcl.Forms, 16 | {$ENDIF} 17 | nick.shortcut.factory.IRepository, 18 | nick.shortcut.repository.IRegistry, 19 | nick.shortcut.frame.Base; 20 | 21 | type 22 | TfrmShortCutKeyAllocation = class(TBaseFrame) 23 | pgc1: TPageControl; 24 | tsKnownShortcuts: TTabSheet; 25 | tsSearchRegisteredShortcuts: TTabSheet; 26 | protected 27 | procedure ReadRegistrySettings(const ARegistryRepository : IRegistryRepository); override; 28 | procedure WriteRegistrySettings(const ARegistryRepository : IRegistryRepository); override; 29 | public 30 | constructor Create(const AOwner: TComponent; const ARepositoryFactory : IRepositoryFactory); reintroduce; 31 | end; 32 | 33 | implementation 34 | 35 | uses 36 | nick.shortcut.frame.KnownShortcuts, 37 | nick.shortcut.frame.SearchRegisteredShortcuts, 38 | nick.shortcut.repository.ShortCut, 39 | nick.shortcut.repository.ShortcutExport; 40 | 41 | const 42 | cHEIGHT_REGISTRY_ENTRY = 'Height'; 43 | cWIDTH_REGISTRY_ENTRY = 'Width'; 44 | 45 | {$R *.dfm} 46 | 47 | { TfrmShortCutKeyAllocation } 48 | 49 | constructor TfrmShortCutKeyAllocation.Create(const AOwner: TComponent; const ARepositoryFactory : IRepositoryFactory); 50 | var 51 | LFrame : TFrame; 52 | begin 53 | inherited Create(AOwner, ARepositoryFactory); 54 | 55 | LFrame := TfrmKnownShortcuts.Create(Self, ARepositoryFactory, nick.shortcut.repository.ShortCut.GetShortCutRepository()); 56 | LFrame.Align := alClient; 57 | LFrame.Parent := tsKnownShortcuts; 58 | LFrame.Visible := True; 59 | 60 | LFrame := TfrmSearchRegisteredShortcuts.Create(Self, ARepositoryFactory); 61 | LFrame.Align := alClient; 62 | LFrame.Parent := tsSearchRegisteredShortcuts; 63 | LFrame.Visible := True; 64 | 65 | // LFrame := TfrmRegisteredShortcuts.Create(Self, ARepositoryFactory); 66 | // LFrame.Align := alClient; 67 | // LFrame.Parent := tsRegisteredShortcuts; 68 | // LFrame.Visible := True; 69 | // 70 | // tsRegisteredShortcuts.TabVisible := (GetShortcutExportRepository().Count <> 0); 71 | 72 | pgc1.ActivePage := tsKnownShortcuts; 73 | end; 74 | 75 | procedure TfrmShortCutKeyAllocation.ReadRegistrySettings(const ARegistryRepository: IRegistryRepository); 76 | begin 77 | inherited; 78 | Width := ARegistryRepository.ReadInteger(cWIDTH_REGISTRY_ENTRY, Self.Width); 79 | Height := ARegistryRepository.ReadInteger(cHEIGHT_REGISTRY_ENTRY, Self.Height); 80 | end; 81 | 82 | procedure TfrmShortCutKeyAllocation.WriteRegistrySettings(const ARegistryRepository: IRegistryRepository); 83 | begin 84 | inherited; 85 | ARegistryRepository.WriteInteger(cWIDTH_REGISTRY_ENTRY, Self.Width); 86 | ARegistryRepository.WriteInteger(cHEIGHT_REGISTRY_ENTRY, Self.Height); 87 | end; 88 | 89 | end. 90 | 91 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.factory.IRepository.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.factory.IRepository; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.repository.IIniFile, 7 | nick.shortcut.repository.IRegistry, 8 | nick.shortcut.repository.ISystem, 9 | nick.shortcut.repository.IToolsApi, 10 | nick.shortcut.repository.IXmlFile; 11 | 12 | type 13 | IRepositoryFactory = interface 14 | ['{DDE31772-7AF9-4CFF-A6CE-7D1082D8C6B6}'] 15 | function IniFileRepository() : IIniFileRepository; 16 | function RegistryRepository() : IRegistryRepository; overload; 17 | function RegistryRepository(const AAccess: LongWord) : IRegistryRepository; overload; 18 | function SystemRepository() : ISystemRepository; 19 | function ToolsApiRepository() : IToolsApiRepository; 20 | function XmlFileRepository() : IXmlFileRepository; 21 | end; 22 | 23 | implementation 24 | 25 | end. 26 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.factory.Repository.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.factory.Repository; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.factory.IRepository, 7 | nick.shortcut.repository.IIniFile, 8 | nick.shortcut.repository.IRegistry, 9 | nick.shortcut.repository.ISystem, 10 | nick.shortcut.repository.IToolsApi, 11 | nick.shortcut.repository.IXmlFile; 12 | 13 | type 14 | TRepositoryFactory = class(TInterfacedObject, IRepositoryFactory) 15 | public 16 | class function New() : IRepositoryFactory; 17 | 18 | function IniFileRepository() : IIniFileRepository; 19 | function RegistryRepository() : IRegistryRepository; overload; 20 | function RegistryRepository(const AAccess: LongWord) : IRegistryRepository; overload; 21 | function SystemRepository() : ISystemRepository; 22 | function ToolsApiRepository() : IToolsApiRepository; 23 | function XmlFileRepository() : IXmlFileRepository; 24 | end; 25 | 26 | implementation 27 | 28 | uses 29 | nick.shortcut.repository.System, 30 | nick.shortcut.repository.ToolsApi, 31 | nick.shortcut.repository.Registry, 32 | nick.shortcut.repository.IniFile, 33 | nick.shortcut.repository.XmlFile, 34 | {$IFDEF VER220} 35 | Windows; 36 | {$ELSE} 37 | Winapi.Windows; 38 | {$ENDIF} 39 | 40 | function TRepositoryFactory.IniFileRepository: IIniFileRepository; 41 | begin 42 | Result := TIniFileRepository.Create 43 | end; 44 | 45 | class function TRepositoryFactory.New: IRepositoryFactory; 46 | begin 47 | Result := TRepositoryFactory.Create(); 48 | end; 49 | 50 | function TRepositoryFactory.RegistryRepository(const AAccess: LongWord): IRegistryRepository; 51 | begin 52 | Result := TRegistryRepository.Create(AAccess); 53 | end; 54 | 55 | function TRepositoryFactory.RegistryRepository: IRegistryRepository; 56 | begin 57 | Result := RegistryRepository(KEY_READ); 58 | end; 59 | 60 | function TRepositoryFactory.SystemRepository: ISystemRepository; 61 | begin 62 | Result := TSystemRepository.Create; 63 | end; 64 | 65 | function TRepositoryFactory.ToolsApiRepository: IToolsApiRepository; 66 | begin 67 | Result := TToolsApiRepository.Create(RegistryRepository(), SystemRepository()); 68 | end; 69 | 70 | function TRepositoryFactory.XmlFileRepository: IXmlFileRepository; 71 | begin 72 | Result := TXmlFileRepository.Create 73 | end; 74 | 75 | end. 76 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.other.FileVersionInformation.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.other.FileVersionInformation; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.other.IFileVersionInformation, 7 | nick.shortcut.repository.ISystem, 8 | {$IFDEF VER220} 9 | Generics.Collections, 10 | Windows; 11 | {$ELSE} 12 | System.Generics.Collections, 13 | Winapi.Windows; 14 | {$ENDIF} 15 | 16 | type 17 | TFileVersionInformation = class(TInterfacedObject, IFileVersionInformation) 18 | private type 19 | TVersionInformationDetail = record 20 | DisplayName : string; 21 | Field : string; 22 | end; 23 | private const 24 | // http://msdn.microsoft.com/en-us/library/windows/desktop/aa381058(v=vs.85).aspx 25 | TVersionInformationDetails : array[TVersionInformation] of string =( 26 | 'ERROR:', 27 | 'Author', 28 | 'Comments', 29 | 'Company Name', 30 | 'File Description', 31 | 'File Version', 32 | 'Internal Name', 33 | 'Legal Copyright', 34 | 'Legal TradeMarks', 35 | 'Original Filename', 36 | 'Private Build', 37 | 'Product Name', 38 | 'Product Version', 39 | 'Special Build'); 40 | private 41 | FFileName: string; 42 | FSystemRepository : ISystemRepository; 43 | FValuesList : TList>; 44 | FValuesDictionary : TDictionary; 45 | FVersionFixedFileInfo : PVSFixedFileInfo; 46 | procedure PopulateVersionInformation; 47 | function GetCount: Cardinal; 48 | function GetFieldName(const AIndex: Integer): string; 49 | function GetFieldValue(const AIndex: Integer): string; overload; 50 | function GetFieldString(const AIndex: TVersionInformation): string; overload; 51 | procedure SyncLists(Sender: TObject; const Item: TPair; Action: TCollectionNotification); 52 | public 53 | constructor Create(const AFileName : string; const ASystemRepository : ISystemRepository); 54 | destructor Destroy; override; 55 | 56 | function HasErrored : Boolean; 57 | function GetFileVersion : TVSFixedFileInfo; 58 | 59 | property Count : Cardinal read GetCount; 60 | property FieldName [const AIndex : Integer] : string read GetFieldName; 61 | property FieldValue [const AIndex : Integer] : string read GetFieldValue; 62 | property FieldString [const AIndex : TVersionInformation] : string read GetFieldString; 63 | end; 64 | 65 | implementation 66 | 67 | uses 68 | {$IFDEF VER220} 69 | SysUtils, 70 | TypInfo; 71 | {$ELSE} 72 | System.SysUtils, 73 | System.TypInfo; 74 | {$ENDIF} 75 | 76 | constructor TFileVersionInformation.Create(const AFileName : string; const ASystemRepository : ISystemRepository); 77 | begin 78 | inherited Create; 79 | FFileName := AFileName; 80 | FSystemRepository := ASystemRepository; 81 | end; 82 | 83 | destructor TFileVersionInformation.Destroy; 84 | begin 85 | FValuesList.Free; 86 | FValuesDictionary.Free; 87 | inherited; 88 | end; 89 | 90 | function TFileVersionInformation.GetCount: Cardinal; 91 | begin 92 | if not Assigned(FValuesList) then 93 | begin 94 | FValuesList := TList>.Create; 95 | FValuesDictionary := TDictionary.Create; 96 | 97 | FValuesList.OnNotify := SyncLists; 98 | PopulateVersionInformation(); 99 | end; 100 | Result := FValuesList.Count; 101 | end; 102 | 103 | function TFileVersionInformation.GetFieldName(const AIndex: Integer): string; 104 | begin 105 | if HasErrored() then 106 | Exit(''); 107 | 108 | Result := TVersionInformationDetails[FValuesList.Items[AIndex].Key]; 109 | end; 110 | 111 | function TFileVersionInformation.GetFieldString(const AIndex: TVersionInformation): string; 112 | begin 113 | if HasErrored() then 114 | Exit(''); 115 | 116 | if not FValuesDictionary.TryGetValue(AIndex, Result) then 117 | Result := ''; 118 | end; 119 | 120 | function TFileVersionInformation.GetFieldValue(const AIndex: Integer): string; 121 | begin 122 | if HasErrored() then 123 | Exit(''); 124 | 125 | Result := FValuesList.Items[AIndex].Value; 126 | end; 127 | 128 | function TFileVersionInformation.GetFileVersion: TVSFixedFileInfo; 129 | begin 130 | if HasErrored() then 131 | Exit(default(TVSFixedFileInfo)); 132 | 133 | Result := FVersionFixedFileInfo^; 134 | end; 135 | 136 | function TFileVersionInformation.HasErrored: Boolean; 137 | begin 138 | Result := (Count = 1) and (FValuesList.Items[0].Key = TVersionInformation.Error); 139 | end; 140 | 141 | procedure TFileVersionInformation.PopulateVersionInformation; 142 | var 143 | LKey: string; 144 | LLastError: DWORD; 145 | LSubBlockTemplate: string; 146 | LTmpDWord: DWORD; 147 | LVersionInformation: Pointer; 148 | LVersionInformationSize: DWORD; 149 | LVersionInfoTranslation : PInteger; 150 | LValueLen : Cardinal; 151 | LPCharResult: PChar; 152 | LResult: string; 153 | LResultLength: Cardinal; 154 | LVersionInformationEnum: TVersionInformation; 155 | begin 156 | LVersionInformationSize := FSystemRepository.GetFileVersionInfoSize(PChar(FFileName), LTmpDWord); 157 | 158 | if (LVersionInformationSize = 0) then 159 | begin 160 | LLastError := FSystemRepository.GetLastError(); 161 | FValuesList.Add(TPair.Create(TVersionInformation.Error, Format('%d (%0:.4x) - %s', [LLastError, SysErrorMessage(LLastError)]))); 162 | Exit; 163 | end; 164 | 165 | LVersionInformation := nil; 166 | try 167 | FSystemRepository.GetMem(LVersionInformation, LVersionInformationSize); 168 | FSystemRepository.GetFileVersionInfo(PChar(FFileName), 0, LVersionInformationSize, LVersionInformation); 169 | FSystemRepository.VerQueryValue(LVersionInformation, PChar('\VarFileInfo\Translation'), Pointer(LVersionInfoTranslation), LValueLen); 170 | FSystemRepository.VerQueryValue(LVersionInformation, '\', Pointer(FVersionFixedFileInfo), LValueLen); 171 | 172 | LSubBlockTemplate := Format('\StringFileInfo\%4.4x%4.4x\', [LoWord(LVersionInfoTranslation^), 173 | HiWord(LVersionInfoTranslation^)]); 174 | 175 | for LVersionInformationEnum := Succ(Low(TVersionInformation)) to High(TVersionInformation) do 176 | begin 177 | LKey := GetEnumName(TypeInfo(TVersionInformation), Ord(LVersionInformationEnum)); 178 | 179 | if FSystemRepository.VerQueryValue(LVersionInformation, PChar(LSubBlockTemplate + LKey), Pointer(LPCharResult), LResultLength) then 180 | begin 181 | LResult := Copy(string(LPCharResult), 1, LResultLength); 182 | if (LResult <> EmptyStr) then 183 | FValuesList.Add(TPair.Create(LVersionInformationEnum, LResult)); 184 | end; 185 | end; 186 | finally 187 | if Assigned(LVersionInformation) then 188 | FSystemRepository.FreeMem(LVersionInformation); 189 | end; 190 | end; 191 | 192 | procedure TFileVersionInformation.SyncLists(Sender: TObject; const Item: TPair; Action: TCollectionNotification); 193 | begin 194 | case Action of 195 | cnAdded : 196 | begin 197 | FValuesDictionary.AddOrSetValue(Item.Key, Item.Value); 198 | end; 199 | cnRemoved, 200 | cnExtracted : 201 | begin 202 | FValuesDictionary.Remove(Item.Key); 203 | end; 204 | end; 205 | end; 206 | 207 | end. 208 | 209 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.other.IFileVersionInformation.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.other.IFileVersionInformation; 2 | 3 | interface 4 | 5 | uses 6 | {$IFDEF VER220} 7 | Windows; 8 | {$ELSE} 9 | Winapi.Windows; 10 | {$ENDIF} 11 | 12 | {$SCOPEDENUMS ON} 13 | type 14 | TVersionInformation = (Error, Author, Comments, CompanyName, 15 | FileDescription, FileVersion, InternalName, 16 | LegalCopyright, LegalTrademarks, OriginalFilename, 17 | PrivateBuild, ProductName, ProductVersion, 18 | SpecialBuild); 19 | {$SCOPEDENUMS OFF} 20 | 21 | type 22 | IFileVersionInformation = interface 23 | ['{81FDD704-30EC-4A72-A4A0-CCECCA04E946}'] 24 | function GetFileVersion : TVSFixedFileInfo; 25 | function GetCount: Cardinal; 26 | function GetFieldName(const AIndex: Integer): string; 27 | function GetFieldValue(const AIndex: Integer): string; 28 | function GetFieldString(const AIndex: TVersionInformation): string; 29 | 30 | function HasErrored : Boolean; 31 | 32 | property Count : Cardinal read GetCount; 33 | property FieldName [const AIndex : Integer] : string read GetFieldName; 34 | property FieldValue [const AIndex : Integer] : string read GetFieldValue; 35 | property FieldString [const AIndex : TVersionInformation] : string read GetFieldString; 36 | end; 37 | 38 | implementation 39 | 40 | end. 41 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.other.INodeXml.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.other.INodeXml; 2 | 3 | interface 4 | 5 | type 6 | INodeXml = interface 7 | ['{DA034CE9-923D-4C77-969A-558D749A3A98}'] 8 | function GetNode(const ANodeName : string) : INodeXml; 9 | function FindAttribute(const AAttributeName : string) : INodeXml; 10 | function NodeValue : string; 11 | function ChildNodesCount() : Integer; 12 | function ChildNode(const AIndex : Integer) : INodeXml; 13 | end; 14 | 15 | implementation 16 | 17 | end. 18 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.repository.IIniFile.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.repository.IIniFile; 2 | 3 | interface 4 | 5 | type 6 | IIniFileRepository = interface 7 | ['{9E29D406-7FB9-46B5-9DE9-79AFC8AC25A4}'] 8 | procedure OpenFile(const AFileName : string); 9 | function Exists(const ASection : string; const AIdent : string) : Boolean; 10 | function ReadString(const ASection : string; const AIdent : string; const ADefault : string): string; 11 | end; 12 | 13 | implementation 14 | 15 | end. 16 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.repository.IRegistry.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.repository.IRegistry; 2 | 3 | interface 4 | 5 | type 6 | IRegistryRepository = interface 7 | ['{814ACE4F-CCEA-47A0-A4BA-FB30EF655251}'] 8 | procedure CloseKey; 9 | function OpenKeyReadOnly(const AKey: String): Boolean; 10 | function OpenKey(const AKey: String; const ACanCreate : Boolean): Boolean; 11 | procedure SetAccess(const AAccess : LongWord); 12 | 13 | function ValueExists(const ASection : string) : Boolean; 14 | function GetDataSize(const ASection : string) : Integer; 15 | 16 | function ReadString(const Name: string): string; 17 | function ReadBool(const ASection : string) : Boolean; 18 | function ReadInteger(const ASection : string) : Integer; overload; 19 | function ReadInteger(const ASection : string; const ADefault : Integer) : Integer; overload; 20 | function ReadBinaryData(const AKeyName: string; var ABuffer; ABufferSize: Integer): Integer; 21 | 22 | procedure WriteInteger(const ASection : string; const AValue : Integer); 23 | end; 24 | 25 | implementation 26 | 27 | end. 28 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.repository.IShortcutExport.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.repository.IShortcutExport; 2 | 3 | interface 4 | 5 | type 6 | IShortcutExportRepository = interface 7 | ['{474C2693-276A-4941-A57A-3D6AE146D6EE}'] 8 | end; 9 | 10 | function GetShortcutExportRepository() : IShortcutExportRepository; 11 | 12 | implementation 13 | 14 | uses 15 | System.Generics.Collections; 16 | 17 | var 18 | LShortcutExportRepository : IShortcutExportRepository = nil; 19 | 20 | type 21 | TShortcutExportRepository = class(TInterfacedObject, IShortcutExportRepository) 22 | private 23 | FShortcutExportClassList : TList; 24 | public 25 | constructor Create; 26 | destructor Destory; override; 27 | end; 28 | 29 | function GetShortcutExportRepository() : IShortcutExportRepository; 30 | begin 31 | if not Assigned(LShortcutExportRepository) then 32 | LShortcutExportRepository := TShortcutExportRepository.Create; 33 | 34 | Result := LShortcutExportRepository; 35 | end; 36 | 37 | { TShortcutExportRepository } 38 | 39 | constructor TShortcutExportRepository.Create; 40 | begin 41 | 42 | end; 43 | 44 | destructor TShortcutExportRepository.Destory; 45 | begin 46 | 47 | inherited; 48 | end; 49 | 50 | end. 51 | 52 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.repository.ISystem.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.repository.ISystem; 2 | 3 | interface 4 | 5 | uses 6 | {$IFDEF VER220} 7 | TlHelp32, 8 | Classes, 9 | Windows, 10 | {$ELSE} 11 | Winapi.TlHelp32, 12 | System.Classes, 13 | Winapi.Windows, 14 | {$ENDIF} 15 | nick.shortcut.other.IFileVersionInformation; 16 | 17 | {$IFDEF VER220} 18 | type 19 | TShortCut = Classes.TShortCut; 20 | TShiftState = Classes.TShiftState; 21 | 22 | const 23 | scShift = Classes.scShift; 24 | scCtrl = Classes.scCtrl; 25 | scAlt = Classes.scAlt; 26 | scNone = Classes.scNone; 27 | {$ELSE} 28 | type 29 | TShortCut = System.Classes.TShortCut; 30 | 31 | const 32 | scShift = System.Classes.scShift; 33 | scCtrl = System.Classes.scCtrl; 34 | scAlt = System.Classes.scAlt; 35 | scNone = System.Classes.scNone; 36 | {$ENDIF} 37 | 38 | 39 | type 40 | ISystemRepository = interface 41 | ['{0729EC4D-187E-476D-B3C4-FF434C92340F}'] 42 | function FileExists(const AFileName: string; const AFollowLink: Boolean = True): Boolean; 43 | function DirectoryExists(const ADirectory: string; const AFollowLink: Boolean = True): Boolean; 44 | function GetAppDataDirectory(out APath : string) : Boolean; 45 | function GetVersionInformation(const AFileName : string; out AVSFixedFileInfo : TVSFixedFileInfo) : Boolean; overload; 46 | function GetVersionInformation(const AFileName : string) : IFileVersionInformation; overload; 47 | 48 | function GetCurrentProcessID() : DWORD; 49 | 50 | function ShortCut(const Key: Word; const Shift: TShiftState): TShortCut; 51 | function TextToShortCut(const Text: string): TShortCut; 52 | 53 | function CreateToolhelp32Snapshot(const AFlags : DWORD; const AProcessID: DWORD): THandle; 54 | function Module32First(const ASnapshotHandle: THandle; var AModuleEntry32: TModuleEntry32): BOOL; 55 | function Module32Next(const ASnapshotHandle: THandle; var AModuleEntry32: TModuleEntry32): BOOL; 56 | function CloseHandle(const AHandle: THandle): BOOL; 57 | 58 | function GetModulePath(const AModuleName : string) : string; 59 | 60 | function GetLastError: DWORD; 61 | 62 | procedure GetMem(var APointer: Pointer; const ASize: Integer); 63 | procedure FreeMem(var APointer: Pointer); 64 | 65 | function GetFileVersionInfoSize(const AFilename: PChar; var lpdwHandle: DWORD): DWORD; 66 | function GetFileVersionInfo(const AFilename: PChar; const AHandle : DWORD; const ALength : DWORD; const APointer: Pointer): BOOL; 67 | function VerQueryValue(const ABlock: Pointer; const ASubBlock: PChar; var ABuffer: Pointer; var ALength: UINT): BOOL; 68 | 69 | function GlobalAddAtom(const AAtomName : string) : ATOM; 70 | function GlobalDeleteAtom(const AAtom : ATOM) : DWORD; 71 | 72 | function IsHotKeyRegisteredByTheOperatingSystem(const AWindowHandle : HWND; const AID: Integer; const AModifiers : UINT; const AVirtualKey : UINT) : Boolean; 73 | 74 | function ModifiersToShiftState(const AModifier : Integer) : TShiftState; 75 | function ModifiersToString(const AModifier : Integer) : string; 76 | 77 | function GetSaveFileName(const AWindowHandle : HWND; const ADefaultExt : string; out AFileName : string) : Boolean; 78 | 79 | function ShellExecute(const AWindowHandle : HWND; 80 | const AOperation : PChar; 81 | const AFileName : PChar; 82 | const AParameters : PChar; 83 | const ADirectory: PChar; 84 | const AShowCmd: Integer): HINST; 85 | end; 86 | 87 | implementation 88 | 89 | end. 90 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.repository.IToolsApi.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.repository.IToolsApi; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.other.IFileVersionInformation, 7 | {$IFDEF VER220} 8 | Classes, 9 | Menus, 10 | {$ELSE} 11 | System.Classes, 12 | Vcl.Menus, 13 | {$ENDIF} 14 | ToolsAPI; 15 | 16 | type 17 | TModuleDetail = record 18 | Module : string; 19 | Path : string; 20 | FileVersionInformation : IFileVersionInformation; 21 | KeyBindingRec : TKeyBindingRec; 22 | 23 | function GetDisplayText() : string; 24 | end; 25 | 26 | type 27 | IToolsApiRepository = interface 28 | ['{A9D74550-929F-457E-B2C8-C3C100728E74}'] 29 | function GetBDSVersion : Integer; 30 | function GetPackageVersion : Integer; 31 | function GetIDEName : string; 32 | 33 | function GetMainMenu() : TMainMenu; 34 | 35 | function GetBaseRegistryKey(out ABaseRegistryKey: string) : Boolean; 36 | 37 | function IsPackageLoaded(const APackageName: string): Boolean; 38 | 39 | function GetKeyboardServices(out AOTAKeyboardServices : IOTAKeyboardServices) : Boolean; 40 | 41 | function GetKeyboardBindingsDetails(const AShortCut : TShortcut) : TArray; 42 | end; 43 | 44 | implementation 45 | 46 | uses 47 | {$IFDEF VER220} 48 | SysUtils; 49 | {$ELSE} 50 | System.SysUtils; 51 | {$ENDIF} 52 | 53 | { TModuleDetail } 54 | 55 | function TModuleDetail.GetDisplayText: string; 56 | begin 57 | Result := FileVersionInformation.FieldString[TVersionInformation.FileDescription]; 58 | 59 | if (Result = EmptyStr) then 60 | Result := FileVersionInformation.FieldString[TVersionInformation.ProductName]; 61 | 62 | if (Result = EmptyStr) then 63 | Result := Module; 64 | end; 65 | 66 | end. 67 | 68 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.repository.IXmlFile.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.repository.IXmlFile; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.other.INodeXml; 7 | 8 | type 9 | IXmlFileRepository = interface 10 | ['{1D284D2A-E1C8-4FD3-B238-E1AF594A57D4}'] 11 | procedure OpenFile(const AFileName : string); 12 | procedure Active(const AActive : Boolean); 13 | function GetRootNode() : INodeXml; 14 | end; 15 | 16 | implementation 17 | 18 | end. 19 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.repository.IniFile.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.repository.IniFile; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.repository.IIniFile, 7 | {$IFDEF VER220} 8 | IniFiles; 9 | {$ELSE} 10 | System.IniFiles; 11 | {$ENDIF} 12 | 13 | type 14 | TIniFileRepository = class(TInterfacedObject, IIniFileRepository) 15 | private 16 | FMemIniFile : TMemIniFile; 17 | public 18 | constructor Create; 19 | destructor Destroy; override; 20 | 21 | procedure OpenFile(const AFileName : string); 22 | function Exists(const ASection : string; const AIdent : string) : Boolean; 23 | function ReadString(const ASection : string; const AIdent : string; const ADefault : string): string; 24 | end; 25 | 26 | implementation 27 | 28 | uses 29 | {$IFDEF VER220} 30 | SysUtils; 31 | {$ELSE} 32 | System.SysUtils; 33 | {$ENDIF} 34 | 35 | constructor TIniFileRepository.Create; 36 | begin 37 | FMemIniFile := TMemIniFile.Create(''); 38 | end; 39 | 40 | destructor TIniFileRepository.Destroy; 41 | begin 42 | FMemIniFile.Free; 43 | inherited; 44 | end; 45 | 46 | function TIniFileRepository.Exists(const ASection : string; const AIdent : string): Boolean; 47 | begin 48 | Result := FMemIniFile.ValueExists(ASection, AIdent); 49 | end; 50 | 51 | procedure TIniFileRepository.OpenFile(const AFileName : string); 52 | begin 53 | if (not AnsiSameText(AFileName, FMemIniFile.FileName)) then 54 | FMemIniFile.Rename(AFileName, True); 55 | end; 56 | 57 | function TIniFileRepository.ReadString(const ASection : string; const AIdent : string; const ADefault : string): string; 58 | begin 59 | Result := FMemIniFile.ReadString(ASection, AIdent, ADefault); 60 | end; 61 | 62 | end. 63 | 64 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.repository.Registry.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.repository.Registry; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.repository.IRegistry, 7 | {$IFDEF VER220} 8 | Registry; 9 | {$ELSE} 10 | System.Win.Registry; 11 | {$ENDIF} 12 | 13 | type 14 | TRegistryRepository = class(TInterfacedObject, IRegistryRepository) 15 | private 16 | FRegistry : TRegistry; 17 | public 18 | constructor Create(const AAccess: LongWord); overload; 19 | constructor Create(); overload; 20 | destructor Destroy; override; 21 | 22 | procedure CloseKey; 23 | procedure SetAccess(const AAccess : LongWord); 24 | function OpenKeyReadOnly(const AKey: String): Boolean; 25 | function OpenKey(const AKey: String; const ACanCreate : Boolean): Boolean; 26 | 27 | function ValueExists(const ASection : string) : Boolean; 28 | function GetDataSize(const ASection : string) : Integer; 29 | 30 | function ReadString(const AName: string): string; 31 | function ReadBool(const ASection : string) : Boolean; 32 | function ReadInteger(const ASection : string) : Integer; overload; 33 | function ReadInteger(const ASection : string; const ADefault : Integer) : Integer; overload; 34 | function ReadBinaryData(const AKeyName: string; var ABuffer; ABufferSize: Integer): Integer; 35 | 36 | procedure WriteInteger(const ASection : string; const AValue : Integer); 37 | end; 38 | 39 | implementation 40 | 41 | uses 42 | {$IFDEF VER220} 43 | Windows; 44 | {$ELSE} 45 | Winapi.Windows; 46 | {$ENDIF} 47 | 48 | constructor TRegistryRepository.Create; 49 | begin 50 | Create(KEY_READ); 51 | end; 52 | 53 | constructor TRegistryRepository.Create(const AAccess: LongWord); 54 | begin 55 | inherited Create; 56 | 57 | FRegistry := TRegistry.Create(AAccess); 58 | FRegistry.RootKey := HKEY_CURRENT_USER; 59 | end; 60 | 61 | destructor TRegistryRepository.Destroy; 62 | begin 63 | FRegistry.Free; 64 | inherited; 65 | end; 66 | 67 | function TRegistryRepository.GetDataSize(const ASection: string): Integer; 68 | begin 69 | Result := FRegistry.GetDataSize(ASection); 70 | end; 71 | 72 | procedure TRegistryRepository.CloseKey; 73 | begin 74 | FRegistry.CloseKey; 75 | end; 76 | 77 | function TRegistryRepository.OpenKey(const AKey: String; const ACanCreate: Boolean): Boolean; 78 | begin 79 | Result := FRegistry.OpenKey(AKey, ACanCreate); 80 | end; 81 | 82 | function TRegistryRepository.OpenKeyReadOnly(const AKey: String): Boolean; 83 | begin 84 | Result := FRegistry.OpenKeyReadOnly(AKey) 85 | end; 86 | 87 | function TRegistryRepository.ReadBinaryData(const AKeyName: string; var ABuffer; ABufferSize: Integer): Integer; 88 | begin 89 | Result := FRegistry.ReadBinaryData(AKeyName, ABuffer, ABufferSize); 90 | end; 91 | 92 | function TRegistryRepository.ReadBool(const ASection: string): Boolean; 93 | begin 94 | Result := FRegistry.ReadBool(ASection); 95 | end; 96 | 97 | function TRegistryRepository.ReadInteger(const ASection: string; const ADefault: Integer): Integer; 98 | var 99 | LRegDataInfo : TRegDataInfo; 100 | begin 101 | Result := ADefault; 102 | 103 | if (FRegistry.GetDataInfo(ASection, LRegDataInfo)) and 104 | (LRegDataInfo.RegData = rdInteger) then 105 | begin 106 | Result := ReadInteger(ASection); 107 | end; 108 | end; 109 | 110 | function TRegistryRepository.ReadInteger(const ASection: string): Integer; 111 | begin 112 | Result := FRegistry.ReadInteger(ASection); 113 | end; 114 | 115 | function TRegistryRepository.ReadString(const AName: string): string; 116 | begin 117 | Result := FRegistry.ReadString(AName); 118 | end; 119 | 120 | procedure TRegistryRepository.SetAccess(const AAccess: LongWord); 121 | begin 122 | FRegistry.Access := AAccess; 123 | end; 124 | 125 | function TRegistryRepository.ValueExists(const ASection: string): Boolean; 126 | begin 127 | Result := FRegistry.ValueExists(ASection); 128 | end; 129 | 130 | procedure TRegistryRepository.WriteInteger(const ASection: string; const AValue: Integer); 131 | begin 132 | FRegistry.WriteInteger(ASection, AValue); 133 | end; 134 | 135 | end. 136 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.repository.ShortCut.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.repository.ShortCut; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.core.ShortCutList, 7 | nick.shortcut.core.IShortCutList, 8 | {$IFDEF VER220} 9 | Generics.Collections; 10 | {$ELSE} 11 | System.Generics.Collections; 12 | {$ENDIF} 13 | 14 | type 15 | IShortCutRepository = interface 16 | ['{086C2D97-295A-43E6-8F20-823212F2FF28}'] 17 | procedure Add(const AShortCutListClass : TShortCutListClass); 18 | 19 | function GetShortCutElements : TArray; 20 | end; 21 | 22 | function GetShortCutRepository() : IShortCutRepository; 23 | 24 | implementation 25 | 26 | uses 27 | {$IFDEF VER220} 28 | SysUtils, 29 | {$ELSE} 30 | System.SysUtils, 31 | {$ENDIF} 32 | nick.shortcut.factory.IRepository, 33 | nick.shortcut.factory.Repository; 34 | 35 | var 36 | FShortCutRepository : IShortCutRepository = nil; 37 | 38 | type 39 | TShortCutRepository = class(TInterfacedObject, IShortCutRepository) 40 | private 41 | FShortCutListClassList : TList; 42 | FRepositoryFactory : IRepositoryFactory; 43 | public 44 | constructor Create(const ARepositoryFactory : IRepositoryFactory); 45 | destructor Destroy; override; 46 | 47 | procedure Add(const AShortCutListClass : TShortCutListClass); 48 | 49 | function GetShortCutElements : TArray; 50 | end; 51 | 52 | constructor TShortCutRepository.Create(const ARepositoryFactory : IRepositoryFactory); 53 | begin 54 | inherited Create(); 55 | FRepositoryFactory := ARepositoryFactory; 56 | FShortCutListClassList := TList.Create; 57 | end; 58 | 59 | destructor TShortCutRepository.Destroy; 60 | begin 61 | FShortCutListClassList.Free; 62 | inherited; 63 | end; 64 | 65 | function GetShortCutRepository() : IShortCutRepository; 66 | begin 67 | if not Assigned(FShortCutRepository) then 68 | FShortCutRepository := TShortCutRepository.Create(TRepositoryFactory.New()); 69 | 70 | Result := FShortCutRepository; 71 | end; 72 | 73 | procedure TShortCutRepository.Add(const AShortCutListClass: TShortCutListClass); 74 | begin 75 | FShortCutListClassList.Add(AShortCutListClass); 76 | end; 77 | 78 | function TShortCutRepository.GetShortCutElements: TArray; 79 | var 80 | LShortCutListList : TList; 81 | LShortCutList : IShortCutList; 82 | LShortCutListClass: TShortCutListClass; 83 | begin 84 | LShortCutListList := nil; 85 | try 86 | LShortCutListList := TList.Create; 87 | 88 | for LShortCutListClass in FShortCutListClassList do 89 | begin 90 | LShortCutList := LShortCutListClass.Create(FRepositoryFactory); 91 | if (LShortCutList.IsUseable) then 92 | begin 93 | LShortCutList.RetrieveShortCuts(); 94 | if (LShortCutList.Count <> 0) then 95 | LShortCutListList.Add(LShortCutList); 96 | end; 97 | end; 98 | 99 | Result := LShortCutListList.ToArray; 100 | finally 101 | LShortCutListList.Free; 102 | end; 103 | end; 104 | 105 | end. 106 | 107 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.repository.ShortcutExport.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.repository.ShortcutExport; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.core.ShortcutExport; 7 | 8 | type 9 | IShortcutExportRepository = interface 10 | ['{474C2693-276A-4941-A57A-3D6AE146D6EE}'] 11 | procedure Add(const AShortcutExportClass : TShortcutExportClass); 12 | function ExportsList() : TArray; 13 | function Count : Integer; 14 | end; 15 | 16 | function GetShortcutExportRepository() : IShortcutExportRepository; 17 | 18 | implementation 19 | 20 | uses 21 | {$IFDEF VER220} 22 | Generics.Collections; 23 | {$ELSE} 24 | System.Generics.Collections; 25 | {$ENDIF} 26 | 27 | var 28 | LShortcutExportRepository : IShortcutExportRepository = nil; 29 | 30 | type 31 | TShortcutExportRepository = class(TInterfacedObject, IShortcutExportRepository) 32 | private 33 | FShortcutExportClassList : TList; 34 | public 35 | constructor Create; 36 | destructor Destroy; override; 37 | 38 | procedure Add(const AShortcutExportClass : TShortcutExportClass); 39 | 40 | function ExportsList() : TArray; 41 | function Count : Integer; 42 | end; 43 | 44 | function GetShortcutExportRepository() : IShortcutExportRepository; 45 | begin 46 | if not Assigned(LShortcutExportRepository) then 47 | LShortcutExportRepository := TShortcutExportRepository.Create; 48 | 49 | Result := LShortcutExportRepository; 50 | end; 51 | 52 | { TShortcutExportRepository } 53 | 54 | procedure TShortcutExportRepository.Add(const AShortcutExportClass: TShortcutExportClass); 55 | begin 56 | FShortcutExportClassList.Add(AShortcutExportClass); 57 | end; 58 | 59 | function TShortcutExportRepository.Count: Integer; 60 | begin 61 | Result := FShortcutExportClassList.Count; 62 | end; 63 | 64 | constructor TShortcutExportRepository.Create; 65 | begin 66 | inherited Create; 67 | FShortcutExportClassList := TList.Create; 68 | end; 69 | 70 | destructor TShortcutExportRepository.Destroy; 71 | begin 72 | FShortcutExportClassList.Free; 73 | inherited; 74 | end; 75 | 76 | function TShortcutExportRepository.ExportsList: TArray; 77 | begin 78 | Result := FShortcutExportClassList.ToArray; 79 | end; 80 | 81 | end. 82 | 83 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.repository.ToolsApi.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.repository.ToolsApi; 2 | 3 | {$I jedi.inc} 4 | 5 | interface 6 | 7 | uses 8 | {$IFDEF VER220} 9 | Menus, 10 | {$ELSE} 11 | Vcl.Menus, 12 | {$ENDIF} 13 | ToolsAPI, 14 | nick.shortcut.repository.IRegistry, 15 | nick.shortcut.repository.IToolsApi, 16 | nick.shortcut.repository.ISystem; 17 | 18 | type 19 | TToolsApiRepository = class(TInterfacedObject, IToolsApiRepository) 20 | private 21 | FRegistryRepository: IRegistryRepository; 22 | FSystemRepository : ISystemRepository; 23 | procedure FindModuleDetails(const AKeyBindingRec: TKeyBindingRec; 24 | const ASystemRepository: ISystemRepository; 25 | const ASnapShotHandle: THandle; 26 | var AModuleDetail: TModuleDetail); 27 | public 28 | constructor Create(const ARegistryRepository: IRegistryRepository; const ASystemRepository : ISystemRepository); reintroduce; 29 | function GetBDSVersion : Integer; 30 | function GetPackageVersion : Integer; 31 | function GetIDEName : string; 32 | 33 | function GetMainMenu() : TMainMenu; 34 | 35 | function GetBaseRegistryKey(out ABaseRegistryKey: string) : Boolean; 36 | 37 | function IsPackageLoaded(const APackageName: string): Boolean; 38 | 39 | function GetKeyboardServices(out AOTAKeyboardServices : IOTAKeyboardServices) : Boolean; 40 | 41 | function GetKeyboardBindingsDetails(const AShortCut : TShortcut) : TArray; 42 | end; 43 | 44 | implementation 45 | 46 | uses 47 | {$IFDEF VER220} 48 | SysUtils, 49 | TlHelp32, 50 | Generics.Collections; 51 | {$ELSE} 52 | System.SysUtils, 53 | Winapi.TlHelp32, 54 | System.Generics.Collections; 55 | {$ENDIF} 56 | 57 | constructor TToolsApiRepository.Create(const ARegistryRepository: IRegistryRepository; const ASystemRepository : ISystemRepository); 58 | begin 59 | inherited Create(); 60 | FRegistryRepository := ARegistryRepository; 61 | FSystemRepository := ASystemRepository; 62 | end; 63 | 64 | function TToolsApiRepository.GetBDSVersion: Integer; 65 | begin 66 | Result := Trunc(RTLVersion) - 14; 67 | if (Result >= 13) then 68 | Result := Result + 1; 69 | end; 70 | 71 | function TToolsApiRepository.GetPackageVersion: Integer; 72 | {$IFNDEF DELPHIXE7} 73 | var 74 | LBaseRegistryKey : string; 75 | LProductVersion: string; 76 | {$ENDIF} 77 | begin 78 | {$IFNDEF DELPHIXE7} 79 | // Delphi XE7 has this value incorrect :( It is set to 20 and not 21 80 | // as per http://docwiki.embarcadero.com/RADStudio/XE7/en/Compiler_Versions 81 | 82 | if GetBaseRegistryKey(LBaseRegistryKey) then 83 | if FRegistryRepository.OpenKeyReadOnly(LBaseRegistryKey) then 84 | try 85 | if FRegistryRepository.ValueExists('ProductVersion') then 86 | begin 87 | LProductVersion := FRegistryRepository.ReadString('ProductVersion'); 88 | 89 | if (TryStrToInt(LProductVersion, Result)) then 90 | Exit(Result); 91 | end; 92 | finally 93 | FRegistryRepository.CloseKey; 94 | end; 95 | {$ENDIF} 96 | 97 | // Product version : http://docwiki.embarcadero.com/RADStudio/XE6/en/Compiler_Versions 98 | // RTL/Compiler version : http://blog.blong.com/p/ancient-blog-posts.html 99 | 100 | Result := Trunc(System.RTLVersion) - 7; 101 | if (Result <= 13) then 102 | Result := Result - 1; 103 | end; 104 | 105 | function TToolsApiRepository.GetIDEName: string; 106 | var 107 | LVersion : Integer; 108 | begin 109 | Result := ''; 110 | 111 | LVersion := GetPackageVersion(); 112 | 113 | case LVersion of 114 | // Not sure of these... 115 | 1..5 : Result := IntToStr(LVersion); 116 | 6,7 : Result := IntToStr(LVersion); 117 | // Delphi for .Net 118 | 8 : Result := IntToStr(LVersion); 119 | 9..11,14 : Result := IntToStr(1996 + LVersion); 120 | 12 : Result := IntToStr(1997 + LVersion); 121 | 15 : Result := 'XE'; 122 | else 123 | Result := 'XE' + IntToStr(LVersion - 14); 124 | end; 125 | end; 126 | 127 | procedure TToolsApiRepository.FindModuleDetails(const AKeyBindingRec: TKeyBindingRec; 128 | const ASystemRepository: ISystemRepository; 129 | const ASnapShotHandle: THandle; 130 | var AModuleDetail: TModuleDetail); 131 | var 132 | LModuleEntry32: TModuleEntry32; 133 | LValidModuleEntry: Boolean; 134 | begin 135 | if (ASnapShotHandle = INVALID_HANDLE_VALUE) then 136 | Exit; 137 | 138 | LModuleEntry32.dwSize := SizeOf(LModuleEntry32); 139 | LValidModuleEntry := ASystemRepository.Module32First(ASnapShotHandle, LModuleEntry32); 140 | while LValidModuleEntry do 141 | begin 142 | if (NativeUInt(LModuleEntry32.modBaseAddr) <= NativeUInt(@AKeyBindingRec.KeyProc)) and 143 | (NativeUInt(@AKeyBindingRec.KeyProc) < (NativeUInt(LModuleEntry32.modBaseAddr) + LModuleEntry32.modBaseSize)) then 144 | begin 145 | AModuleDetail.Module := LModuleEntry32.szModule; 146 | AModuleDetail.Path := LModuleEntry32.szExePath; 147 | break; 148 | end; 149 | LValidModuleEntry := ASystemRepository.Module32Next(ASnapShotHandle, LModuleEntry32); 150 | end; 151 | end; 152 | 153 | function TToolsApiRepository.GetKeyboardBindingsDetails(const AShortCut: TShortcut): TArray; 154 | var 155 | LKeyBindingRec : TKeyBindingRec; 156 | LModuleDetail : TModuleDetail; 157 | LOTAKeyboardServices : IOTAKeyboardServices; 158 | LSnapShotHandle : THandle; 159 | LModuleDetails : TList; 160 | begin 161 | LModuleDetails := nil; 162 | try 163 | LModuleDetails := TList.Create; 164 | 165 | if (AShortCut and 255 = 0) then 166 | Exit; 167 | 168 | if not GetKeyboardServices(LOTAKeyboardServices) then 169 | Exit; 170 | 171 | if not LOTAKeyboardServices.LookupKeyBinding([AShortCut], LKeyBindingRec) then 172 | Exit; 173 | 174 | LSnapShotHandle := FSystemRepository.CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, FSystemRepository.GetCurrentProcessID()); 175 | try 176 | repeat 177 | LModuleDetail.Module := ''; 178 | LModuleDetail.Path := ''; 179 | LModuleDetail.KeyBindingRec := LKeyBindingRec; 180 | 181 | FindModuleDetails(LKeyBindingRec, FSystemRepository, LSnapShotHandle, LModuleDetail); 182 | LModuleDetail.FileVersionInformation := FSystemRepository.GetVersionInformation(LModuleDetail.Path); 183 | 184 | LModuleDetails.Add(LModuleDetail); 185 | until not LOTAKeyboardServices.GetNextBindingRec(LKeyBindingRec); 186 | 187 | finally 188 | if (LSnapShotHandle <> INVALID_HANDLE_VALUE) then 189 | FSystemRepository.CloseHandle(LSnapShotHandle); 190 | end; 191 | finally 192 | Result := LModuleDetails.ToArray; 193 | 194 | LModuleDetails.Free; 195 | end; 196 | end; 197 | 198 | function TToolsApiRepository.GetKeyboardServices(out AOTAKeyboardServices: IOTAKeyboardServices): Boolean; 199 | begin 200 | {$IFDEF VER220} 201 | Result := SysUtils.Supports(ToolsAPI.BorlandIDEServices, IOTAKeyboardServices, AOTAKeyboardServices); 202 | {$ELSE} 203 | Result := System.SysUtils.Supports(ToolsAPI.BorlandIDEServices, IOTAKeyboardServices, AOTAKeyboardServices); 204 | {$ENDIF} 205 | end; 206 | 207 | function TToolsApiRepository.GetMainMenu: TMainMenu; 208 | var 209 | LNTAServices : INTAServices; 210 | begin 211 | Result := nil; 212 | {$IFDEF VER220} 213 | if not SysUtils.Supports(ToolsAPI.BorlandIDEServices, INTAServices, LNTAServices) then 214 | Exit; 215 | {$ELSE} 216 | if not System.SysUtils.Supports(ToolsAPI.BorlandIDEServices, INTAServices, LNTAServices) then 217 | Exit; 218 | {$ENDIF} 219 | 220 | Result := LNTAServices.MainMenu; 221 | end; 222 | 223 | function TToolsApiRepository.IsPackageLoaded(const APackageName: string): Boolean; 224 | var 225 | LOTAPackageInfo : IOTAPackageInfo; 226 | LOTAPackageServices : IOTAPackageServices; 227 | lp: Integer; 228 | begin 229 | Result := False; 230 | 231 | {$IFDEF VER220} 232 | if not SysUtils.Supports(BorlandIDEServices, IOTAPackageServices, LOTAPackageServices) then 233 | Exit; 234 | {$ELSE} 235 | if not System.SysUtils.Supports(BorlandIDEServices, IOTAPackageServices, LOTAPackageServices) then 236 | Exit; 237 | {$ENDIF} 238 | 239 | for lp := 0 to LOTAPackageServices.PackageCount - 1 do 240 | begin 241 | LOTAPackageInfo := LOTAPackageServices.Package[lp]; 242 | 243 | if not LOTAPackageInfo.Loaded then 244 | Continue; 245 | 246 | Result := SameText(LOTAPackageInfo.Name, APackageName); 247 | if Result then 248 | Exit; 249 | end; 250 | end; 251 | 252 | function TToolsApiRepository.GetBaseRegistryKey(out ABaseRegistryKey: string): Boolean; 253 | var 254 | LOTAServices: IOTAServices; 255 | begin 256 | {$IFDEF VER220} 257 | Result := SysUtils.Supports(BorlandIDEServices, IOTAServices, LOTAServices); 258 | {$ELSE} 259 | Result := System.SysUtils.Supports(BorlandIDEServices, IOTAServices, LOTAServices); 260 | {$ENDIF} 261 | 262 | if Result then 263 | ABaseRegistryKey := LOTAServices.GetBaseRegistryKey(); 264 | end; 265 | 266 | end. 267 | 268 | -------------------------------------------------------------------------------- /Source/Repositories/nick.shortcut.repository.XmlFile.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.repository.XmlFile; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.repository.IXmlFile, 7 | nick.shortcut.other.INodeXml, 8 | XMLIntf; 9 | 10 | type 11 | TXmlFileRepository = class(TInterfacedObject, IXmlFileRepository) 12 | private 13 | FXMLDocument : IXMLDocument; 14 | public 15 | procedure OpenFile(const AFileName : string); 16 | procedure Active(const AActive : Boolean); 17 | function GetRootNode() : INodeXml; 18 | end; 19 | 20 | implementation 21 | 22 | uses 23 | XMLDoc, 24 | {$IFDEF VER220} 25 | SysUtils; 26 | {$ELSE} 27 | System.SysUtils; 28 | {$ENDIF} 29 | 30 | type 31 | TNodeXml = class(TInterfacedObject, INodeXml) 32 | private 33 | FXmlNode : IXMLNode; 34 | public 35 | constructor Create(const AXmlNode : IXMLNode); 36 | 37 | function GetNode(const ANodeName : string) : INodeXml; 38 | function FindAttribute(const AAttributeName : string) : INodeXml; 39 | function NodeValue : string; 40 | function ChildNodesCount() : Integer; 41 | function ChildNode(const AIndex : Integer) : INodeXml; 42 | end; 43 | 44 | { TXmlFileRepository } 45 | 46 | procedure TXmlFileRepository.Active(const AActive: Boolean); 47 | begin 48 | if Assigned(FXMLDocument) then 49 | FXMLDocument.Active := AActive; 50 | end; 51 | 52 | function TXmlFileRepository.GetRootNode: INodeXml; 53 | begin 54 | Result := nil; 55 | 56 | if Assigned(FXMLDocument) and 57 | Assigned(FXMLDocument.Node) then 58 | begin 59 | Result := TNodeXml.Create(FXMLDocument.Node); 60 | end; 61 | end; 62 | 63 | procedure TXmlFileRepository.OpenFile(const AFileName: string); 64 | begin 65 | if (not Assigned(FXMLDocument)) or 66 | (not AnsiSameText(AFileName, FXMLDocument.FileName)) then 67 | begin 68 | FXMLDocument := XMLDoc.LoadXMLDocument(AFileName); 69 | end; 70 | end; 71 | 72 | { TNodeXml } 73 | 74 | constructor TNodeXml.Create(const AXmlNode: IXMLNode); 75 | begin 76 | inherited Create(); 77 | FXmlNode := AXmlNode; 78 | end; 79 | 80 | function TNodeXml.ChildNode(const AIndex: Integer): INodeXml; 81 | begin 82 | Result := nil; 83 | if not Assigned(FXmlNode) then 84 | Exit; 85 | 86 | Result := TNodeXml.Create(FXmlNode.ChildNodes.Nodes[AIndex]); 87 | end; 88 | 89 | function TNodeXml.ChildNodesCount: Integer; 90 | begin 91 | Result := 0; 92 | if not Assigned(FXmlNode) then 93 | Exit; 94 | 95 | Result := FXmlNode.ChildNodes.Count; 96 | end; 97 | 98 | function TNodeXml.FindAttribute(const AAttributeName: string): INodeXml; 99 | var 100 | LNode: IXMLNode; 101 | begin 102 | Result := nil; 103 | if not Assigned(FXmlNode) then 104 | Exit; 105 | 106 | LNode := FXmlNode.AttributeNodes.FindNode(AAttributeName); 107 | 108 | if not Assigned(LNode) then 109 | Exit; 110 | 111 | Result := TNodeXml.Create(LNode); 112 | end; 113 | 114 | function TNodeXml.GetNode(const ANodeName: string): INodeXml; 115 | var 116 | LNode: IXMLNode; 117 | begin 118 | Result := nil; 119 | if not Assigned(FXmlNode) then 120 | Exit; 121 | 122 | LNode := FXmlNode.ChildNodes.Nodes[ANodeName]; 123 | 124 | if not Assigned(LNode) then 125 | Exit; 126 | 127 | Result := TNodeXml.Create(LNode); 128 | end; 129 | 130 | function TNodeXml.NodeValue: string; 131 | begin 132 | Result := ''; 133 | if not Assigned(FXmlNode) then 134 | Exit; 135 | 136 | Result := FXmlNode.NodeValue; 137 | end; 138 | 139 | end. 140 | 141 | -------------------------------------------------------------------------------- /Source/nick.shortcut.core.IShortCutList.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.core.IShortCutList; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.core.ShortCutItem, 7 | nick.shortcut.repository.IIniFile, 8 | nick.shortcut.repository.IRegistry, 9 | nick.shortcut.repository.ISystem, 10 | nick.shortcut.repository.IXmlFile; 11 | 12 | type 13 | IShortCutList = interface 14 | ['{DB18AC7F-7A53-45DC-9129-DF9975A12B8F}'] 15 | 16 | function Count() : Integer; 17 | 18 | function IsUseable() : Boolean; 19 | 20 | function IniFileRepository() : IIniFileRepository; 21 | function XmlFileRepository() : IXmlFileRepository; 22 | function RegistryRepository() : IRegistryRepository; 23 | function SystemRepository() : ISystemRepository; 24 | 25 | procedure RetrieveShortCuts(); 26 | 27 | procedure Add(const AShortCutItem : IShortCutItem); 28 | 29 | function GetShortCut(const AIndex : Integer) : IShortCutItem; 30 | property ShortCut [const AIndex : Integer] : IShortCutItem read GetShortCut; 31 | 32 | function GetName() : string; 33 | property Name : string read GetName; 34 | 35 | function GetDescription() : string; 36 | property Description : string read GetDescription; 37 | end; 38 | 39 | implementation 40 | 41 | end. 42 | -------------------------------------------------------------------------------- /Source/nick.shortcut.core.IShortcutExportRegistry.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.core.IShortcutExportRegistry; 2 | 3 | interface 4 | 5 | type 6 | IExpertRegistry = interface 7 | ['{474C2693-276A-4941-A57A-3D6AE146D6EE}'] 8 | end; 9 | 10 | implementation 11 | 12 | end. 13 | 14 | -------------------------------------------------------------------------------- /Source/nick.shortcut.core.KnownShortcutsRegistration.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.core.KnownShortcutsRegistration; 2 | 3 | interface 4 | 5 | procedure Register; 6 | 7 | implementation 8 | 9 | uses 10 | ToolsApi, 11 | {$IFDEF VER220} 12 | Forms, 13 | SysUtils, 14 | Controls, 15 | {$ELSE} 16 | Vcl.Forms, 17 | System.SysUtils, 18 | Vcl.Controls, 19 | {$ENDIF} 20 | nick.shortcut.frame.KnownShortcuts, 21 | nick.shortcut.core.ShortCutFinderRegistration, 22 | nick.shortcut.factory.Repository, 23 | nick.shortcut.repository.ShortCut; 24 | 25 | type 26 | TKnownShortcutsRegistration = class(TInterfacedObject, INTAAddInOptions) 27 | public 28 | { INTAAddInOptions } 29 | function GetArea: string; 30 | function GetCaption: string; 31 | function GetFrameClass: TCustomFrameClass; 32 | procedure FrameCreated(AFrame: TCustomFrame); 33 | procedure DialogClosed(Accepted: Boolean); 34 | function ValidateContents: Boolean; 35 | function GetHelpContext: Integer; 36 | function IncludeInIDEInsight: Boolean; 37 | end; 38 | 39 | const 40 | cCAPTION = 'Known Shortcuts'; 41 | 42 | var 43 | FKnownShortcutsRegistration : TKnownShortcutsRegistration = nil; 44 | 45 | procedure Register; 46 | var 47 | LNTAEnvironmentOptionsServices : INTAEnvironmentOptionsServices; 48 | begin 49 | {$IFDEF VER220} 50 | if not SysUtils.Supports(ToolsAPI.BorlandIDEServices, INTAEnvironmentOptionsServices, LNTAEnvironmentOptionsServices) then 51 | Exit; 52 | {$ELSE} 53 | if not System.SysUtils.Supports(ToolsAPI.BorlandIDEServices, INTAEnvironmentOptionsServices, LNTAEnvironmentOptionsServices) then 54 | Exit; 55 | {$ENDIF} 56 | 57 | FKnownShortcutsRegistration := TKnownShortcutsRegistration.Create; 58 | LNTAEnvironmentOptionsServices.RegisterAddInOptions(FKnownShortcutsRegistration); 59 | end; 60 | 61 | { TDelphiKeyAllocations } 62 | 63 | {$REGION 'INTAAddInOptions'} 64 | procedure TKnownShortcutsRegistration.DialogClosed(Accepted: Boolean); 65 | begin 66 | // Do nothing / Do not care about it 67 | end; 68 | 69 | procedure TKnownShortcutsRegistration.FrameCreated(AFrame: TCustomFrame); 70 | var 71 | LFrame : TFrame; 72 | begin 73 | LFrame := TfrmKnownShortcuts.Create(AFrame, TRepositoryFactory.New(), nick.shortcut.repository.ShortCut.GetShortCutRepository()); 74 | LFrame.Align := alClient; 75 | LFrame.Parent := AFrame; 76 | LFrame.Visible := True; 77 | end; 78 | 79 | function TKnownShortcutsRegistration.GetArea: string; 80 | begin 81 | Result := ''; 82 | end; 83 | 84 | function TKnownShortcutsRegistration.GetCaption: string; 85 | begin 86 | Result := nick.shortcut.core.ShortCutFinderRegistration.cCAPTION + '.' + cCAPTION; 87 | end; 88 | 89 | function TKnownShortcutsRegistration.GetFrameClass: TCustomFrameClass; 90 | begin 91 | Result := TFrame; 92 | end; 93 | 94 | function TKnownShortcutsRegistration.GetHelpContext: Integer; 95 | begin 96 | Result := 0; 97 | end; 98 | 99 | function TKnownShortcutsRegistration.IncludeInIDEInsight: Boolean; 100 | begin 101 | Result := True; 102 | end; 103 | 104 | function TKnownShortcutsRegistration.ValidateContents: Boolean; 105 | begin 106 | Result := True; 107 | end; 108 | {$ENDREGION} 109 | 110 | procedure UnregisterOptionPage; 111 | var 112 | LNTAEnvironmentOptionsServices : INTAEnvironmentOptionsServices; 113 | begin 114 | if Assigned(FKnownShortcutsRegistration) then 115 | begin 116 | {$IFDEF VER220} 117 | if not SysUtils.Supports(ToolsAPI.BorlandIDEServices, INTAEnvironmentOptionsServices, LNTAEnvironmentOptionsServices) then 118 | Exit; 119 | {$ELSE} 120 | if not System.SysUtils.Supports(ToolsAPI.BorlandIDEServices, INTAEnvironmentOptionsServices, LNTAEnvironmentOptionsServices) then 121 | Exit; 122 | {$ENDIF} 123 | 124 | LNTAEnvironmentOptionsServices.UnregisterAddInOptions(FKnownShortcutsRegistration); 125 | end; 126 | end; 127 | 128 | initialization 129 | 130 | finalization 131 | UnregisterOptionPage(); 132 | 133 | end. 134 | 135 | -------------------------------------------------------------------------------- /Source/nick.shortcut.core.SearchRegisteredShortcutsRegistration.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.core.SearchRegisteredShortcutsRegistration; 2 | 3 | interface 4 | 5 | procedure Register; 6 | 7 | implementation 8 | 9 | uses 10 | ToolsApi, 11 | {$IFDEF VER220} 12 | Forms, 13 | SysUtils, 14 | Controls, 15 | {$ELSE} 16 | Vcl.Forms, 17 | System.SysUtils, 18 | Vcl.Controls, 19 | {$ENDIF} 20 | nick.shortcut.frame.SearchRegisteredShortcuts, 21 | nick.shortcut.core.ShortCutFinderRegistration, 22 | nick.shortcut.factory.Repository; 23 | 24 | type 25 | TSearchRegisteredShortcutsRegistration = class(TInterfacedObject, INTAAddInOptions) 26 | public 27 | { INTAAddInOptions } 28 | function GetArea: string; 29 | function GetCaption: string; 30 | function GetFrameClass: TCustomFrameClass; 31 | procedure FrameCreated(AFrame: TCustomFrame); 32 | procedure DialogClosed(Accepted: Boolean); 33 | function ValidateContents: Boolean; 34 | function GetHelpContext: Integer; 35 | function IncludeInIDEInsight: Boolean; 36 | end; 37 | 38 | const 39 | cCAPTION = 'Search Registered Shortcuts'; 40 | 41 | var 42 | FSearchRegisteredShortcutsRegistration : TSearchRegisteredShortcutsRegistration = nil; 43 | 44 | procedure Register; 45 | var 46 | LNTAEnvironmentOptionsServices : INTAEnvironmentOptionsServices; 47 | begin 48 | {$IFDEF VER220} 49 | if not SysUtils.Supports(ToolsAPI.BorlandIDEServices, INTAEnvironmentOptionsServices, LNTAEnvironmentOptionsServices) then 50 | Exit; 51 | {$ELSE} 52 | if not System.SysUtils.Supports(ToolsAPI.BorlandIDEServices, INTAEnvironmentOptionsServices, LNTAEnvironmentOptionsServices) then 53 | Exit; 54 | {$ENDIF} 55 | 56 | FSearchRegisteredShortcutsRegistration := TSearchRegisteredShortcutsRegistration.Create; 57 | LNTAEnvironmentOptionsServices.RegisterAddInOptions(FSearchRegisteredShortcutsRegistration); 58 | end; 59 | 60 | { TDelphiKeyAllocations } 61 | 62 | {$REGION 'INTAAddInOptions'} 63 | procedure TSearchRegisteredShortcutsRegistration.DialogClosed(Accepted: Boolean); 64 | begin 65 | // Do nothing / Do not care about it 66 | end; 67 | 68 | procedure TSearchRegisteredShortcutsRegistration.FrameCreated(AFrame: TCustomFrame); 69 | var 70 | LFrame : TFrame; 71 | begin 72 | LFrame := TfrmSearchRegisteredShortcuts.Create(AFrame, TRepositoryFactory.New()); 73 | LFrame.Align := alClient; 74 | LFrame.Parent := AFrame; 75 | LFrame.Visible := True; 76 | end; 77 | 78 | function TSearchRegisteredShortcutsRegistration.GetArea: string; 79 | begin 80 | Result := ''; 81 | end; 82 | 83 | function TSearchRegisteredShortcutsRegistration.GetCaption: string; 84 | begin 85 | Result := nick.shortcut.core.ShortCutFinderRegistration.cCAPTION + '.' + cCAPTION; 86 | end; 87 | 88 | function TSearchRegisteredShortcutsRegistration.GetFrameClass: TCustomFrameClass; 89 | begin 90 | Result := TFrame; 91 | end; 92 | 93 | function TSearchRegisteredShortcutsRegistration.GetHelpContext: Integer; 94 | begin 95 | Result := 0; 96 | end; 97 | 98 | function TSearchRegisteredShortcutsRegistration.IncludeInIDEInsight: Boolean; 99 | begin 100 | Result := True; 101 | end; 102 | 103 | function TSearchRegisteredShortcutsRegistration.ValidateContents: Boolean; 104 | begin 105 | Result := True; 106 | end; 107 | {$ENDREGION} 108 | 109 | procedure UnregisterOptionPage; 110 | var 111 | LNTAEnvironmentOptionsServices : INTAEnvironmentOptionsServices; 112 | begin 113 | if Assigned(FSearchRegisteredShortcutsRegistration) then 114 | begin 115 | {$IFDEF VER220} 116 | if not SysUtils.Supports(ToolsAPI.BorlandIDEServices, INTAEnvironmentOptionsServices, LNTAEnvironmentOptionsServices) then 117 | Exit; 118 | {$ELSE} 119 | if not System.SysUtils.Supports(ToolsAPI.BorlandIDEServices, INTAEnvironmentOptionsServices, LNTAEnvironmentOptionsServices) then 120 | Exit; 121 | {$ENDIF} 122 | 123 | LNTAEnvironmentOptionsServices.UnregisterAddInOptions(FSearchRegisteredShortcutsRegistration); 124 | end; 125 | end; 126 | 127 | initialization 128 | 129 | finalization 130 | UnregisterOptionPage(); 131 | 132 | end. 133 | 134 | -------------------------------------------------------------------------------- /Source/nick.shortcut.core.ShortCutFinderRegistration.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.core.ShortCutFinderRegistration; 2 | 3 | interface 4 | 5 | procedure Register; 6 | 7 | const 8 | cCAPTION = 'Delphi Shortcut Finder'; 9 | 10 | {$R ShortcutFinderImages.res} 11 | 12 | implementation 13 | 14 | uses 15 | ToolsApi, 16 | {$IFDEF VER220} 17 | Forms, 18 | SysUtils, 19 | Controls, 20 | Menus, 21 | ActnList, 22 | Windows, 23 | {$ELSE} 24 | Vcl.Forms, 25 | System.SysUtils, 26 | Vcl.Controls, 27 | Vcl.Menus, 28 | Vcl.ActnList, 29 | Winapi.Windows, 30 | {$ENDIF} 31 | nick.shortcut.frame.ShortCutKeyAllocation, 32 | nick.shortcut.factory.Repository; 33 | 34 | type 35 | TDelphiShortCutFinderRegistration = class(TNotifierObject, (*INTAAddInOptions, *)IOTAWizard(*, IOTAMenuWizard*)) 36 | private 37 | FAddPluginInfoIndex: Integer; 38 | FAboutboxSplashScreenIcon : HBITMAP; 39 | FPluginSplashScreenIcon : HBITMAP; 40 | 41 | FExplorerAction: TAction; 42 | FExplorerMenuItem: TMenuItem; 43 | procedure ShowDelphiShortCutFinder(Sender : TObject); 44 | public 45 | constructor Create; 46 | destructor Destroy; override; 47 | 48 | { IOTAWizard } 49 | function GetIDString: string; 50 | function GetName: string; 51 | function GetState: TWizardState; 52 | procedure Execute; 53 | 54 | { IOTAMenuWizard } 55 | //function GetMenuText: string; 56 | end; 57 | 58 | const 59 | cIDE_TOOLS = 'IDE Tools'; 60 | //cVERSION = 'version 0.01 alpha'; 61 | //cMENU_ID_STRING = 'Delphi ShortCut Key Allocations'; 62 | cMENU_TEXT = cCAPTION; 63 | 64 | procedure Register; 65 | begin 66 | RegisterPackageWizard(TDelphiShortCutFinderRegistration.Create); 67 | end; 68 | 69 | { TDelphiKeyAllocations } 70 | 71 | constructor TDelphiShortCutFinderRegistration.Create; 72 | const 73 | cSHORTCUT_FINDER_ICON = 'SHORTCUT_FINDER_ICON'; 74 | var 75 | LOTAAboutBoxServices : IOTAAboutBoxServices; 76 | LNTAServices: INTAServices; 77 | LMainMenu: TMainMenu; 78 | LMenuItem: TMenuItem; 79 | lp: Integer; 80 | lp2: Integer; 81 | LParentMenu: TMenuItem; 82 | begin 83 | inherited Create; 84 | 85 | FPluginSplashScreenIcon := LoadBitmap(HInstance, cSHORTCUT_FINDER_ICON); 86 | SplashScreenServices.AddPluginBitmap('Delphi Shortcut Finder', FPluginSplashScreenIcon, False, 'Freeware'); 87 | 88 | {$IFDEF VER220} 89 | if SysUtils.Supports(ToolsAPI.BorlandIDEServices, IOTAAboutBoxServices, LOTAAboutBoxServices) then 90 | {$ELSE} 91 | if System.SysUtils.Supports(ToolsAPI.BorlandIDEServices, IOTAAboutBoxServices, LOTAAboutBoxServices) then 92 | {$ENDIF} 93 | begin 94 | if (FAboutboxSplashScreenIcon = 0) then 95 | FAboutboxSplashScreenIcon := LoadBitmap(HInstance, cSHORTCUT_FINDER_ICON); 96 | 97 | FAddPluginInfoIndex := LOTAAboutBoxServices.AddPluginInfo(cCAPTION, 98 | 'Finds registered and conflicting shortcuts', 99 | FAboutboxSplashScreenIcon, 100 | False, 101 | 'Freeware', 102 | ''); 103 | end; 104 | 105 | {$IFDEF VER220} 106 | if not SysUtils.Supports(BorlandIDEServices, INTAServices, LNTAServices) then 107 | Exit; 108 | {$ELSE} 109 | if not System.SysUtils.Supports(BorlandIDEServices, INTAServices, LNTAServices) then 110 | Exit; 111 | {$ENDIF} 112 | 113 | FExplorerAction := TAction.Create(nil); 114 | FExplorerAction.ActionList := LNTAServices.ActionList; 115 | FExplorerAction.Caption := GetName; 116 | FExplorerAction.Hint := 'Show the Delphi Shortcut Finder window'; 117 | FExplorerAction.OnExecute := ShowDelphiShortCutFinder; 118 | 119 | LMainMenu := LNTAServices.MainMenu; 120 | for lp := 0 to LMainMenu.Items.Count - 1 do 121 | begin 122 | LMenuItem := LMainMenu.Items[lp]; 123 | if not SameText(LMenuItem.Name, 'ToolsMenu') then 124 | Continue; 125 | 126 | LParentMenu := LMenuItem.Find(cIDE_TOOLS); 127 | 128 | if not Assigned(LParentMenu) then 129 | begin 130 | LParentMenu := TMenuItem.Create(LMenuItem); 131 | LParentMenu.Caption := cIDE_TOOLS; 132 | 133 | for lp2 := 0 to LMenuItem.Count - 1 do 134 | begin 135 | if (not LMenuItem.Items[lp2].IsLine) then 136 | Continue; 137 | 138 | LMenuItem.Insert(lp2 + 1, LParentMenu); 139 | LMenuItem.InsertNewLineAfter(LParentMenu); 140 | Break; 141 | end; 142 | end; 143 | 144 | FExplorerMenuItem := TMenuItem.Create(LMainMenu); 145 | FExplorerMenuItem.Action := FExplorerAction; 146 | LParentMenu.Insert(0, FExplorerMenuItem); 147 | 148 | Break; 149 | end; 150 | end; 151 | 152 | destructor TDelphiShortCutFinderRegistration.Destroy; 153 | var 154 | LOTAAboutBoxServices : IOTAAboutBoxServices; 155 | LParentMenuItem: TMenuItem; 156 | begin 157 | if (FAddPluginInfoIndex <> 0) then 158 | begin 159 | {$IFDEF VER220} 160 | if SysUtils.Supports(ToolsAPI.BorlandIDEServices, IOTAAboutBoxServices, LOTAAboutBoxServices) then 161 | LOTAAboutBoxServices.RemovePluginInfo(FAddPluginInfoIndex); 162 | {$ELSE} 163 | if System.SysUtils.Supports(ToolsAPI.BorlandIDEServices, IOTAAboutBoxServices, LOTAAboutBoxServices) then 164 | LOTAAboutBoxServices.RemovePluginInfo(FAddPluginInfoIndex); 165 | {$ENDIF} 166 | end; 167 | 168 | FAddPluginInfoIndex := 0; 169 | 170 | if Assigned(FExplorerMenuItem) then 171 | begin 172 | LParentMenuItem := FExplorerMenuItem.Parent; 173 | FExplorerMenuItem.Free; 174 | 175 | if (LParentMenuItem.Count = 0) then 176 | LParentMenuItem.Free; 177 | end; 178 | 179 | FExplorerAction.Free; 180 | 181 | inherited; 182 | end; 183 | 184 | {$REGION 'IOTAWizard'} 185 | function TDelphiShortCutFinderRegistration.GetIDString: string; 186 | begin 187 | Result := 'nick.toolsapi.shortcut.ShortCutFinder'; 188 | end; 189 | 190 | function TDelphiShortCutFinderRegistration.GetName: string; 191 | begin 192 | Result := cCAPTION; 193 | end; 194 | 195 | function TDelphiShortCutFinderRegistration.GetState: TWizardState; 196 | begin 197 | Result := [wsEnabled]; 198 | end; 199 | 200 | procedure TDelphiShortCutFinderRegistration.ShowDelphiShortCutFinder(Sender: TObject); 201 | begin 202 | Execute; 203 | end; 204 | 205 | procedure TDelphiShortCutFinderRegistration.Execute; 206 | var 207 | LForm : TForm; 208 | LFrame : TFrame; 209 | begin 210 | LForm := TForm.Create(nil); 211 | try 212 | LForm.Caption := cCAPTION; 213 | LForm.BorderIcons := [biSystemMenu]; 214 | 215 | LFrame := TfrmShortCutKeyAllocation.Create(LForm, TRepositoryFactory.New()); 216 | 217 | LForm.ClientWidth := LFrame.Width; 218 | LForm.ClientHeight := LFrame.Height; 219 | 220 | LFrame.Parent := LForm; 221 | LFrame.Align := alClient; 222 | 223 | LForm.Position := poOwnerFormCenter; 224 | // LForm.PopupParent := Application.MainForm; 225 | 226 | LForm.ShowModal; 227 | finally 228 | LForm.Free; 229 | end; 230 | end; 231 | {$ENDREGION} 232 | 233 | {$REGION 'IOTAMenuWizard'} 234 | //function TDelphiShortCutFinderRegistration.GetMenuText: string; 235 | //begin 236 | // Result := cMENU_TEXT; 237 | //end; 238 | {$ENDREGION} 239 | 240 | end. 241 | 242 | -------------------------------------------------------------------------------- /Source/nick.shortcut.core.ShortCutItem.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.core.ShortCutItem; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.repository.ISystem; 7 | 8 | type 9 | IShortCutItem = interface 10 | ['{8763284E-F82E-4FD2-AD17-7830FB5D6400}'] 11 | function GetDescription: string; 12 | function GetPrimary: TShortCut; 13 | function GetSecondary: TShortCut; 14 | function GetDetails: string; 15 | 16 | property Details : string read GetDetails; 17 | property Primary : TShortCut read GetPrimary; 18 | property Secondary : TShortCut read GetSecondary; 19 | property Description : string read GetDescription; 20 | end; 21 | 22 | function NewShortCut(const ADetails : string; const APrimary : TShortCut; const ASecondary : TShortCut; const ADescription : string) : IShortCutItem; 23 | 24 | implementation 25 | 26 | type 27 | TShortCutItem = class(TInterfacedObject, IShortCutItem) 28 | private 29 | FDetails : string; 30 | FPrimary : TShortCut; 31 | FSecondary : TShortCut; 32 | FDescription : string; 33 | 34 | function GetDetails: string; 35 | function GetPrimary: TShortCut; 36 | function GetSecondary: TShortCut; 37 | function GetDescription: string; 38 | public 39 | constructor Create(const ADetails : string; const APrimary : TShortCut; const ASecondary : TShortCut; const ADescription : string); 40 | 41 | property Details : string read GetDetails; 42 | property Primary : TShortCut read GetPrimary; 43 | property Secondary : TShortCut read GetSecondary; 44 | property Description : string read GetDescription; 45 | end; 46 | 47 | function NewShortCut(const ADetails : string; const APrimary : TShortCut; const ASecondary : TShortCut; const ADescription : string) : IShortCutItem; 48 | begin 49 | Result := TShortCutItem.Create(ADetails, APrimary, ASecondary, ADescription); 50 | end; 51 | 52 | constructor TShortCutItem.Create(const ADetails : string; 53 | const APrimary : TShortCut; 54 | const ASecondary : TShortCut; 55 | const ADescription : string); 56 | begin 57 | inherited Create; 58 | 59 | FDetails := ADetails; 60 | FPrimary := APrimary; 61 | FSecondary := ASecondary; 62 | FDescription := ADescription; 63 | end; 64 | 65 | function TShortCutItem.GetDescription: string; 66 | begin 67 | Result := FDescription; 68 | end; 69 | 70 | function TShortCutItem.GetDetails: string; 71 | begin 72 | Result := FDetails; 73 | end; 74 | 75 | function TShortCutItem.GetPrimary: TShortCut; 76 | begin 77 | Result := FPrimary; 78 | end; 79 | 80 | function TShortCutItem.GetSecondary: TShortCut; 81 | begin 82 | Result := FSecondary; 83 | end; 84 | 85 | end. 86 | -------------------------------------------------------------------------------- /Source/nick.shortcut.core.ShortCutList.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.core.ShortCutList; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.core.IShortCutList, 7 | nick.shortcut.core.ShortCutItem, 8 | nick.shortcut.factory.IRepository, 9 | nick.shortcut.repository.IIniFile, 10 | nick.shortcut.repository.IRegistry, 11 | nick.shortcut.repository.IXmlFile, 12 | nick.shortcut.repository.ISystem, 13 | {$IFDEF VER220} 14 | Generics.Collections; 15 | {$ELSE} 16 | System.Generics.Collections; 17 | {$ENDIF} 18 | 19 | type 20 | TShortCutListClass = class of TShortCutList; 21 | TShortCutList = class abstract(TInterfacedObject, IShortCutList) 22 | private 23 | FCacheRepositories : Boolean; 24 | FShortCutItemList : TList; 25 | FRepositoryFactory : IRepositoryFactory; 26 | FIniFileRepository : IIniFileRepository; 27 | FRegistryRepository : IRegistryRepository; 28 | FXmlFileRepository : IXmlFileRepository; 29 | FSystemRepository : ISystemRepository; 30 | 31 | function GetShortCut(const AIndex : Integer) : IShortCutItem; 32 | protected 33 | function RepositoryFactory() : IRepositoryFactory; 34 | 35 | function GetName() : string; virtual; abstract; 36 | function GetDescription() : string; virtual; 37 | procedure PopulateShortCuts(); virtual; abstract; 38 | public 39 | constructor Create(const ARepositoryFactory : IRepositoryFactory); virtual; 40 | destructor Destroy; override; 41 | 42 | procedure Add(const AShortCutItem : IShortCutItem); 43 | 44 | function IniFileRepository() : IIniFileRepository; 45 | function XmlFileRepository() : IXmlFileRepository; 46 | function RegistryRepository() : IRegistryRepository; 47 | function SystemRepository() : ISystemRepository; 48 | 49 | procedure RetrieveShortCuts(); 50 | 51 | function IsUseable() : Boolean; virtual; 52 | 53 | function Count() : Integer; 54 | 55 | property Name : string read GetName; 56 | property ShortCut [const AIndex : Integer] : IShortCutItem read GetShortCut; 57 | end; 58 | 59 | implementation 60 | 61 | uses 62 | {$IFDEF VER220} 63 | SysUtils, 64 | Classes; 65 | {$ELSE} 66 | System.SysUtils, 67 | System.Classes; 68 | {$ENDIF} 69 | 70 | constructor TShortCutList.Create(const ARepositoryFactory : IRepositoryFactory); 71 | begin 72 | inherited Create; 73 | FShortCutItemList := TList.Create; 74 | FRepositoryFactory := ARepositoryFactory; 75 | 76 | FCacheRepositories := True; 77 | end; 78 | 79 | destructor TShortCutList.Destroy; 80 | begin 81 | FShortCutItemList.Free; 82 | inherited; 83 | end; 84 | 85 | function TShortCutList.GetDescription: string; 86 | begin 87 | Result := ''; 88 | end; 89 | 90 | procedure TShortCutList.Add(const AShortCutItem: IShortCutItem); 91 | begin 92 | if (AShortCutItem.Primary <> scNone) or 93 | (AShortCutItem.Secondary <> scNone) then 94 | begin 95 | FShortCutItemList.Add(AShortCutItem); 96 | end; 97 | end; 98 | 99 | function TShortCutList.Count: Integer; 100 | begin 101 | Result := FShortCutItemList.Count; 102 | end; 103 | 104 | function TShortCutList.GetShortCut(const AIndex: Integer): IShortCutItem; 105 | begin 106 | Result := FShortCutItemList.Items[AIndex]; 107 | end; 108 | 109 | function TShortCutList.IniFileRepository: IIniFileRepository; 110 | begin 111 | if (not Assigned(FIniFileRepository)) or (not FCacheRepositories) then 112 | FIniFileRepository := FRepositoryFactory.IniFileRepository(); 113 | Result := FIniFileRepository; 114 | end; 115 | 116 | function TShortCutList.IsUseable: Boolean; 117 | begin 118 | Result := False; 119 | end; 120 | 121 | function TShortCutList.RegistryRepository: IRegistryRepository; 122 | begin 123 | if (not Assigned(FRegistryRepository)) or (not FCacheRepositories) then 124 | FRegistryRepository := FRepositoryFactory.RegistryRepository(); 125 | Result := FRegistryRepository; 126 | end; 127 | 128 | function TShortCutList.RepositoryFactory: IRepositoryFactory; 129 | begin 130 | Result := FRepositoryFactory; 131 | end; 132 | 133 | procedure TShortCutList.RetrieveShortCuts; 134 | begin 135 | try 136 | PopulateShortCuts(); 137 | finally 138 | FRepositoryFactory := nil; 139 | FIniFileRepository := nil; 140 | FRegistryRepository := nil; 141 | end; 142 | end; 143 | 144 | function TShortCutList.XmlFileRepository: IXmlFileRepository; 145 | begin 146 | if (not Assigned(FXmlFileRepository)) or (not FCacheRepositories) then 147 | FXmlFileRepository := FRepositoryFactory.XmlFileRepository(); 148 | Result := FXmlFileRepository; 149 | end; 150 | 151 | function TShortCutList.SystemRepository: ISystemRepository; 152 | begin 153 | if (not Assigned(FSystemRepository)) or (not FCacheRepositories) then 154 | FSystemRepository := FRepositoryFactory.SystemRepository(); 155 | Result := FSystemRepository; 156 | end; 157 | 158 | end. 159 | 160 | -------------------------------------------------------------------------------- /Source/nick.shortcut.core.ShortcutExport.pas: -------------------------------------------------------------------------------- 1 | unit nick.shortcut.core.ShortcutExport; 2 | 3 | interface 4 | 5 | uses 6 | nick.shortcut.other.VirtualKeys, 7 | nick.shortcut.factory.IRepository, 8 | {$IFDEF VER220} 9 | Forms; 10 | {$ELSE} 11 | Vcl.Forms; 12 | {$ENDIF} 13 | 14 | type 15 | {$SCOPEDENUMS ON} 16 | TDetailsType = (None, IDE, OperatingSystem); 17 | {$SCOPEDENUMS OFF} 18 | 19 | type 20 | IShortcutExport = interface 21 | ['{AB7FF5A1-EE46-4E7A-A2C4-C1AC4E3EC6CC}'] 22 | function FileExtension : string; 23 | 24 | function InitialiseExport(const AFileName : string; out AExportData : Pointer) : Boolean; 25 | procedure FinaliseExport(const AExportData : Pointer); 26 | 27 | procedure StartHeader(const AExportData : Pointer); 28 | procedure AddHeader(const AExportData : Pointer; const AHeader : string); 29 | procedure EndHeader(const AExportData : Pointer); 30 | 31 | procedure StartKey(const AExportData : Pointer; const AVirtualKeyDetail: TVirtualKeyDetail); 32 | procedure EndKey(const AExportData : Pointer); 33 | 34 | procedure StartKeyWithModifier(const AExportData : Pointer); 35 | procedure AddKeyWithModifierDetails(const AExportData : Pointer; const ADetails : string; const ADetailsType : TDetailsType); 36 | procedure EndKeyWithModifier(const AExportData : Pointer); 37 | end; 38 | 39 | type 40 | TShortcutExportClass = class of TShortcutExport; 41 | TShortcutExport = class abstract(TInterfacedObject, IShortcutExport) 42 | private 43 | FRepositoryFactory : IRepositoryFactory; 44 | protected 45 | property RepositoryFactory : IRepositoryFactory read FRepositoryFactory; 46 | public 47 | class function ExportName() : string; virtual; 48 | 49 | constructor Create(const ARepositoryFactory : IRepositoryFactory); virtual; 50 | 51 | function FileExtension : string; virtual; 52 | 53 | function InitialiseExport(const AFileName : string; out AExportData : Pointer) : Boolean; virtual; 54 | procedure FinaliseExport(const AExportData : Pointer); virtual; abstract; 55 | 56 | procedure StartHeader(const AExportData : Pointer); virtual; abstract; 57 | procedure AddHeader(const AExportData : Pointer; const AHeader : string); virtual; abstract; 58 | procedure EndHeader(const AExportData : Pointer); virtual; abstract; 59 | 60 | procedure StartKey(const AExportData : Pointer; const AVirtualKeyDetail: TVirtualKeyDetail); virtual; abstract; 61 | procedure EndKey(const AExportData : Pointer); virtual; abstract; 62 | 63 | procedure StartKeyWithModifier(const AExportData : Pointer); virtual; abstract; 64 | procedure AddKeyWithModifierDetails(const AExportData : Pointer; const ADetails : string; const ADetailsType : TDetailsType); virtual; abstract; 65 | procedure EndKeyWithModifier(const AExportData : Pointer); virtual; abstract; 66 | end; 67 | 68 | implementation 69 | 70 | { TShortcutExport } 71 | 72 | constructor TShortcutExport.Create(const ARepositoryFactory : IRepositoryFactory); 73 | begin 74 | inherited Create; 75 | FRepositoryFactory := ARepositoryFactory; 76 | end; 77 | 78 | function TShortcutExport.FileExtension: string; 79 | begin 80 | Result := ''; 81 | end; 82 | 83 | function TShortcutExport.InitialiseExport(const AFileName : string; out AExportData : Pointer): Boolean; 84 | begin 85 | AExportData := nil; 86 | Result := False; 87 | end; 88 | 89 | class function TShortcutExport.ExportName: string; 90 | begin 91 | Result := ''; 92 | end; 93 | 94 | end. 95 | 96 | --------------------------------------------------------------------------------