Version 1.4.201

Fixed Scan Code
This commit is contained in:
jays2kings 2014-12-13 15:30:14 -05:00
parent 7673d6351a
commit 1d31d71332
2 changed files with 10 additions and 19 deletions

View File

@ -177,35 +177,30 @@ namespace DS4Control
if (gkp.current.toggleCount != 0 && gkp.previous.toggleCount == 0 && gkp.current.toggle) if (gkp.current.toggleCount != 0 && gkp.previous.toggleCount == 0 && gkp.current.toggle)
{ {
if (gkp.current.scanCodeCount != 0) if (gkp.current.scanCodeCount != 0)
InputMethods.PressKeys(kvp.Key); InputMethods.performSCKeyPress(kvp.Key);
//InputMethods.performSCKeyPress(kvp.Key);
else 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) 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 if (gkp.previous.scanCodeCount != 0) // use the last type of VK/SC
InputMethods.performSCKeyRelease(kvp.Key); InputMethods.performSCKeyRelease(kvp.Key);
else 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) else if (gkp.current.vkCount + gkp.current.scanCodeCount != 0 && gkp.previous.vkCount + gkp.previous.scanCodeCount == 0)
{ {
if (gkp.current.scanCodeCount != 0) if (gkp.current.scanCodeCount != 0)
{ {
oldnow = DateTime.UtcNow; oldnow = DateTime.UtcNow;
InputMethods.PressKeys(kvp.Key); InputMethods.performSCKeyPress(kvp.Key);
//InputMethods.performSCKeyPress(kvp.Key);
pressagain = false; pressagain = false;
keyshelddown = kvp.Key; keyshelddown = kvp.Key;
} }
else else
{ {
oldnow = DateTime.UtcNow; oldnow = DateTime.UtcNow;
InputMethods.PressKeys(kvp.Key); InputMethods.performKeyPress(kvp.Key);
//InputMethods.performKeyPress(kvp.Key);
pressagain = false; pressagain = false;
keyshelddown = kvp.Key; keyshelddown = kvp.Key;
} }
@ -227,8 +222,7 @@ namespace DS4Control
if (now >= oldnow + TimeSpan.FromMilliseconds(25) && pressagain) if (now >= oldnow + TimeSpan.FromMilliseconds(25) && pressagain)
{ {
oldnow = now; oldnow = now;
//InputMethods.performSCKeyPress(kvp.Key); InputMethods.performSCKeyPress(kvp.Key);
InputMethods.PressKeys(kvp.Key);
} }
} }
else if (pressagain) else if (pressagain)
@ -237,8 +231,7 @@ namespace DS4Control
if (now >= oldnow + TimeSpan.FromMilliseconds(25) && pressagain) if (now >= oldnow + TimeSpan.FromMilliseconds(25) && pressagain)
{ {
oldnow = now; oldnow = now;
InputMethods.PressKeys(kvp.Key); InputMethods.performKeyPress(kvp.Key);
//InputMethods.performKeyPress(kvp.Key);
} }
} }
} }
@ -248,13 +241,11 @@ namespace DS4Control
if (gkp.previous.scanCodeCount != 0) // use the last type of VK/SC if (gkp.previous.scanCodeCount != 0) // use the last type of VK/SC
{ {
InputMethods.performSCKeyRelease(kvp.Key); InputMethods.performSCKeyRelease(kvp.Key);
//InputMethods.performKeyRelease(kvp.Key);
pressagain = false; pressagain = false;
} }
else else
{ {
InputMethods.ReleaseKeys(kvp.Key); InputMethods.performKeyRelease(kvp.Key);
//InputMethods.performKeyRelease(kvp.Key);
pressagain = false; pressagain = false;
} }
} }

View File

@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.4.2")] [assembly: AssemblyVersion("1.4.201")]
[assembly: AssemblyFileVersion("1.4.2")] [assembly: AssemblyFileVersion("1.4.201")]