From 56086207795fe84624f1d5f61544ba660639efa6 Mon Sep 17 00:00:00 2001 From: Travis Nickles Date: Sat, 24 Mar 2018 01:37:42 -0500 Subject: [PATCH] Correct order of key releases when using Win + Print Screen Related to question in #228. --- DS4Windows/DS4Forms/RecordBox.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/DS4Windows/DS4Forms/RecordBox.cs b/DS4Windows/DS4Forms/RecordBox.cs index 1549b6a..4a00275 100644 --- a/DS4Windows/DS4Forms/RecordBox.cs +++ b/DS4Windows/DS4Forms/RecordBox.cs @@ -552,6 +552,7 @@ namespace DS4Windows { if (btnRecord.Text == Properties.Resources.StopText && (macros.Count != 0 || (recordAfter && macrosAfter.Count != 0))) { + lVMacros.BeginUpdate(); int value = WhichKey(e, 1); if (cBRecordDelays.Checked) { @@ -561,9 +562,18 @@ namespace DS4Windows 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); lVMacros.Items.Add(((Keys)value).ToString(), 1); lVMacros.Items[lVMacros.Items.Count - 1].EnsureVisible(); + lVMacros.EndUpdate(); } } private void anyMouseDown(object sender, MouseEventArgs e)