Skip to content

Commit

Permalink
Version 1.4.201
Browse files Browse the repository at this point in the history
Fixed Scan Code
  • Loading branch information
Jays2Kings committed Dec 13, 2014
1 parent 7673d63 commit 1d31d71
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 19 deletions.
25 changes: 8 additions & 17 deletions DS4Control/Mapping.cs
Original file line number Diff line number Diff line change
Expand Up @@ -177,35 +177,30 @@ public static void Commit(int device)
if (gkp.current.toggleCount != 0 && gkp.previous.toggleCount == 0 && gkp.current.toggle)
{
if (gkp.current.scanCodeCount != 0)
InputMethods.PressKeys(kvp.Key);
//InputMethods.performSCKeyPress(kvp.Key);
InputMethods.performSCKeyPress(kvp.Key);
else
InputMethods.PressKeys(kvp.Key);
// InputMethods.performKeyPress(kvp.Key);
InputMethods.performKeyPress(kvp.Key);
}
else if (gkp.current.toggleCount != 0 && gkp.previous.toggleCount == 0 && !gkp.current.toggle)
{
if (gkp.previous.scanCodeCount != 0) // use the last type of VK/SC
InputMethods.performSCKeyRelease(kvp.Key);
else
InputMethods.ReleaseKeys(kvp.Key);
//InputMethods.performKeyRelease(kvp.Key);
InputMethods.performKeyRelease(kvp.Key);
}
else if (gkp.current.vkCount + gkp.current.scanCodeCount != 0 && gkp.previous.vkCount + gkp.previous.scanCodeCount == 0)
{
if (gkp.current.scanCodeCount != 0)
{
oldnow = DateTime.UtcNow;
InputMethods.PressKeys(kvp.Key);
//InputMethods.performSCKeyPress(kvp.Key);
InputMethods.performSCKeyPress(kvp.Key);
pressagain = false;
keyshelddown = kvp.Key;
}
else
{
oldnow = DateTime.UtcNow;
InputMethods.PressKeys(kvp.Key);
//InputMethods.performKeyPress(kvp.Key);
InputMethods.performKeyPress(kvp.Key);
pressagain = false;
keyshelddown = kvp.Key;
}
Expand All @@ -227,8 +222,7 @@ public static void Commit(int device)
if (now >= oldnow + TimeSpan.FromMilliseconds(25) && pressagain)
{
oldnow = now;
//InputMethods.performSCKeyPress(kvp.Key);
InputMethods.PressKeys(kvp.Key);
InputMethods.performSCKeyPress(kvp.Key);
}
}
else if (pressagain)
Expand All @@ -237,8 +231,7 @@ public static void Commit(int device)
if (now >= oldnow + TimeSpan.FromMilliseconds(25) && pressagain)
{
oldnow = now;
InputMethods.PressKeys(kvp.Key);
//InputMethods.performKeyPress(kvp.Key);
InputMethods.performKeyPress(kvp.Key);
}
}
}
Expand All @@ -248,13 +241,11 @@ public static void Commit(int device)
if (gkp.previous.scanCodeCount != 0) // use the last type of VK/SC
{
InputMethods.performSCKeyRelease(kvp.Key);
//InputMethods.performKeyRelease(kvp.Key);
pressagain = false;
}
else
{
InputMethods.ReleaseKeys(kvp.Key);
//InputMethods.performKeyRelease(kvp.Key);
InputMethods.performKeyRelease(kvp.Key);
pressagain = false;
}
}
Expand Down
4 changes: 2 additions & 2 deletions DS4Tool/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.4.2")]
[assembly: AssemblyFileVersion("1.4.2")]
[assembly: AssemblyVersion("1.4.201")]
[assembly: AssemblyFileVersion("1.4.201")]

0 comments on commit 1d31d71

Please sign in to comment.