Update keyboard localisation refactor snapshot

This commit is contained in:
Babib3l
2026-03-18 21:10:28 +01:00
parent 2fe5e8c40d
commit 84f3ce2ca5
22 changed files with 708 additions and 325 deletions

View File

@@ -0,0 +1,19 @@
namespace Ryujinx.Common.Configuration.Hid
{
public static class KeyboardKeyExtensions
{
public static Key ToKey(this PhysicalKey key)
{
return key is >= PhysicalKey.Unknown and < PhysicalKey.Count
? (Key)(int)key
: Key.Unknown;
}
public static PhysicalKey ToPhysicalKey(this Key key)
{
return key is >= Key.Unknown and < Key.Count
? (PhysicalKey)(int)key
: PhysicalKey.Unknown;
}
}
}