daily update on 20240423 by nitload youmu, mvvm confirm

This commit is contained in:
YoumuLiu
2024-04-24 02:52:43 +08:00
parent 915a560b43
commit 32c0a0f99b
35 changed files with 732 additions and 783 deletions
@@ -0,0 +1,26 @@
using System;
using System.Collections.Concurrent;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace StgSharp
{
public static partial class StgSharp
{
private static ConcurrentDictionary<int, bool> keyListener = new ConcurrentDictionary<int, bool>();
public static KeyStatus CheckKey(KeyboardKey key)
{
int keyId = (int)key;
if (keyListener.ContainsKey((int)keyId))
{
return keyListener[(int)keyId]?KeyStatus.PRESS:KeyStatus.RELEASE;
}
keyListener.AddOrUpdate
}
}
}