mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-04-21 06:03:52 +00:00
Allow to assign BackPanel keys to X360 controller (breaks all current configs to set mappings)
This commit is contained in:
parent
476ca5a5e9
commit
9adb25be21
10 changed files with 158 additions and 28 deletions
|
|
@ -4,15 +4,10 @@ using System.Configuration;
|
|||
namespace SteamController.ProfilesSettings
|
||||
{
|
||||
[Category("Mappings")]
|
||||
internal sealed class BackPanelSettings : BaseSettings
|
||||
internal abstract class BackPanelSettings : BaseSettings
|
||||
{
|
||||
private const String MappingsDescription = @"Only some of those keys do work. Allowed mappings are to be changed in future release.";
|
||||
|
||||
public static BackPanelSettings X360 { get; } = (BackPanelSettings)ApplicationSettingsBase.Synchronized(
|
||||
new BackPanelSettings("X360BackPanelSettings"));
|
||||
public static BackPanelSettings Desktop { get; } = (BackPanelSettings)ApplicationSettingsBase.Synchronized(
|
||||
new BackPanelSettings("DesktopBackPanelSettings"));
|
||||
|
||||
public BackPanelSettings(String settingsKey) : base(settingsKey)
|
||||
{
|
||||
}
|
||||
|
|
@ -20,37 +15,37 @@ namespace SteamController.ProfilesSettings
|
|||
[UserScopedSettingAttribute()]
|
||||
[DefaultSettingValueAttribute("None")]
|
||||
[Description(MappingsDescription)]
|
||||
public VirtualKeyCode L4
|
||||
public VirtualKeyCode L4_KEY
|
||||
{
|
||||
get { return ((VirtualKeyCode)(this["L4"])); }
|
||||
set { this["L4"] = value; }
|
||||
get { return ((VirtualKeyCode)(this["L4_KEY"])); }
|
||||
set { this["L4_KEY"] = value; }
|
||||
}
|
||||
|
||||
[UserScopedSettingAttribute()]
|
||||
[DefaultSettingValueAttribute("None")]
|
||||
[Description(MappingsDescription)]
|
||||
public VirtualKeyCode L5
|
||||
public VirtualKeyCode L5_KEY
|
||||
{
|
||||
get { return ((VirtualKeyCode)(this["L5"])); }
|
||||
set { this["L5"] = value; }
|
||||
get { return ((VirtualKeyCode)(this["L5_KEY"])); }
|
||||
set { this["L5_KEY"] = value; }
|
||||
}
|
||||
|
||||
[UserScopedSettingAttribute()]
|
||||
[DefaultSettingValueAttribute("None")]
|
||||
[Description(MappingsDescription)]
|
||||
public VirtualKeyCode R4
|
||||
public VirtualKeyCode R4_KEY
|
||||
{
|
||||
get { return ((VirtualKeyCode)(this["R4"])); }
|
||||
set { this["R4"] = value; }
|
||||
get { return ((VirtualKeyCode)(this["R4_KEY"])); }
|
||||
set { this["R4_KEY"] = value; }
|
||||
}
|
||||
|
||||
[UserScopedSettingAttribute()]
|
||||
[DefaultSettingValueAttribute("None")]
|
||||
[Description(MappingsDescription)]
|
||||
public VirtualKeyCode R5
|
||||
public VirtualKeyCode R5_KEY
|
||||
{
|
||||
get { return ((VirtualKeyCode)(this["R5"])); }
|
||||
set { this["R5"] = value; }
|
||||
get { return ((VirtualKeyCode)(this["R5_KEY"])); }
|
||||
set { this["R5_KEY"] = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
15
SteamController/ProfilesSettings/DesktopPanelSettings.cs
Normal file
15
SteamController/ProfilesSettings/DesktopPanelSettings.cs
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
using System.ComponentModel;
|
||||
using System.Configuration;
|
||||
|
||||
namespace SteamController.ProfilesSettings
|
||||
{
|
||||
internal class DesktopPanelSettings : BackPanelSettings
|
||||
{
|
||||
public static DesktopPanelSettings Default { get; } = (DesktopPanelSettings)ApplicationSettingsBase.Synchronized(
|
||||
new DesktopPanelSettings("DesktopPanelSettings"));
|
||||
|
||||
public DesktopPanelSettings(String settingsKey) : base(settingsKey)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
24
SteamController/ProfilesSettings/VirtualX360Code.cs
Normal file
24
SteamController/ProfilesSettings/VirtualX360Code.cs
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
namespace SteamController.ProfilesSettings
|
||||
{
|
||||
public enum VirtualX360Code
|
||||
{
|
||||
None = 0,
|
||||
|
||||
X360_UP,
|
||||
X360_DOWN,
|
||||
X360_LEFT,
|
||||
X360_RIGHT,
|
||||
X360_BACK,
|
||||
X360_START,
|
||||
|
||||
X360_A,
|
||||
X360_B,
|
||||
X360_X,
|
||||
X360_Y,
|
||||
|
||||
X360_LB,
|
||||
X360_RB,
|
||||
X360_LS,
|
||||
X360_RS
|
||||
}
|
||||
}
|
||||
53
SteamController/ProfilesSettings/X360BackPanelSettings.cs
Normal file
53
SteamController/ProfilesSettings/X360BackPanelSettings.cs
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
using System.ComponentModel;
|
||||
using System.Configuration;
|
||||
|
||||
namespace SteamController.ProfilesSettings
|
||||
{
|
||||
internal class X360BackPanelSettings : BackPanelSettings
|
||||
{
|
||||
private const String MappingsDescription = @"Mappings are to be changed in future release.";
|
||||
|
||||
public static X360BackPanelSettings Default { get; } = (X360BackPanelSettings)ApplicationSettingsBase.Synchronized(
|
||||
new X360BackPanelSettings("X360BackPanelSettings"));
|
||||
|
||||
public X360BackPanelSettings(String settingsKey) : base(settingsKey)
|
||||
{
|
||||
}
|
||||
|
||||
[UserScopedSettingAttribute()]
|
||||
[DefaultSettingValueAttribute("None")]
|
||||
[Description(MappingsDescription)]
|
||||
public VirtualX360Code L4_X360
|
||||
{
|
||||
get { return ((VirtualX360Code)(this["L4_X360"])); }
|
||||
set { this["L4_X360"] = value; }
|
||||
}
|
||||
|
||||
[UserScopedSettingAttribute()]
|
||||
[DefaultSettingValueAttribute("None")]
|
||||
[Description(MappingsDescription)]
|
||||
public VirtualX360Code L5_X360
|
||||
{
|
||||
get { return ((VirtualX360Code)(this["L5_X360"])); }
|
||||
set { this["L5_X360"] = value; }
|
||||
}
|
||||
|
||||
[UserScopedSettingAttribute()]
|
||||
[DefaultSettingValueAttribute("None")]
|
||||
[Description(MappingsDescription)]
|
||||
public VirtualX360Code R4_X360
|
||||
{
|
||||
get { return ((VirtualX360Code)(this["R4_X360"])); }
|
||||
set { this["R4_X360"] = value; }
|
||||
}
|
||||
|
||||
[UserScopedSettingAttribute()]
|
||||
[DefaultSettingValueAttribute("None")]
|
||||
[Description(MappingsDescription)]
|
||||
public VirtualX360Code R5_X360
|
||||
{
|
||||
get { return ((VirtualX360Code)(this["R5_X360"])); }
|
||||
set { this["R5_X360"] = value; }
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue