mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-04 22:07:40 +00:00
Improve VirtualKeyCode to ToWindowsInput mapping
This commit is contained in:
parent
26171639eb
commit
801f32a719
3 changed files with 19 additions and 16 deletions
|
|
@ -389,4 +389,17 @@ namespace SteamController.ProfilesSettings
|
|||
// Windows 2000/XP: Start Application 2 key
|
||||
LAUNCH_APP2 = 183
|
||||
}
|
||||
|
||||
public static class VirtualKeyCodeExtensions
|
||||
{
|
||||
public static WindowsInput.VirtualKeyCode ToWindowsInput(this VirtualKeyCode code)
|
||||
{
|
||||
return (WindowsInput.VirtualKeyCode)code;
|
||||
}
|
||||
|
||||
public static WindowsInput.VirtualKeyCode ToWindowsInput(this System.Windows.Input.Key key)
|
||||
{
|
||||
return (WindowsInput.VirtualKeyCode)System.Windows.Input.KeyInterop.VirtualKeyFromKey(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue