mirror of
https://github.com/babalae/better-genshin-impact
synced 2025-01-08 11:57:53 +08:00
19 lines
346 B
C#
19 lines
346 B
C#
using System;
|
|
using Vanara.PInvoke;
|
|
|
|
namespace BetterGenshinImpact.Helpers;
|
|
|
|
public class User32Helper
|
|
{
|
|
public static User32.VK ToVk(string key)
|
|
{
|
|
key = key.ToUpper();
|
|
if (!key.StartsWith("VK_"))
|
|
{
|
|
key = $"VK_{key}";
|
|
}
|
|
|
|
return (User32.VK)Enum.Parse(typeof(User32.VK), key);
|
|
}
|
|
}
|