Correct order of key releases when using Win + Print Screen

Related to question in #228.
This commit is contained in:
Travis Nickles 2018-03-24 01:37:42 -05:00
parent f8dfef41d9
commit 5608620779

View File

@ -552,6 +552,7 @@ namespace DS4Windows
{ {
if (btnRecord.Text == Properties.Resources.StopText && (macros.Count != 0 || (recordAfter && macrosAfter.Count != 0))) if (btnRecord.Text == Properties.Resources.StopText && (macros.Count != 0 || (recordAfter && macrosAfter.Count != 0)))
{ {
lVMacros.BeginUpdate();
int value = WhichKey(e, 1); int value = WhichKey(e, 1);
if (cBRecordDelays.Checked) if (cBRecordDelays.Checked)
{ {
@ -561,9 +562,18 @@ namespace DS4Windows
sw.Start(); sw.Start();
} }
if (e.KeyCode == Keys.PrintScreen)
{
int tempvalue = WhichKey(e, 0);
AddMacroValue(tempvalue);
lVMacros.Items.Add(((Keys)value).ToString(), 0);
lVMacros.Items[lVMacros.Items.Count - 1].EnsureVisible();
}
AddMacroValue(value); AddMacroValue(value);
lVMacros.Items.Add(((Keys)value).ToString(), 1); lVMacros.Items.Add(((Keys)value).ToString(), 1);
lVMacros.Items[lVMacros.Items.Count - 1].EnsureVisible(); lVMacros.Items[lVMacros.Items.Count - 1].EnsureVisible();
lVMacros.EndUpdate();
} }
} }
private void anyMouseDown(object sender, MouseEventArgs e) private void anyMouseDown(object sender, MouseEventArgs e)