-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
12 changed files
with
1,170 additions
and
0 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<CONFIG> | ||
<ProjectOptions> | ||
<Version Value="10"/> | ||
<General> | ||
<SessionStorage Value="InProjectDir"/> | ||
<MainUnit Value="0"/> | ||
<Title Value="ledkey"/> | ||
<ResourceType Value="res"/> | ||
<UseXPManifest Value="True"/> | ||
</General> | ||
<BuildModes Count="1"> | ||
<Item1 Name="Default" Default="True"/> | ||
</BuildModes> | ||
<PublishOptions> | ||
<Version Value="2"/> | ||
</PublishOptions> | ||
<RunParams> | ||
<local> | ||
<FormatVersion Value="1"/> | ||
</local> | ||
</RunParams> | ||
<RequiredPackages Count="3"> | ||
<Item1> | ||
<PackageName Value="pl_exsystem"/> | ||
</Item1> | ||
<Item2> | ||
<PackageName Value="codebot"/> | ||
</Item2> | ||
<Item3> | ||
<PackageName Value="LCL"/> | ||
</Item3> | ||
</RequiredPackages> | ||
<Units Count="2"> | ||
<Unit0> | ||
<Filename Value="ledkey.lpr"/> | ||
<IsPartOfProject Value="True"/> | ||
</Unit0> | ||
<Unit1> | ||
<Filename Value="munit.pas"/> | ||
<IsPartOfProject Value="True"/> | ||
<ComponentName Value="HideFrm"/> | ||
<HasResources Value="True"/> | ||
<ResourceBaseClass Value="DataModule"/> | ||
<UnitName Value="mUnit"/> | ||
</Unit1> | ||
</Units> | ||
</ProjectOptions> | ||
<CompilerOptions> | ||
<Version Value="11"/> | ||
<Target> | ||
<Filename Value="../bin/$(TargetCPU)-$(TargetOS)/ledkey"/> | ||
</Target> | ||
<SearchPaths> | ||
<IncludeFiles Value="$(ProjOutDir)"/> | ||
<UnitOutputDirectory Value="../lib/$(TargetCPU)-$(TargetOS)"/> | ||
</SearchPaths> | ||
<Linking> | ||
<Debugging> | ||
<GenerateDebugInfo Value="False"/> | ||
</Debugging> | ||
<Options> | ||
<Win32> | ||
<GraphicApplication Value="True"/> | ||
</Win32> | ||
</Options> | ||
</Linking> | ||
</CompilerOptions> | ||
<Debugging> | ||
<Exceptions Count="3"> | ||
<Item1> | ||
<Name Value="EAbort"/> | ||
</Item1> | ||
<Item2> | ||
<Name Value="ECodetoolError"/> | ||
</Item2> | ||
<Item3> | ||
<Name Value="EFOpenError"/> | ||
</Item3> | ||
</Exceptions> | ||
</Debugging> | ||
</CONFIG> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
program ledkey; | ||
|
||
{$mode objfpc}{$H+} | ||
|
||
uses | ||
{$IFDEF UNIX}{$IFDEF UseCThreads} | ||
cthreads, | ||
{$ENDIF}{$ENDIF} | ||
Interfaces, | ||
Forms, mUnit, ExSystemUtils | ||
{ you can add units after this }; | ||
|
||
{$R *.res} | ||
|
||
begin | ||
LSGlobalAddAtom(CMyAppAtom); | ||
LSRunOnce; | ||
//RequireDerivedFormResource:=True; | ||
Application.Initialize; | ||
Application.CreateForm(THideFrm, HideFrm); | ||
Application.Run; | ||
end. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<CONFIG> | ||
<ProjectSession> | ||
<Version Value="10"/> | ||
<BuildModes Active="Default"/> | ||
<Units Count="7"> | ||
<Unit0> | ||
<Filename Value="ledkey.lpr"/> | ||
<IsPartOfProject Value="True"/> | ||
<CursorPos X="30" Y="16"/> | ||
<UsageCount Value="20"/> | ||
<Loaded Value="True"/> | ||
</Unit0> | ||
<Unit1> | ||
<Filename Value="munit.pas"/> | ||
<IsPartOfProject Value="True"/> | ||
<ComponentName Value="HideFrm"/> | ||
<HasResources Value="True"/> | ||
<ResourceBaseClass Value="DataModule"/> | ||
<UnitName Value="mUnit"/> | ||
<IsVisibleTab Value="True"/> | ||
<EditorIndex Value="2"/> | ||
<TopLine Value="10"/> | ||
<CursorPos Y="27"/> | ||
<UsageCount Value="20"/> | ||
<Loaded Value="True"/> | ||
<LoadedDesigner Value="True"/> | ||
</Unit1> | ||
<Unit2> | ||
<Filename Value="../../../fpcupdeluxe/fpcsrc/rtl/objpas/classes/classesh.inc"/> | ||
<EditorIndex Value="-1"/> | ||
<TopLine Value="2039"/> | ||
<CursorPos X="24" Y="2243"/> | ||
<UsageCount Value="10"/> | ||
</Unit2> | ||
<Unit3> | ||
<Filename Value="../../LedKey/src/munit.pas"/> | ||
<UnitName Value="mUnit"/> | ||
<EditorIndex Value="-1"/> | ||
<TopLine Value="37"/> | ||
<CursorPos X="48" Y="48"/> | ||
<UsageCount Value="10"/> | ||
</Unit3> | ||
<Unit4> | ||
<Filename Value="../../../Development/Cross.Codebot-master/source/codebot.input.hotkeys.pas"/> | ||
<UnitName Value="Codebot.Input.Hotkeys"/> | ||
<EditorIndex Value="-1"/> | ||
<TopLine Value="582"/> | ||
<CursorPos X="5" Y="640"/> | ||
<UsageCount Value="10"/> | ||
</Unit4> | ||
<Unit5> | ||
<Filename Value="../../../ct/CodeOcean/pl_ExSystem/samples/RunOnce/runoncemainfrm.pas"/> | ||
<ComponentName Value="MainForm"/> | ||
<HasResources Value="True"/> | ||
<ResourceBaseClass Value="Form"/> | ||
<UnitName Value="RunOnceMainFrm"/> | ||
<EditorIndex Value="3"/> | ||
<TopLine Value="6"/> | ||
<CursorPos Y="20"/> | ||
<UsageCount Value="10"/> | ||
<Loaded Value="True"/> | ||
</Unit5> | ||
<Unit6> | ||
<Filename Value="../../../ct/CodeOcean/pl_ExSystem/samples/RunOnce/RunOnceDemo.lpr"/> | ||
<EditorIndex Value="1"/> | ||
<CursorPos X="14" Y="15"/> | ||
<UsageCount Value="10"/> | ||
<Loaded Value="True"/> | ||
</Unit6> | ||
</Units> | ||
<JumpHistory Count="2" HistoryIndex="1"> | ||
<Position1> | ||
<Filename Value="ledkey.lpr"/> | ||
<Caret Line="10" Column="30"/> | ||
</Position1> | ||
<Position2> | ||
<Filename Value="ledkey.lpr"/> | ||
<Caret Line="18" Column="5"/> | ||
</Position2> | ||
</JumpHistory> | ||
</ProjectSession> | ||
</CONFIG> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
object HideFrm: THideFrm | ||
OnCreate = DataModuleCreate | ||
OnDestroy = DataModuleDestroy | ||
OldCreateOrder = False | ||
Height = 150 | ||
HorizontalOffset = 590 | ||
VerticalOffset = 250 | ||
Width = 150 | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
unit mUnit; | ||
|
||
{$mode objfpc}{$H+} | ||
|
||
interface | ||
|
||
uses | ||
Classes, SysUtils, FileUtil, Process, LCLType, Codebot.Input.Hotkeys; | ||
|
||
type | ||
|
||
{ THideFrm } | ||
THideFrm= class(TDataModule) | ||
procedure DataModuleCreate(Sender: TObject); | ||
procedure DataModuleDestroy(Sender: TObject); | ||
private | ||
LedState:Boolean; | ||
LedProcess: TProcess; | ||
procedure KeyNotify(Sender: TObject; Key: Word; Shift: TShiftState); | ||
public | ||
|
||
end; | ||
|
||
var | ||
HideFrm: THideFrm; | ||
|
||
implementation | ||
|
||
{$R *.lfm} | ||
|
||
{ THideFrm } | ||
|
||
procedure THideFrm.DataModuleCreate(Sender: TObject); | ||
begin | ||
HotkeyCapture.RegisterNotify(VK_SCROLL,[],@KeyNotify); | ||
end; | ||
|
||
procedure THideFrm.DataModuleDestroy(Sender: TObject); | ||
begin | ||
HotkeyCapture.UnRegisterNotify(VK_SCROLL,[]); | ||
end; | ||
|
||
procedure THideFrm.KeyNotify(Sender: TObject; Key: Word; Shift: TShiftState); | ||
begin | ||
LedProcess := TProcess.Create(nil); | ||
LedProcess.Options:=[poWaitOnExit,poNoConsole]; | ||
LedProcess.Executable := 'xset'; | ||
If LedState then | ||
begin | ||
LedProcess.Parameters.Add('-led'); | ||
LedState:=false; | ||
end else | ||
begin | ||
LedProcess.Parameters.Add('led'); | ||
LedState:=true; | ||
end; | ||
LedProcess.Parameters.Add('3'); | ||
LedProcess.Execute; | ||
LedProcess.Free; | ||
end; | ||
|
||
end. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<CONFIG> | ||
<ProjectOptions> | ||
<Version Value="10"/> | ||
<General> | ||
<SessionStorage Value="InProjectDir"/> | ||
<MainUnit Value="0"/> | ||
<Title Value="ledkey"/> | ||
<ResourceType Value="res"/> | ||
<UseXPManifest Value="True"/> | ||
</General> | ||
<BuildModes Count="1"> | ||
<Item1 Name="Default" Default="True"/> | ||
</BuildModes> | ||
<PublishOptions> | ||
<Version Value="2"/> | ||
</PublishOptions> | ||
<RunParams> | ||
<local> | ||
<FormatVersion Value="1"/> | ||
</local> | ||
</RunParams> | ||
<RequiredPackages Count="3"> | ||
<Item1> | ||
<PackageName Value="pl_exsystem"/> | ||
</Item1> | ||
<Item2> | ||
<PackageName Value="codebot"/> | ||
</Item2> | ||
<Item3> | ||
<PackageName Value="LCL"/> | ||
</Item3> | ||
</RequiredPackages> | ||
<Units Count="2"> | ||
<Unit0> | ||
<Filename Value="ledkey.lpr"/> | ||
<IsPartOfProject Value="True"/> | ||
</Unit0> | ||
<Unit1> | ||
<Filename Value="munit.pas"/> | ||
<IsPartOfProject Value="True"/> | ||
<ComponentName Value="HideFrm"/> | ||
<HasResources Value="True"/> | ||
<ResourceBaseClass Value="DataModule"/> | ||
<UnitName Value="mUnit"/> | ||
</Unit1> | ||
</Units> | ||
</ProjectOptions> | ||
<CompilerOptions> | ||
<Version Value="11"/> | ||
<Target> | ||
<Filename Value="../bin/$(TargetCPU)-$(TargetOS)/ledkey"/> | ||
</Target> | ||
<SearchPaths> | ||
<IncludeFiles Value="$(ProjOutDir)"/> | ||
<UnitOutputDirectory Value="../lib/$(TargetCPU)-$(TargetOS)"/> | ||
</SearchPaths> | ||
<Linking> | ||
<Debugging> | ||
<GenerateDebugInfo Value="False"/> | ||
</Debugging> | ||
<Options> | ||
<Win32> | ||
<GraphicApplication Value="True"/> | ||
</Win32> | ||
</Options> | ||
</Linking> | ||
</CompilerOptions> | ||
<Debugging> | ||
<Exceptions Count="3"> | ||
<Item1> | ||
<Name Value="EAbort"/> | ||
</Item1> | ||
<Item2> | ||
<Name Value="ECodetoolError"/> | ||
</Item2> | ||
<Item3> | ||
<Name Value="EFOpenError"/> | ||
</Item3> | ||
</Exceptions> | ||
</Debugging> | ||
</CONFIG> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
program ledkey; | ||
|
||
{$mode objfpc}{$H+} | ||
|
||
uses | ||
{$IFDEF UNIX}{$IFDEF UseCThreads} | ||
cthreads, | ||
{$ENDIF}{$ENDIF} | ||
Interfaces, | ||
Forms, mUnit, ExSystemUtils | ||
{ you can add units after this }; | ||
|
||
{$R *.res} | ||
|
||
begin | ||
LSGlobalAddAtom(cMyHookAtom); | ||
LSRunOnce; | ||
//RequireDerivedFormResource:=True; | ||
Application.Initialize; | ||
Application.CreateForm(THideFrm, HideFrm); | ||
Application.Run; | ||
end. | ||
|
Oops, something went wrong.