Version 1.4.21

Added Presets for Dpad, Left and Right Sticks, Face Buttons, Sixaxis,
and Touchpad Swipes; right click on those controls to select a preset)
Fully fixed Scan code, now will work fine in old DirectX games
Macros for Special Actions can now have scan code enabled (if you didn't
know you can enable scan code on macros for single controls as well,
even after you've configured the macro)
Control list now shows if scan code is enabled
This commit is contained in:
jays2kings 2014-12-17 13:29:22 -05:00
parent 1d31d71332
commit f8dd4c6cba
24 changed files with 10697 additions and 8835 deletions

View File

@ -399,6 +399,10 @@ namespace DS4Control
{
if (Global.getFlushHIDQueue(ind))
device.FlushHID();
if (!string.IsNullOrEmpty(device.error))
{
LogDebug(device.error);
}
device.getExposedState(ExposedState[ind], CurrentState[ind]);
DS4State cState = CurrentState[ind];
device.getPreviousState(PreviousState[ind]);

View File

@ -22,6 +22,7 @@
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<Prefer32Bit>false</Prefer32Bit>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>

View File

@ -181,6 +181,7 @@ namespace DS4Control
public static void performSCKeyRelease(ushort key)
{
Console.WriteLine((System.Windows.Forms.Keys)key);
lock (lockob)
{
sendInputs[0].Type = INPUT_KEYBOARD;
@ -188,7 +189,7 @@ namespace DS4Control
sendInputs[0].Data.Keyboard.Flags = KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP;
sendInputs[0].Data.Keyboard.Scan = MapVirtualKey(key, MAPVK_VK_TO_VSC);
sendInputs[0].Data.Keyboard.Time = 0;
sendInputs[0].Data.Keyboard.Vk = key;
//sendInputs[0].Data.Keyboard.Vk = MapVirtualKey(key, MAPVK_VK_TO_VSC);
uint result = SendInput(1, sendInputs, Marshal.SizeOf(sendInputs[0]));
}
}

View File

@ -173,7 +173,6 @@ namespace DS4Control
gkp.current = kvp.Value.current;
globalState.keyPresses[kvp.Key] = gkp;
}
if (gkp.current.toggleCount != 0 && gkp.previous.toggleCount == 0 && gkp.current.toggle)
{
if (gkp.current.scanCodeCount != 0)
@ -236,7 +235,7 @@ namespace DS4Control
}
}
}
else if ((gkp.current.toggleCount == 0 && gkp.previous.toggleCount == 0) && gkp.current.vkCount + gkp.current.scanCodeCount == 0 && gkp.previous.vkCount + gkp.previous.scanCodeCount != 0)
if ((gkp.current.toggleCount == 0 && gkp.previous.toggleCount == 0) && gkp.current.vkCount + gkp.current.scanCodeCount == 0 && gkp.previous.vkCount + gkp.previous.scanCodeCount != 0)
{
if (gkp.previous.scanCodeCount != 0) // use the last type of VK/SC
{
@ -421,7 +420,9 @@ namespace DS4Control
public static bool[] pressedonce = new bool[261], macrodone = new bool[34];
public static int test = 0;
static bool[] macroControl = new bool[25];
/** Map DS4 Buttons/Axes to other DS4 Buttons/Axes (largely the same as Xinput ones) and to keyboard and mouse buttons. */
/// <summary>
/// Map DS4 Buttons/Axes to other DS4 Buttons/Axes (largely the same as Xinput ones) and to keyboard and mouse buttons.
/// </summary>
public static async void MapCustom(int device, DS4State cState, DS4State MappedState, DS4StateExposed eState, Mouse tp, Control ctrl)
{
bool shift;
@ -1491,6 +1492,7 @@ namespace DS4Control
{
if (!actionDone[device,index])
{
DS4KeyType keyType = action.keyType;
actionDone[device,index] = true;
foreach (DS4Controls dc in action.trigger)
resetToDefaultValue(dc, MappedState);
@ -1532,8 +1534,8 @@ namespace DS4Control
else if (i == 283) macroControl[22] = true;
else if (i == 284) macroControl[23] = true;
else if (i == 285) macroControl[24] = true;
//else if (keyType.HasFlag(DS4KeyType.ScanCode))
//InputMethods.performSCKeyPress((ushort)i);
else if (keyType.HasFlag(DS4KeyType.ScanCode))
InputMethods.performSCKeyPress((ushort)i);
else
InputMethods.performKeyPress((ushort)i);
keydown[i] = true;
@ -1570,8 +1572,8 @@ namespace DS4Control
else if (i == 283) macroControl[22] = false;
else if (i == 284) macroControl[23] = false;
else if (i == 285) macroControl[24] = false;
//else if (keyType.HasFlag(DS4KeyType.ScanCode))
//InputMethods.performSCKeyRelease((ushort)i);
else if (keyType.HasFlag(DS4KeyType.ScanCode))
InputMethods.performSCKeyRelease((ushort)i);
else
InputMethods.performKeyRelease((ushort)i);
keydown[i] = false;
@ -1610,15 +1612,15 @@ namespace DS4Control
else if (i == 283) macroControl[22] = false;
else if (i == 284) macroControl[23] = false;
else if (i == 285) macroControl[24] = false;
//else if (keyType.HasFlag(DS4KeyType.ScanCode))
//InputMethods.performSCKeyRelease(i);
else if (keyType.HasFlag(DS4KeyType.ScanCode))
InputMethods.performSCKeyRelease(i);
else
InputMethods.performKeyRelease(i);
}
/*if (keyType.HasFlag(DS4KeyType.HoldMacro))
{
await Task.Delay(50);
macrodoneA[index] = false;
actionDone[device,index] = false;
}*/
}
}
@ -1839,8 +1841,6 @@ namespace DS4Control
public static bool getBoolMapping(DS4Controls control, DS4State cState, DS4StateExposed eState, Mouse tp)
{
//if (control == DS4Controls.Up)
//Cons
switch (control)
{
case DS4Controls.Share: return cState.Share;

View File

@ -1255,7 +1255,7 @@ namespace DS4Control
hasvalue = true;
break;
}
if (hasvalue)
if (hasvalue && !string.IsNullOrEmpty(String.Join(",", extras)))
{
XmlNode extraNode = m_Xdoc.CreateNode(XmlNodeType.Element, button.Name, null);
extraNode.InnerText = String.Join(",", extras);
@ -1701,9 +1701,12 @@ namespace DS4Control
if (UInt16.TryParse(item.InnerText, out wvk))
customMapKeys.Add(getDS4ControlsByName(item.Name), wvk);
ParentItem = m_Xdoc.SelectSingleNode("/" + rootname + "/Control/Extras");
if (ParentItem != null)
if (ParentItem != null)
foreach (XmlNode item in ParentItem.ChildNodes)
customMapExtras.Add(getDS4ControlsByName(item.Name), item.InnerText);
if (item.InnerText != string.Empty)
customMapExtras.Add(getDS4ControlsByName(item.Name), item.InnerText);
else
ParentItem.RemoveChild(item);
ParentItem = m_Xdoc.SelectSingleNode("/" + rootname + "/Control/KeyType");
if (ParentItem != null)
foreach (XmlNode item in ParentItem.ChildNodes)
@ -1840,8 +1843,16 @@ namespace DS4Control
Item = m_Xdoc.SelectSingleNode(String.Format("/" + rootname + "/" + control + "/Extras/{0}", button.Name));
if (Item != null)
{
extras = Item.InnerText;
customMapExtras.Add(getDS4ControlsByName(button.Name), Item.InnerText);
if (Item.InnerText != string.Empty)
{
extras = Item.InnerText;
customMapExtras.Add(getDS4ControlsByName(button.Name), Item.InnerText);
}
else
{
m_Xdoc.RemoveChild(Item);
extras = "0,0,0,0,0,0,0,0";
}
}
else
extras = "0,0,0,0,0,0,0,0";
@ -2015,7 +2026,7 @@ namespace DS4Control
m_Xdoc.Save(m_Actions);
}
public bool SaveAction(string name, string controls, int mode, string details, bool edit, string ucontrols = "")
public bool SaveAction(string name, string controls, int mode, string details, bool edit, string extras = "")
{
bool saved = true;
if (!File.Exists(m_Actions))
@ -2036,6 +2047,8 @@ namespace DS4Control
case 1:
el.AppendChild(m_Xdoc.CreateElement("Type")).InnerText = "Macro";
el.AppendChild(m_Xdoc.CreateElement("Details")).InnerText = details;
if (extras != string.Empty)
el.AppendChild(m_Xdoc.CreateElement("Extras")).InnerText = extras;
break;
case 2:
el.AppendChild(m_Xdoc.CreateElement("Type")).InnerText = "Program";
@ -2044,7 +2057,7 @@ namespace DS4Control
case 3:
el.AppendChild(m_Xdoc.CreateElement("Type")).InnerText = "Profile";
el.AppendChild(m_Xdoc.CreateElement("Details")).InnerText = details;
el.AppendChild(m_Xdoc.CreateElement("UnloadTrigger")).InnerText = ucontrols;
el.AppendChild(m_Xdoc.CreateElement("UnloadTrigger")).InnerText = extras;
break;
}
if (edit)
@ -2083,7 +2096,7 @@ namespace DS4Control
XmlDocument doc = new XmlDocument();
doc.Load(Global.appdatapath + "\\Actions.xml");
XmlNodeList actionslist = doc.SelectNodes("Actions/Action");
string name, controls, type, details, ucontrols;
string name, controls, type, details, extras;
foreach (XmlNode x in actionslist)
{
name = x.Attributes["Name"].Value;
@ -2092,11 +2105,15 @@ namespace DS4Control
details = x.ChildNodes[2].InnerText;
if (type == "Profile")
{
ucontrols = x.ChildNodes[3].InnerText;
actions.Add(new SpecialAction(name, controls, type, details, ucontrols));
extras = x.ChildNodes[3].InnerText;
actions.Add(new SpecialAction(name, controls, type, details, extras));
}
else if (type == "Macro")
{
if (x.ChildNodes[3] != null) extras = x.ChildNodes[3].InnerText;
else extras = string.Empty;
actions.Add(new SpecialAction(name, controls, type, details, extras));
}
else
actions.Add(new SpecialAction(name, controls, type, details));
}
}
catch { saved = false; }
@ -2114,7 +2131,8 @@ namespace DS4Control
public string details;
public List<DS4Controls> uTrigger = new List<DS4Controls>();
public string ucontrols;
public SpecialAction(string name, string controls, string type, string details, string ucontrols = "")
public DS4KeyType keyType;
public SpecialAction(string name, string controls, string type, string details, string extras = "")
{
this.name = name;
this.type = type;
@ -2131,13 +2149,15 @@ namespace DS4Control
if (int.TryParse(s, out v))
macro.Add(v);
}
if (extras.Contains("Scan Code"))
keyType |= DS4KeyType.ScanCode;
}
else
this.details = details;
if (!string.IsNullOrEmpty(ucontrols))
if (!string.IsNullOrEmpty(extras))
{
this.ucontrols = ucontrols;
string[] uctrls = ucontrols.Split('/');
this.ucontrols = extras;
string[] uctrls = extras.Split('/');
foreach (string s in uctrls)
uTrigger.Add(getDS4ControlsByName(s));
}

View File

@ -280,6 +280,7 @@ namespace DS4Library
private byte priorInputReport30 = 0xff;
public double Latency = 0;
bool warn;
public string error;
private void performDs4Input()
{
System.Timers.Timer readTimeout = new System.Timers.Timer(); // Await 30 seconds for the initial packet, then 3 seconds thereafter.
@ -290,6 +291,7 @@ namespace DS4Library
sw.Start();
while (true)
{
string currerror = string.Empty;
Latency.Add(sw.ElapsedMilliseconds - oldtime);
oldtime = sw.ElapsedMilliseconds;
@ -408,28 +410,36 @@ namespace DS4Library
Array.Copy(inputReport, 14, accel, 0, 6);
Array.Copy(inputReport, 20, gyro, 0, 6);
try
{
charging = (inputReport[30] & 0x10) != 0;
battery = (inputReport[30] & 0x0f) * 10;
cState.Battery = (byte)battery;
if (inputReport[30] != priorInputReport30)
{
priorInputReport30 = inputReport[30];
Console.WriteLine(MacAddress.ToString() + " " + System.DateTime.UtcNow.ToString("o") + "> power subsystem octet: 0x" + inputReport[30].ToString("x02"));
if (inputReport[30] != priorInputReport30)
{
priorInputReport30 = inputReport[30];
Console.WriteLine(MacAddress.ToString() + " " + System.DateTime.UtcNow.ToString("o") + "> power subsystem octet: 0x" + inputReport[30].ToString("x02"));
}
}
catch { currerror = "Index out ofr bounds: battery"; }
// XXX DS4State mapping needs fixup, turn touches into an array[4] of structs. And include the touchpad details there instead.
for (int touches = inputReport[-1 + DS4Touchpad.TOUCHPAD_DATA_OFFSET - 1], touchOffset = 0; touches > 0; touches--, touchOffset += 9)
try
{
cState.TouchPacketCounter = inputReport[-1 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset];
cState.Touch1 = (inputReport[0 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] >> 7) != 0 ? false : true; // >= 1 touch detected
cState.Touch1Identifier = (byte)(inputReport[0 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] & 0x7f);
cState.Touch2 = (inputReport[4 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] >> 7) != 0 ? false : true; // 2 touches detected
cState.Touch2Identifier = (byte)(inputReport[4 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] & 0x7f);
cState.TouchLeft = (inputReport[1 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] + ((inputReport[2 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] & 0xF) * 255) >= 1920 * 2 / 5) ? false : true;
cState.TouchRight = (inputReport[1 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] + ((inputReport[2 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] & 0xF) * 255) < 1920 * 2 / 5) ? false : true;
for (int touches = inputReport[-1 + DS4Touchpad.TOUCHPAD_DATA_OFFSET - 1], touchOffset = 0; touches > 0; touches--, touchOffset += 9)
{
cState.TouchPacketCounter = inputReport[-1 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset];
cState.Touch1 = (inputReport[0 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] >> 7) != 0 ? false : true; // >= 1 touch detected
cState.Touch1Identifier = (byte)(inputReport[0 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] & 0x7f);
cState.Touch2 = (inputReport[4 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] >> 7) != 0 ? false : true; // 2 touches detected
cState.Touch2Identifier = (byte)(inputReport[4 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] & 0x7f);
cState.TouchLeft = (inputReport[1 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] + ((inputReport[2 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] & 0xF) * 255) >= 1920 * 2 / 5) ? false : true;
cState.TouchRight = (inputReport[1 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] + ((inputReport[2 + DS4Touchpad.TOUCHPAD_DATA_OFFSET + touchOffset] & 0xF) * 255) < 1920 * 2 / 5) ? false : true;
// Even when idling there is still a touch packet indicating no touch 1 or 2
touchpad.handleTouchpad(inputReport, cState, touchOffset);
touchpad.handleTouchpad(inputReport, cState, touchOffset);
}
}
catch { currerror = "Index out ofr bounds: touchpad"; }
/* Debug output of incoming HID data:
if (cState.L2 == 0xff && cState.R2 == 0xff)
@ -444,12 +454,6 @@ namespace DS4Library
if (conType == ConnectionType.BT)
{
bool shouldDisconnect = false;
/*if ((!pState.PS || !pState.Options) && cState.PS && cState.Options)
{
shouldDisconnect = true;
for (int i = 0; i < 255; i++)
ReleaseKeys(i);
}*/
if (IdleTimeout > 0)
{
if (isNonSixaxisIdle())
@ -466,7 +470,10 @@ namespace DS4Library
if (Report != null)
Report(this, EventArgs.Empty);
sendOutputReport(false);
if (!string.IsNullOrEmpty(error))
error = string.Empty;
if (!string.IsNullOrEmpty(currerror))
error = currerror;
cState.CopyTo(pState);
}
}

View File

@ -20,6 +20,14 @@ namespace DS4Service
logWriter = File.AppendText(logFile);
}
public DS4Service(Control scpdevice)
{
InitializeComponent();
rootHub = scpdevice;
rootHub.Debug += On_Debug;
logWriter = File.AppendText(logFile);
}
protected override void OnStart(string[] args)
{
rootHub.Start();

View File

@ -15,6 +15,7 @@ using System.Xml;
using System.Text;
using System.Globalization;
using System.Threading.Tasks;
using System.ServiceProcess;
namespace DS4Windows
{
public partial class DS4Form : Form
@ -51,7 +52,9 @@ namespace DS4Windows
protected XmlDocument m_Xdoc = new XmlDocument();
public bool mAllowVisible;
bool contextclose;
string logFile = Global.appdatapath + @"\DS4Service.log";
StreamWriter logWriter;
//bool outputlog = false;
[DllImport("user32.dll")]
private static extern IntPtr GetForegroundWindow();
@ -80,7 +83,6 @@ namespace DS4Windows
cbs = new ComboBox[4] { cBController1, cBController2, cBController3, cBController4 };
ebns = new Button[4] { bnEditC1, bnEditC2, bnEditC3, bnEditC4 };
statPB = new PictureBox[4] { pBStatus1, pBStatus2, pBStatus3, pBStatus4 };
shortcuts = new ToolStripMenuItem[4] { (ToolStripMenuItem)notifyIcon1.ContextMenuStrip.Items[0],
(ToolStripMenuItem)notifyIcon1.ContextMenuStrip.Items[1],
(ToolStripMenuItem)notifyIcon1.ContextMenuStrip.Items[2],
@ -148,7 +150,10 @@ namespace DS4Windows
Icon = Properties.Resources.DS4W;
notifyIcon1.Icon = Properties.Resources.DS4W;
Program.rootHub.Debug += On_Debug;
Log.GuiLog += On_Debug;
logFile = Global.appdatapath + "\\DS4Windows.log";
//logWriter = File.AppendText(logFile);
Log.TrayIconLog += ShowNotification;
// tmrUpdate.Enabled = true; TODO remove tmrUpdate and leave tick()
@ -760,6 +765,8 @@ namespace DS4Windows
protected void On_Debug(object sender, DS4Control.DebugEventArgs e)
{
//logWriter.WriteLine(e.Time + ":\t" + e.Data);
//logWriter.Flush();
LogDebug(e.Time, e.Data);
}

View File

@ -88,6 +88,7 @@
<Reference Include="System.IO.Compression" />
<Reference Include="System.IO.Compression.FileSystem" />
<Reference Include="System.Management" />
<Reference Include="System.ServiceProcess" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />

View File

@ -29,8 +29,8 @@
private void InitializeComponent()
{
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(KBM360));
this.pictureBox1 = new System.Windows.Forms.PictureBox();
this.pictureBox2 = new System.Windows.Forms.PictureBox();
this.pBX360 = new System.Windows.Forms.PictureBox();
this.pBMouse = new System.Windows.Forms.PictureBox();
this.btnF6 = new System.Windows.Forms.Button();
this.btnF5 = new System.Windows.Forms.Button();
this.btnF7 = new System.Windows.Forms.Button();
@ -138,7 +138,7 @@
this.bnColor = new System.Windows.Forms.Button();
this.btnNUMDOT = new System.Windows.Forms.Button();
this.btnG = new System.Windows.Forms.Button();
this.cbScanCode = new System.Windows.Forms.CheckBox();
this.cBScanCode = new System.Windows.Forms.CheckBox();
this.btnF = new System.Windows.Forms.Button();
this.lBTip = new System.Windows.Forms.Label();
this.btnD = new System.Windows.Forms.Button();
@ -198,7 +198,7 @@
this.btnQ = new System.Windows.Forms.Button();
this.btnLSU = new System.Windows.Forms.Button();
this.btnLS = new System.Windows.Forms.Button();
this.cbToggle = new System.Windows.Forms.CheckBox();
this.cBToggle = new System.Windows.Forms.CheckBox();
this.btnFallBack = new System.Windows.Forms.Button();
this.btnUNBOUND2 = new System.Windows.Forms.Button();
this.btnESC = new System.Windows.Forms.Button();
@ -209,8 +209,8 @@
this.lbGreenV = new System.Windows.Forms.Label();
this.lbRedV = new System.Windows.Forms.Label();
this.advColorDialog = new DS4Windows.AdvancedColorDialog();
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pBX360)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.pBMouse)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nUDHeavy)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nUDLight)).BeginInit();
((System.ComponentModel.ISupportInitialize)(this.nUDLightFlash)).BeginInit();
@ -221,18 +221,18 @@
this.gBExtras.SuspendLayout();
this.SuspendLayout();
//
// pictureBox1
// pBX360
//
resources.ApplyResources(this.pictureBox1, "pictureBox1");
this.pictureBox1.Name = "pictureBox1";
this.pictureBox1.TabStop = false;
resources.ApplyResources(this.pBX360, "pBX360");
this.pBX360.Name = "pBX360";
this.pBX360.TabStop = false;
//
// pictureBox2
// pBMouse
//
this.pictureBox2.Image = global::DS4Windows.Properties.Resources.mouse;
resources.ApplyResources(this.pictureBox2, "pictureBox2");
this.pictureBox2.Name = "pictureBox2";
this.pictureBox2.TabStop = false;
this.pBMouse.Image = global::DS4Windows.Properties.Resources.mouse;
resources.ApplyResources(this.pBMouse, "pBMouse");
this.pBMouse.Name = "pBMouse";
this.pBMouse.TabStop = false;
//
// btnF6
//
@ -1092,12 +1092,12 @@
this.btnG.Tag = "71";
this.btnG.UseVisualStyleBackColor = true;
//
// cbScanCode
// cBScanCode
//
resources.ApplyResources(this.cbScanCode, "cbScanCode");
this.cbScanCode.Name = "cbScanCode";
this.cbScanCode.TabStop = false;
this.cbScanCode.UseVisualStyleBackColor = true;
resources.ApplyResources(this.cBScanCode, "cBScanCode");
this.cBScanCode.Name = "cBScanCode";
this.cBScanCode.TabStop = false;
this.cBScanCode.UseVisualStyleBackColor = true;
//
// btnF
//
@ -1584,13 +1584,13 @@
this.btnLS.Tag = "X360Left Stick";
this.btnLS.UseVisualStyleBackColor = true;
//
// cbToggle
// cBToggle
//
resources.ApplyResources(this.cbToggle, "cbToggle");
this.cbToggle.Name = "cbToggle";
this.cbToggle.TabStop = false;
this.cbToggle.UseVisualStyleBackColor = true;
this.cbToggle.CheckedChanged += new System.EventHandler(this.cbToggle_CheckedChanged);
resources.ApplyResources(this.cBToggle, "cBToggle");
this.cBToggle.Name = "cBToggle";
this.cBToggle.TabStop = false;
this.cBToggle.UseVisualStyleBackColor = true;
this.cBToggle.CheckedChanged += new System.EventHandler(this.cbToggle_CheckedChanged);
//
// btnFallBack
//
@ -1685,7 +1685,7 @@
this.Controls.Add(this.btnUNBOUND2);
this.Controls.Add(this.lBMacroOn);
this.Controls.Add(this.btnFallBack);
this.Controls.Add(this.cbToggle);
this.Controls.Add(this.cBToggle);
this.Controls.Add(this.btnLS);
this.Controls.Add(this.btnF6);
this.Controls.Add(this.btnLSU);
@ -1803,7 +1803,7 @@
this.Controls.Add(this.btnNUMSTAR);
this.Controls.Add(this.btnF);
this.Controls.Add(this.btnX);
this.Controls.Add(this.cbScanCode);
this.Controls.Add(this.cBScanCode);
this.Controls.Add(this.btnNUM9);
this.Controls.Add(this.btnG);
this.Controls.Add(this.btnZ);
@ -1836,8 +1836,8 @@
this.Controls.Add(this.btnRETURN);
this.Controls.Add(this.btnCAPS);
this.Controls.Add(this.btnNUM0);
this.Controls.Add(this.pictureBox2);
this.Controls.Add(this.pictureBox1);
this.Controls.Add(this.pBMouse);
this.Controls.Add(this.pBX360);
this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle;
this.KeyPreview = true;
this.MaximizeBox = false;
@ -1845,8 +1845,8 @@
this.Name = "KBM360";
this.FormClosed += new System.Windows.Forms.FormClosedEventHandler(this.finalMeasure);
this.KeyDown += new System.Windows.Forms.KeyEventHandler(this.Key_Down_Action);
((System.ComponentModel.ISupportInitialize)(this.pictureBox1)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pictureBox2)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pBX360)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.pBMouse)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nUDHeavy)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nUDLight)).EndInit();
((System.ComponentModel.ISupportInitialize)(this.nUDLightFlash)).EndInit();
@ -1863,8 +1863,8 @@
#endregion
private System.Windows.Forms.PictureBox pictureBox1;
private System.Windows.Forms.PictureBox pictureBox2;
private System.Windows.Forms.PictureBox pBX360;
private System.Windows.Forms.PictureBox pBMouse;
private System.Windows.Forms.Button btnF6;
private System.Windows.Forms.Button btnF5;
private System.Windows.Forms.Button btnF7;
@ -1972,7 +1972,7 @@
private System.Windows.Forms.Button bnColor;
private System.Windows.Forms.Button btnNUMDOT;
private System.Windows.Forms.Button btnG;
private System.Windows.Forms.CheckBox cbScanCode;
private System.Windows.Forms.CheckBox cBScanCode;
private System.Windows.Forms.Button btnF;
private System.Windows.Forms.Label lBTip;
private System.Windows.Forms.Button btnD;
@ -2032,7 +2032,7 @@
private System.Windows.Forms.Button btnQ;
private System.Windows.Forms.Button btnLSU;
private System.Windows.Forms.Button btnLS;
private System.Windows.Forms.CheckBox cbToggle;
private System.Windows.Forms.CheckBox cBToggle;
private System.Windows.Forms.Button btnFallBack;
private System.Windows.Forms.Button btnUNBOUND2;
private System.Windows.Forms.Button btnESC;

