mirror of
https://github.com/cemu-project/DS4Windows.git
synced 2024-11-29 04:24:19 +01:00
parent
caa1d92c2e
commit
6baeb51b58
@ -278,11 +278,12 @@ namespace DS4WinWPF.DS4Forms
|
|||||||
{
|
{
|
||||||
if (recordBoxVM.Recording)
|
if (recordBoxVM.Recording)
|
||||||
{
|
{
|
||||||
int value = KeyInterop.VirtualKeyFromKey(e.Key);
|
Key tempKey = e.SystemKey == Key.None ? e.Key : e.SystemKey;
|
||||||
|
int value = KeyInterop.VirtualKeyFromKey(tempKey);
|
||||||
recordBoxVM.KeysdownMap.TryGetValue(value, out bool isdown);
|
recordBoxVM.KeysdownMap.TryGetValue(value, out bool isdown);
|
||||||
if (!isdown)
|
if (!isdown)
|
||||||
{
|
{
|
||||||
DS4Windows.MacroStep step = new DS4Windows.MacroStep(KeyInterop.VirtualKeyFromKey(e.Key), e.Key.ToString(),
|
DS4Windows.MacroStep step = new DS4Windows.MacroStep(value, tempKey.ToString(),
|
||||||
DS4Windows.MacroStep.StepType.ActDown, DS4Windows.MacroStep.StepOutput.Key);
|
DS4Windows.MacroStep.StepType.ActDown, DS4Windows.MacroStep.StepOutput.Key);
|
||||||
recordBoxVM.AddMacroStep(step);
|
recordBoxVM.AddMacroStep(step);
|
||||||
recordBoxVM.KeysdownMap.Add(value, true);
|
recordBoxVM.KeysdownMap.Add(value, true);
|
||||||
@ -303,11 +304,12 @@ namespace DS4WinWPF.DS4Forms
|
|||||||
{
|
{
|
||||||
if (recordBoxVM.Recording)
|
if (recordBoxVM.Recording)
|
||||||
{
|
{
|
||||||
int value = KeyInterop.VirtualKeyFromKey(e.Key);
|
Key tempKey = e.SystemKey == Key.None ? e.Key : e.SystemKey;
|
||||||
|
int value = KeyInterop.VirtualKeyFromKey(tempKey);
|
||||||
recordBoxVM.KeysdownMap.TryGetValue(value, out bool isdown);
|
recordBoxVM.KeysdownMap.TryGetValue(value, out bool isdown);
|
||||||
if (isdown)
|
if (isdown)
|
||||||
{
|
{
|
||||||
DS4Windows.MacroStep step = new DS4Windows.MacroStep(KeyInterop.VirtualKeyFromKey(e.Key), e.Key.ToString(),
|
DS4Windows.MacroStep step = new DS4Windows.MacroStep(value, tempKey.ToString(),
|
||||||
DS4Windows.MacroStep.StepType.ActUp, DS4Windows.MacroStep.StepOutput.Key);
|
DS4Windows.MacroStep.StepType.ActUp, DS4Windows.MacroStep.StepOutput.Key);
|
||||||
recordBoxVM.AddMacroStep(step);
|
recordBoxVM.AddMacroStep(step);
|
||||||
recordBoxVM.KeysdownMap.Remove(value);
|
recordBoxVM.KeysdownMap.Remove(value);
|
||||||
|
Loading…
Reference in New Issue
Block a user