From f09f47cdf531f787e8fc2f64e6652b2763058c4c Mon Sep 17 00:00:00 2001 From: "Mengyuan Chen (from Dev Box)" Date: Thu, 17 Apr 2025 15:16:27 +0800 Subject: [PATCH] optimize the name to ReleaseVirtualKey -> ReleaseKey --- src/common/UITestAutomation/KeyboardHelper.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/common/UITestAutomation/KeyboardHelper.cs b/src/common/UITestAutomation/KeyboardHelper.cs index 3e67b0b073..1892ab9dd3 100644 --- a/src/common/UITestAutomation/KeyboardHelper.cs +++ b/src/common/UITestAutomation/KeyboardHelper.cs @@ -112,14 +112,14 @@ namespace Microsoft.PowerToys.UITest SendWinKeyCombination(keysToSend); } - public static void PressVirtualKey(Key key) + public static void PressKey(Key key) { - PressKey(TranslateKeyHex(key)); + PressVirtualKey(TranslateKeyHex(key)); } - public static void ReleaseVirtualKey(Key key) + public static void ReleaseKey(Key key) { - ReleaseKey(TranslateKeyHex(key)); + ReleaseVirtualKey(TranslateKeyHex(key)); } /// @@ -317,7 +317,7 @@ namespace Microsoft.PowerToys.UITest /// /// Just press the key.(no release) /// - private static void PressKey(byte key) + private static void PressVirtualKey(byte key) { keybd_event(key, 0, KEYEVENTF_KEYDOWN, UIntPtr.Zero); } @@ -325,7 +325,7 @@ namespace Microsoft.PowerToys.UITest /// /// Release only the button (if pressed first) /// - private static void ReleaseKey(byte key) + private static void ReleaseVirtualKey(byte key) { keybd_event(key, 0, KEYEVENTF_KEYUP, UIntPtr.Zero); }