View File

@ -19,14 +19,17 @@ namespace DS4Windows
public bool macrorepeat, newaction;
RecordBox rb;
object oldtag;
bool scanavail, toggleavil;
string keyname;
object keytag;
public KBM360(int deviceNum, Options ooo, Button buton)
{
InitializeComponent();
device = deviceNum;
ops = ooo;
button = buton;
cbToggle.Checked = button.Font.Italic;
cbScanCode.Checked = button.Font.Bold;
cBToggle.Checked = button.Font.Italic;
cBScanCode.Checked = button.Font.Bold;
if (button.Tag != null)
{
string[] extras;
@ -34,12 +37,14 @@ namespace DS4Windows
{
KeyValuePair<int, string> tag = (KeyValuePair<int, string>)button.Tag;
oldtag = tag.Key;
keytag = tag.Key;
extras = tag.Value.Split(',');
}
else if (button.Tag is KeyValuePair<Int32[], string>)
{
KeyValuePair<Int32[], string> tag = (KeyValuePair<Int32[], string>)button.Tag;
oldtag = tag.Key;
keytag = tag.Key;
if (button.Font.Underline)
{
lBMacroOn.Visible = true;
@ -54,6 +59,7 @@ namespace DS4Windows
{
KeyValuePair<string, string> tag = (KeyValuePair<string, string>)button.Tag;
oldtag = tag.Key;
keytag = tag.Key;
extras = tag.Value.Split(',');
}
else
@ -115,7 +121,7 @@ namespace DS4Windows
if (rb == null && sender is Button && ((Button)sender).Name != "bnMacro" && ((Button)sender).Name != "bnTest")
{
Button bn = ((Button)sender);
string keyname;
macrostag.Clear();
if (((Button)sender).Text.Contains('↑') || ((Button)sender).Text.Contains('↓') || ((Button)sender).Text.Contains('→') || ((Button)sender).Text.Contains('←') || ((Button)sender).Text.Contains('Ø'))
keyname = ((Button)sender).Text.Substring(1);
else if (((Button)sender).Font.Name == "Webdings")
@ -134,15 +140,17 @@ namespace DS4Windows
else if (((Button)sender).Tag == null)
keyname = ((Button)sender).Text;
else if (((Button)sender).Tag.ToString().Contains("X360"))
{
keyname = ((Button)sender).Tag.ToString().Substring(4);
}
else
keyname = ((Button)sender).Text;
object keytag;
if (((Button)sender).Tag != null && ((Button)sender).Tag.ToString().Contains("X360"))
keytag = ((Button)sender).Tag.ToString().Substring(4);
else
keytag = ((Button)sender).Tag;
lBMacroOn.Visible = false;
string extras = GetExtras();
KeyValuePair<object, string> tag = new KeyValuePair<object, string>(keytag, extras);
@ -170,6 +178,7 @@ namespace DS4Windows
if (lBMacroOn.Visible)
{
string extras = GetExtras();
keytag = null;
KeyValuePair<object, string> tag = new KeyValuePair<object, string>(macrostag.ToArray(), extras);
ops.ChangeButtonText("Macro", tag);
//ops.ChangeButtonText("Macro", macrostag.ToArray());
@ -180,7 +189,11 @@ namespace DS4Windows
KeyValuePair<object, string> tag = new KeyValuePair<object, string>(oldtag, extras);
ops.ChangeButtonText(button.Text, tag);
}
ops.Toggle_Bn(cbScanCode.Checked, cbToggle.Checked, lBMacroOn.Visible, macrorepeat);
int value;
bool tagisint = keytag != null && Int32.TryParse(keytag.ToString(), out value);
scanavail = lBMacroOn.Visible || tagisint;
toggleavil = tagisint;
ops.Toggle_Bn((scanavail ? cBScanCode.Checked : false), (toggleavil ? cBToggle.Checked : false), lBMacroOn.Visible, macrorepeat);
ops.UpdateLists();
}
@ -212,21 +225,20 @@ namespace DS4Windows
private void cbToggle_CheckedChanged(object sender, EventArgs e)
{
if (cbToggle.Checked)
lBMacroOn.Visible = false;
}
private void btnMacro_Click(object sender, EventArgs e)
{
gBExtras.Controls.Add(cBScanCode);
cBScanCode.Location = new Point(20, 320);
rb = new RecordBox(this);
rb.TopLevel = false;
rb.Dock = DockStyle.Fill;
rb.Visible = true;
Controls.Add(rb);
rb.BringToFront();
//rb.StartPosition = FormStartPosition.Manual;
//rb.Location = new Point(this.Location.X + 580, this.Location.Y+ 55);
//rb.Show();
rb.FormClosed += delegate { Controls.Add(cBScanCode); cBScanCode.Location = new Point(663, 8); ActiveControl = lBMacroOn; };
}
protected override bool IsInputKey(Keys keyData)

View File

@ -118,7 +118,7 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="pictureBox1.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<data name="pBX360.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
iVBORw0KGgoAAAANSUhEUgAAAx4AAAEYCAYAAADS/CAKAAAABGdBTUEAALGOfPtRkwAAACBjSFJNAACH
DwAAjA8AAP1SAACBQAAAfXkAAOmLAAA85QAAGcxzPIV3AAAKOWlDQ1BQaG90b3Nob3AgSUNDIHByb2Zp
@ -3649,59 +3649,59 @@
</value>
</data>
<assembly alias="System.Windows.Forms" name="System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="pictureBox1.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<data name="pBX360.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="pictureBox1.Location" type="System.Drawing.Point, System.Drawing">
<data name="pBX360.Location" type="System.Drawing.Point, System.Drawing">
<value>34, 213</value>
</data>
<data name="pictureBox1.Size" type="System.Drawing.Size, System.Drawing">
<data name="pBX360.Size" type="System.Drawing.Size, System.Drawing">
<value>798, 280</value>
</data>
<data name="pictureBox1.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<data name="pBX360.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>StretchImage</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="pictureBox1.TabIndex" type="System.Int32, mscorlib">
<data name="pBX360.TabIndex" type="System.Int32, mscorlib">
<value>322</value>
</data>
<data name="&gt;&gt;pictureBox1.Name" xml:space="preserve">
<value>pictureBox1</value>
<data name="&gt;&gt;pBX360.Name" xml:space="preserve">
<value>pBX360</value>
</data>
<data name="&gt;&gt;pictureBox1.Type" xml:space="preserve">
<data name="&gt;&gt;pBX360.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox1.Parent" xml:space="preserve">
<data name="&gt;&gt;pBX360.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;pictureBox1.ZOrder" xml:space="preserve">
<data name="&gt;&gt;pBX360.ZOrder" xml:space="preserve">
<value>157</value>
</data>
<data name="pictureBox2.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<data name="pBMouse.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="pictureBox2.Location" type="System.Drawing.Point, System.Drawing">
<data name="pBMouse.Location" type="System.Drawing.Point, System.Drawing">
<value>760, 44</value>
</data>
<data name="pictureBox2.Size" type="System.Drawing.Size, System.Drawing">
<data name="pBMouse.Size" type="System.Drawing.Size, System.Drawing">
<value>97, 140</value>
</data>
<data name="pictureBox2.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<data name="pBMouse.SizeMode" type="System.Windows.Forms.PictureBoxSizeMode, System.Windows.Forms">
<value>Zoom</value>
</data>
<data name="pictureBox2.TabIndex" type="System.Int32, mscorlib">
<data name="pBMouse.TabIndex" type="System.Int32, mscorlib">
<value>290</value>
</data>
<data name="&gt;&gt;pictureBox2.Name" xml:space="preserve">
<value>pictureBox2</value>
<data name="&gt;&gt;pBMouse.Name" xml:space="preserve">
<value>pBMouse</value>
</data>
<data name="&gt;&gt;pictureBox2.Type" xml:space="preserve">
<data name="&gt;&gt;pBMouse.Type" xml:space="preserve">
<value>System.Windows.Forms.PictureBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;pictureBox2.Parent" xml:space="preserve">
<data name="&gt;&gt;pBMouse.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;pictureBox2.ZOrder" xml:space="preserve">
<data name="&gt;&gt;pBMouse.ZOrder" xml:space="preserve">
<value>156</value>
</data>
<data name="btnF6.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
@ -6878,37 +6878,37 @@
<data name="&gt;&gt;btnG.ZOrder" xml:space="preserve">
<value>125</value>
</data>
<data name="cbScanCode.AutoSize" type="System.Boolean, mscorlib">
<data name="cBScanCode.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="cbScanCode.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<data name="cBScanCode.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cbScanCode.Location" type="System.Drawing.Point, System.Drawing">
<data name="cBScanCode.Location" type="System.Drawing.Point, System.Drawing">
<value>663, 8</value>
</data>
<data name="cbScanCode.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
<data name="cBScanCode.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
<value>Yes</value>
</data>
<data name="cbScanCode.Size" type="System.Drawing.Size, System.Drawing">
<data name="cBScanCode.Size" type="System.Drawing.Size, System.Drawing">
<value>79, 17</value>
</data>
<data name="cbScanCode.TabIndex" type="System.Int32, mscorlib">
<data name="cBScanCode.TabIndex" type="System.Int32, mscorlib">
<value>288</value>
</data>
<data name="cbScanCode.Text" xml:space="preserve">
<data name="cBScanCode.Text" xml:space="preserve">
<value>Scan Code</value>
</data>
<data name="&gt;&gt;cbScanCode.Name" xml:space="preserve">
<value>cbScanCode</value>
<data name="&gt;&gt;cBScanCode.Name" xml:space="preserve">
<value>cBScanCode</value>
</data>
<data name="&gt;&gt;cbScanCode.Type" xml:space="preserve">
<data name="&gt;&gt;cBScanCode.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbScanCode.Parent" xml:space="preserve">
<data name="&gt;&gt;cBScanCode.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;cbScanCode.ZOrder" xml:space="preserve">
<data name="&gt;&gt;cBScanCode.ZOrder" xml:space="preserve">
<value>123</value>
</data>
<data name="btnF.FlatStyle" type="System.Windows.Forms.FlatStyle, System.Windows.Forms">
@ -8538,37 +8538,37 @@ a key by typing it</value>
<data name="&gt;&gt;btnLS.ZOrder" xml:space="preserve">
<value>6</value>
</data>
<data name="cbToggle.AutoSize" type="System.Boolean, mscorlib">
<data name="cBToggle.AutoSize" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="cbToggle.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<data name="cBToggle.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
<value>NoControl</value>
</data>
<data name="cbToggle.Location" type="System.Drawing.Point, System.Drawing">
<data name="cBToggle.Location" type="System.Drawing.Point, System.Drawing">
<value>598, 8</value>
</data>
<data name="cbToggle.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
<data name="cBToggle.RightToLeft" type="System.Windows.Forms.RightToLeft, System.Windows.Forms">
<value>Yes</value>
</data>
<data name="cbToggle.Size" type="System.Drawing.Size, System.Drawing">
<data name="cBToggle.Size" type="System.Drawing.Size, System.Drawing">
<value>59, 17</value>
</data>
<data name="cbToggle.TabIndex" type="System.Int32, mscorlib">
<data name="cBToggle.TabIndex" type="System.Int32, mscorlib">
<value>287</value>
</data>
<data name="cbToggle.Text" xml:space="preserve">
<data name="cBToggle.Text" xml:space="preserve">
<value>Toggle</value>
</data>
<data name="&gt;&gt;cbToggle.Name" xml:space="preserve">
<value>cbToggle</value>
<data name="&gt;&gt;cBToggle.Name" xml:space="preserve">
<value>cBToggle</value>
</data>
<data name="&gt;&gt;cbToggle.Type" xml:space="preserve">
<data name="&gt;&gt;cBToggle.Type" xml:space="preserve">
<value>System.Windows.Forms.CheckBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</data>
<data name="&gt;&gt;cbToggle.Parent" xml:space="preserve">
<data name="&gt;&gt;cBToggle.Parent" xml:space="preserve">
<value>$this</value>
</data>
<data name="&gt;&gt;cbToggle.ZOrder" xml:space="preserve">
<data name="&gt;&gt;cBToggle.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<data name="btnFallBack.ImeMode" type="System.Windows.Forms.ImeMode, System.Windows.Forms">
@ -8865,7 +8865,7 @@ Sensitivity</value>
<value>advColorDialog</value>
</data>
<data name="&gt;&gt;advColorDialog.Type" xml:space="preserve">
<value>DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.4.2.0, Culture=neutral, PublicKeyToken=null</value>
<value>DS4Windows.AdvancedColorDialog, DS4Windows, Version=1.4.21.0, Culture=neutral, PublicKeyToken=null</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>KBM360</value>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

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
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.4.201")]
[assembly: AssemblyFileVersion("1.4.201")]
[assembly: AssemblyVersion("1.4.21")]
[assembly: AssemblyFileVersion("1.4.21")]

View File

@ -607,4 +607,7 @@
<data name="CloseMinimize" xml:space="preserve">
<value>Close DS4Windows via the notification icon</value>
</data>
<data name="RightClickPresets" xml:space="preserve">
<value>Right Click to set presets for a set of controls</value>
</data>
</root>

View File

@ -1039,6 +1039,15 @@ namespace DS4Windows.Properties {
}
}
/// <summary>
/// Looks up a localized string similar to Right Click to set presets for a set of controls.
/// </summary>
internal static string RightClickPresets {
get {
return ResourceManager.GetString("RightClickPresets", resourceCulture);
}
}
/// <summary>
/// Looks up a localized resource of type System.Drawing.Bitmap.
/// </summary>

View File

@ -59,6 +59,8 @@ namespace DS4Windows
ds4.Tick += ds4_Tick;
ds4.Interval = 1;
lbRecordTip.Visible = false;
cBStyle.Visible = false;
pnlMouseButtons.Location = new Point(pnlMouseButtons.Location.X, pnlMouseButtons.Location.Y - 75);
if (sA.macrostag.Count > 0)
{
macros.AddRange(sA.macrostag);

View File

@ -117,16 +117,74 @@
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<data name="btnCancel.Text" xml:space="preserve">
<value>Cancelar</value>
</data>
<data name="btnRecord.Text" xml:space="preserve">
<value>Grabar</value>
</data>
<data name="btnSave.Text" xml:space="preserve">
<value>Guardar</value>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="cBRecordDelays.Location" type="System.Drawing.Point, System.Drawing">
<value>589, 121</value>
</data>
<data name="cBRecordDelays.Size" type="System.Drawing.Size, System.Drawing">
<value>98, 17</value>
</data>
<data name="cBRecordDelays.Text" xml:space="preserve">
<value>Grabar retrasos</value>
</data>
<data name="iLKeys.ImageStream" mimetype="application/x-microsoft.net.object.binary.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAQ
CgAAAk1TRnQBSQFMAgEBAwEAAegBAAHoAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
AWYDAAGZAwABzAIAATMDAAIzAgABMwFmAgABMwGZAgABMwHMAgABMwH/AgABZgMAAWYBMwIAAmYCAAFm
AZkCAAFmAcwCAAFmAf8CAAGZAwABmQEzAgABmQFmAgACmQIAAZkBzAIAAZkB/wIAAcwDAAHMATMCAAHM
AWYCAAHMAZkCAALMAgABzAH/AgAB/wFmAgAB/wGZAgAB/wHMAQABMwH/AgAB/wEAATMBAAEzAQABZgEA
ATMBAAGZAQABMwEAAcwBAAEzAQAB/wEAAf8BMwIAAzMBAAIzAWYBAAIzAZkBAAIzAcwBAAIzAf8BAAEz
AWYCAAEzAWYBMwEAATMCZgEAATMBZgGZAQABMwFmAcwBAAEzAWYB/wEAATMBmQIAATMBmQEzAQABMwGZ
AWYBAAEzApkBAAEzAZkBzAEAATMBmQH/AQABMwHMAgABMwHMATMBAAEzAcwBZgEAATMBzAGZAQABMwLM
AQABMwHMAf8BAAEzAf8BMwEAATMB/wFmAQABMwH/AZkBAAEzAf8BzAEAATMC/wEAAWYDAAFmAQABMwEA
AWYBAAFmAQABZgEAAZkBAAFmAQABzAEAAWYBAAH/AQABZgEzAgABZgIzAQABZgEzAWYBAAFmATMBmQEA
AWYBMwHMAQABZgEzAf8BAAJmAgACZgEzAQADZgEAAmYBmQEAAmYBzAEAAWYBmQIAAWYBmQEzAQABZgGZ
AWYBAAFmApkBAAFmAZkBzAEAAWYBmQH/AQABZgHMAgABZgHMATMBAAFmAcwBmQEAAWYCzAEAAWYBzAH/
AQABZgH/AgABZgH/ATMBAAFmAf8BmQEAAWYB/wHMAQABzAEAAf8BAAH/AQABzAEAApkCAAGZATMBmQEA
AZkBAAGZAQABmQEAAcwBAAGZAwABmQIzAQABmQEAAWYBAAGZATMBzAEAAZkBAAH/AQABmQFmAgABmQFm
ATMBAAGZATMBZgEAAZkBZgGZAQABmQFmAcwBAAGZATMB/wEAApkBMwEAApkBZgEAA5kBAAKZAcwBAAKZ
Af8BAAGZAcwCAAGZAcwBMwEAAWYBzAFmAQABmQHMAZkBAAGZAswBAAGZAcwB/wEAAZkB/wIAAZkB/wEz
AQABmQHMAWYBAAGZAf8BmQEAAZkB/wHMAQABmQL/AQABzAMAAZkBAAEzAQABzAEAAWYBAAHMAQABmQEA
AcwBAAHMAQABmQEzAgABzAIzAQABzAEzAWYBAAHMATMBmQEAAcwBMwHMAQABzAEzAf8BAAHMAWYCAAHM
AWYBMwEAAZkCZgEAAcwBZgGZAQABzAFmAcwBAAGZAWYB/wEAAcwBmQIAAcwBmQEzAQABzAGZAWYBAAHM
ApkBAAHMAZkBzAEAAcwBmQH/AQACzAIAAswBMwEAAswBZgEAAswBmQEAA8wBAALMAf8BAAHMAf8CAAHM
Af8BMwEAAZkB/wFmAQABzAH/AZkBAAHMAf8BzAEAAcwC/wEAAcwBAAEzAQAB/wEAAWYBAAH/AQABmQEA
AcwBMwIAAf8CMwEAAf8BMwFmAQAB/wEzAZkBAAH/ATMBzAEAAf8BMwH/AQAB/wFmAgAB/wFmATMBAAHM
AmYBAAH/AWYBmQEAAf8BZgHMAQABzAFmAf8BAAH/AZkCAAH/AZkBMwEAAf8BmQFmAQAB/wKZAQAB/wGZ
AcwBAAH/AZkB/wEAAf8BzAIAAf8BzAEzAQAB/wHMAWYBAAH/AcwBmQEAAf8CzAEAAf8BzAH/AQAC/wEz
AQABzAH/AWYBAAL/AZkBAAL/AcwBAAJmAf8BAAFmAf8BZgEAAWYC/wEAAf8CZgEAAf8BZgH/AQAC/wFm
AQABIQEAAaUBAANfAQADdwEAA4YBAAOWAQADywEAA7IBAAPXAQAD3QEAA+MBAAPqAQAD8QEAA/gBAAHw
AfsB/wEAAaQCoAEAA4ADAAH/AgAB/wMAAv8BAAH/AwAB/wEAAf8BAAL/AgAD/yIAAf8B7wH3AfQGAAH/
Au8B/xgAAf8BBw4AAuwB/wcAAf8BBwHxAQcBvAGRAosBkQG8AQcB8QHvAf8XAAH/AuwBBw0AAuwB/wgA
AfQB8AEHBosCBwH0FwAB/wTsAQcMAALsAf8IAAHxAZEBiwe0AZEB8RYAAf8G7AEHCwAC7AH/BwAB9AG0
Aa0BtAG1AfEC/wHxAbUBtAGtAbQB9BUAAuwBBwLsAf8C7AH/CgAC7AH/BwABvAGzAbQBtQb/ArQBswG8
FQAB7AEHAQAC7AL/AewB/woAAuwB/wcAAbUBtAG1ARkC9AEHAfMB/wEZAQkCtAG1FQABBwIAAuwB/wEA
Av8HAAH/AgAC7AH/AgAB/wQAArQBtQP0AuwBvAH/ARkDtBgAAuwB/woAAewB/wEAAuwB/wEAAQcB/wQA
ArQBtQH0Av8B7AHvAewBBwEZA7QYAALsAf8KAALsAf8C7AH/AQcB7AH/BAABuwG0AbsBGQH/AfQBkgH0
Af8B7wEZAbUBtAG7GAAC7AH/CgABBwTsAQcC7AH/BAAB8AG0AbsBCQH/AfQB8gP/ArsBtAHwGAAC7AH/
CwABBwXsAf8EAAH0AVgBUgG7AgkB8wL0AfMBCQG7ARwBUgF5Af8XAALsAf8MAAEHA+wB/wUAARoBmgF6
AVIDCQK1AgkBuwFYARoBegH/FwAC7AH/DQABBwHsAf8GAAEaAXoBwwF6AVgB3AQJAbsBUgKaAXoB/xcA
A/8OAAH/BwAB/wEaAXoBwwF6AZkBCQLcAQkBmQF6AZoBegH2MgAB/wEaAVkBegH/BAAB/wFZAXoB9hIA
AUIBTQE+BwABPgMAASgDAAFAAwABEAMAAQEBAAEBBQABgBcAA/8BAAT/AYcB4QIAAf4BfwH+AT8BgAEB
AgAB/AE/Af4BPwHAAQMCAAH4AR8B/gE/AcABAwIAAfABDwH+AT8BgAEBAgAB8AEHAf4BPwGAAQECAAHy
AQcB/gE/AYABAQIAAfYBJwH2ATcBgAEBAgAB/gE/AfIBJwGAAQECAAH+AT8B8AEHAYABAQIAAf4BPwHw
AQcBgAEBAgAB/gE/AfgBDwQAAf4BPwH8AR8EAAH+AT8B/gE/BAAB/gE/Af8BfwEAAQECAAT/AYMBwwIA
Cw==
</value>
</data>
<data name="btnSave.Text" xml:space="preserve">
<value>Guardar</value>
</data>
<data name="btnCancel.Text" xml:space="preserve">
<value>Cancelar</value>
</data>
</root>

View File

@ -197,7 +197,7 @@
AAEAAAD/////AQAAAAAAAAAMAgAAAFdTeXN0ZW0uV2luZG93cy5Gb3JtcywgVmVyc2lvbj00LjAuMC4w
LCBDdWx0dXJlPW5ldXRyYWwsIFB1YmxpY0tleVRva2VuPWI3N2E1YzU2MTkzNGUwODkFAQAAACZTeXN0
ZW0uV2luZG93cy5Gb3Jtcy5JbWFnZUxpc3RTdHJlYW1lcgEAAAAERGF0YQcCAgAAAAkDAAAADwMAAAAQ
CgAAAk1TRnQBSQFMAgEBAwEAAeABAAHgAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
CgAAAk1TRnQBSQFMAgEBAwEAAfABAAHwAQABEAEAARABAAT/AQkBAAj/AUIBTQE2AQQGAAE2AQQCAAEo
AwABQAMAARADAAEBAQABCAYAAQQYAAGAAgABgAMAAoABAAGAAwABgAEAAYABAAKAAgADwAEAAcAB3AHA
AQAB8AHKAaYBAAEzBQABMwEAATMBAAEzAQACMwIAAxYBAAMcAQADIgEAAykBAANVAQADTQEAA0IBAAM5
AQABgAF8Af8BAAJQAf8BAAGTAQAB1gEAAf8B7AHMAQABxgHWAe8BAAHWAucBAAGQAakBrQIAAf8BMwMA
@ -247,7 +247,7 @@
<value>3, 29</value>
</data>
<data name="lVMacros.Size" type="System.Drawing.Size, System.Drawing">
<value>527, 334</value>
<value>527, 342</value>
</data>
<data name="lVMacros.TabIndex" type="System.Int32, mscorlib">
<value>326</value>
@ -597,9 +597,6 @@
<data name="&gt;&gt;lbDelayTip.ZOrder" xml:space="preserve">
<value>5</value>
</data>
<metadata name="$this.Language" type="System.Globalization.CultureInfo, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>es</value>
</metadata>
<metadata name="$this.Localizable" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View File

@ -53,6 +53,7 @@
this.lbMacroRecorded = new System.Windows.Forms.Label();
this.pnlProfile = new System.Windows.Forms.Panel();
this.label1 = new System.Windows.Forms.Label();
this.cBMacroScanCode = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.pBProgram)).BeginInit();
this.pnlProgram.SuspendLayout();
this.pnlMacro.SuspendLayout();
@ -131,9 +132,9 @@
//
// cBProfiles
//
resources.ApplyResources(this.cBProfiles, "cBProfiles");
this.cBProfiles.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cBProfiles.FormattingEnabled = true;
resources.ApplyResources(this.cBProfiles, "cBProfiles");
this.cBProfiles.Name = "cBProfiles";
this.cBProfiles.SelectedIndexChanged += new System.EventHandler(this.lVUnloadTrigger_SelectedIndexChanged);
//
@ -164,7 +165,6 @@
//
// cBActions
//
resources.ApplyResources(this.cBActions, "cBActions");
this.cBActions.Cursor = System.Windows.Forms.Cursors.Default;
this.cBActions.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
this.cBActions.FormattingEnabled = true;
@ -173,13 +173,10 @@
resources.GetString("cBActions.Items1"),
resources.GetString("cBActions.Items2"),
resources.GetString("cBActions.Items3")});
resources.ApplyResources(this.cBActions, "cBActions");
this.cBActions.Name = "cBActions";
this.cBActions.SelectedIndexChanged += new System.EventHandler(this.cBActions_SelectedIndexChanged);
//
// openFileDialog1
//
resources.ApplyResources(this.openFileDialog1, "openFileDialog1");
//
// imageList1
//
this.imageList1.ColorDepth = System.Windows.Forms.ColorDepth.Depth8Bit;
@ -270,17 +267,18 @@
//
// pnlProgram
//
resources.ApplyResources(this.pnlProgram, "pnlProgram");
this.pnlProgram.Controls.Add(this.btnBrowse);
this.pnlProgram.Controls.Add(this.lbProgram);
this.pnlProgram.Controls.Add(this.pBProgram);
resources.ApplyResources(this.pnlProgram, "pnlProgram");
this.pnlProgram.Name = "pnlProgram";
//
// pnlMacro
//
resources.ApplyResources(this.pnlMacro, "pnlMacro");
this.pnlMacro.Controls.Add(this.cBMacroScanCode);
this.pnlMacro.Controls.Add(this.btnRecordMacro);
this.pnlMacro.Controls.Add(this.lbMacroRecorded);
resources.ApplyResources(this.pnlMacro, "pnlMacro");
this.pnlMacro.Name = "pnlMacro";
//
// lbMacroRecorded
@ -290,10 +288,10 @@
//
// pnlProfile
//
resources.ApplyResources(this.pnlProfile, "pnlProfile");
this.pnlProfile.Controls.Add(this.label1);
this.pnlProfile.Controls.Add(this.cBProfiles);
this.pnlProfile.Controls.Add(this.btnSetUTrigger);
resources.ApplyResources(this.pnlProfile, "pnlProfile");
this.pnlProfile.Name = "pnlProfile";
//
// label1
@ -301,13 +299,19 @@
resources.ApplyResources(this.label1, "label1");
this.label1.Name = "label1";
//
// cBMacroScanCode
//
resources.ApplyResources(this.cBMacroScanCode, "cBMacroScanCode");
this.cBMacroScanCode.Name = "cBMacroScanCode";
this.cBMacroScanCode.UseVisualStyleBackColor = true;
//
// SpecActions
//
resources.ApplyResources(this, "$this");
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
this.BackColor = System.Drawing.SystemColors.Control;
this.Controls.Add(this.pnlProfile);
this.Controls.Add(this.pnlMacro);
this.Controls.Add(this.pnlProfile);
this.Controls.Add(this.pnlProgram);
this.Controls.Add(this.tBName);
this.Controls.Add(this.cBActions);
@ -322,6 +326,7 @@
((System.ComponentModel.ISupportInitialize)(this.pBProgram)).EndInit();
this.pnlProgram.ResumeLayout(false);
this.pnlMacro.ResumeLayout(false);
this.pnlMacro.PerformLayout();
this.pnlProfile.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -353,5 +358,6 @@
private System.Windows.Forms.Panel pnlProfile;
public System.Windows.Forms.Label lbMacroRecorded;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.CheckBox cBMacroScanCode;
}
}

