Skip to content
This repository was archived by the owner on Jan 30, 2019. It is now read-only.
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions HIDInjector/app/HidInject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,11 @@ BOOL SetKeybaordUsage(HIDINJECTOR_INPUT_REPORT *Rep, UCHAR Usage)
}
else if (Rep->Report.KeyReport.Key3 == 0)
{
Rep->Report.KeyReport.Key2 = Usage;
Rep->Report.KeyReport.Key3 = Usage;
}
else if (Rep->Report.KeyReport.Key4 == 0)
{
Rep->Report.KeyReport.Key2 = Usage;
Rep->Report.KeyReport.Key4 = Usage;
}
else
{
Expand Down Expand Up @@ -359,18 +359,18 @@ BOOL ClearKeyboardUsage(HIDINJECTOR_INPUT_REPORT *Rep, UCHAR Usage)
{
Rep->Report.KeyReport.Key4 = 0;
}
if (Rep->Report.KeyReport.Key3 == Usage)
else if (Rep->Report.KeyReport.Key3 == Usage)
{
Rep->Report.KeyReport.Key3 = Rep->Report.KeyReport.Key4;
Rep->Report.KeyReport.Key4 = 0;
}
if (Rep->Report.KeyReport.Key2 == Usage)
else if (Rep->Report.KeyReport.Key2 == Usage)
{
Rep->Report.KeyReport.Key2 = Rep->Report.KeyReport.Key3;
Rep->Report.KeyReport.Key3 = Rep->Report.KeyReport.Key4;
Rep->Report.KeyReport.Key4 = 0;
}
if (Rep->Report.KeyReport.Key1 == Usage)
else if (Rep->Report.KeyReport.Key1 == Usage)
{
Rep->Report.KeyReport.Key1 = Rep->Report.KeyReport.Key2;
Rep->Report.KeyReport.Key2 = Rep->Report.KeyReport.Key3;
Expand All @@ -389,4 +389,4 @@ BOOL ClearKeyboardUsage(HIDINJECTOR_INPUT_REPORT *Rep, UCHAR Usage)
}
return TRUE;

}
}