View File

@ -55,7 +55,12 @@ namespace DS4Windows
}
switch (act.type)
{
case "Macro": cBActions.SelectedIndex = 1; macrostag = act.macro; lbMacroRecorded.Text = "Macro Recored"; break;
case "Macro":
cBActions.SelectedIndex = 1;
macrostag = act.macro;
lbMacroRecorded.Text = "Macro Recored";
cBMacroScanCode.Checked = act.keyType.HasFlag(DS4KeyType.ScanCode);
break;
case "Program": cBActions.SelectedIndex = 2; LoadProgram(act.details); break;
case "Profile":
cBActions.SelectedIndex = 3;
@ -130,11 +135,11 @@ namespace DS4Windows
case 1:
if (macrostag.Count > 0)
{
action = "Macro";
action = "Macro" + (cBMacroScanCode.Checked ? " (Scan Code)" : "");
actRe = true;
if (!string.IsNullOrEmpty(oldprofilename) && oldprofilename != tBName.Text)
Global.RemoveAction(oldprofilename);
Global.SaveAction(tBName.Text, String.Join("/", controls), cBActions.SelectedIndex, String.Join("/", macrostag), edit);
Global.SaveAction(tBName.Text, String.Join("/", controls), cBActions.SelectedIndex, String.Join("/", macrostag), edit, (cBMacroScanCode.Checked ? "Scan Code" : ""));
}
break;
case 2:

File diff suppressed because it is too large Load Diff