From 20703711be81d0ff3439c594cf42573604fac518 Mon Sep 17 00:00:00 2001 From: Rune580 Date: Sun, 7 Apr 2024 13:30:43 -0400 Subject: [PATCH 1/3] initial impl for generated enums for InputSystem device layouts --- .../ControlEnumsGenerator.cs | 129 + .../LethalCompanyInputUtils.SourceGen.csproj | 36 + .../Properties/launchSettings.json | 9 + .../Schema/Control.cs | 13 + .../Schema/ControlLayout.cs | 14 + .../Schema/ControlLayouts.cs | 9 + .../SourceBuilder.cs | 57 + .../StringUtils.cs | 60 + LethalCompanyInputUtils.sln | 10 +- .../Api/InputActionAttribute.cs | 21 + LethalCompanyInputUtils/Api/LcInputActions.cs | 7 +- .../LethalCompanyInputUtils.csproj | 8 + .../LethalCompanyInputUtilsPlugin.cs | 2 + .../Utils/LayoutExporter.cs | 78 + device_layouts.json | 3900 +++++++++++++++++ 15 files changed, 4350 insertions(+), 3 deletions(-) create mode 100644 LethalCompanyInputUtils.SourceGen/ControlEnumsGenerator.cs create mode 100644 LethalCompanyInputUtils.SourceGen/LethalCompanyInputUtils.SourceGen.csproj create mode 100644 LethalCompanyInputUtils.SourceGen/Properties/launchSettings.json create mode 100644 LethalCompanyInputUtils.SourceGen/Schema/Control.cs create mode 100644 LethalCompanyInputUtils.SourceGen/Schema/ControlLayout.cs create mode 100644 LethalCompanyInputUtils.SourceGen/Schema/ControlLayouts.cs create mode 100644 LethalCompanyInputUtils.SourceGen/SourceBuilder.cs create mode 100644 LethalCompanyInputUtils.SourceGen/StringUtils.cs create mode 100644 LethalCompanyInputUtils/Utils/LayoutExporter.cs create mode 100644 device_layouts.json diff --git a/LethalCompanyInputUtils.SourceGen/ControlEnumsGenerator.cs b/LethalCompanyInputUtils.SourceGen/ControlEnumsGenerator.cs new file mode 100644 index 0000000..805af5d --- /dev/null +++ b/LethalCompanyInputUtils.SourceGen/ControlEnumsGenerator.cs @@ -0,0 +1,129 @@ +using System.Collections.Generic; +using System.Linq; +using LethalCompanyInputUtils.SourceGen.Schema; +using Microsoft.CodeAnalysis; +using Newtonsoft.Json; + +namespace LethalCompanyInputUtils.SourceGen; + +[Generator] +public class ControlEnumsGenerator : ISourceGenerator +{ + public void Initialize(GeneratorInitializationContext context) + { + + } + + public void Execute(GeneratorExecutionContext context) + { + var files = context.AdditionalFiles; + + foreach (var contents in Enumerable.OfType(files).Select(file => file.GetText()?.ToString())) + { + if (contents is null) + return; + + var controlLayouts = JsonConvert.DeserializeObject(contents); + if (controlLayouts is null) + continue; + + var layouts = new Dictionary(); + + foreach (var layout in controlLayouts.Layouts) + { + if (!string.IsNullOrEmpty(layout.Extend) && layouts.TryGetValue(layout.Extend, out var parentLayout)) + { + var extendedControls = layout.Controls; + foreach (var extendedControl in extendedControls) + extendedControl.SourceLayout = layout.Name; + + var controls = new List(parentLayout.Controls); + controls.AddRange(extendedControls); + + parentLayout.Controls = controls.ToArray(); + + layouts[layout.Extend] = parentLayout; + } + else + { + layouts[layout.Name] = layout; + } + } + + foreach (var kvp in layouts) + { + var layout = kvp.Value; + + var builder = new SourceBuilder(); + + var enumName = $"{layout.Name}Control"; + + builder.AppendLine("// ") + .AppendLine("") + .AppendLine("using System;") + .AppendLine("") + .AppendLine("namespace LethalCompanyInputUtils.BindingPathEnums;") + .AppendLine("") + .AppendLine($"public enum {enumName}") + .AppendLine("{") + .IncrementDepth(); + + builder.AppendLine("/// ") + .AppendLine("/// Unbound or No bind, Same as ") + .AppendLine("/// ") + .AppendLine("None,"); + + builder.AppendLine("/// ") + .AppendLine("/// Unbound or No bind, Same as ") + .AppendLine("/// ") + .AppendLine("Unbound = None,"); + + foreach (var control in layout.Controls) + { + var variant = control.Name.ToPascalCase(); + + builder.AppendLine("/// ") + .AppendLine($"/// Bind Path: <{layout.Name}>/{control.Name}") + .AppendLine("/// ") + .AppendLine($"{variant},"); + } + + builder.DecrementDepth() + .AppendLine("}") + .AppendLine(""); + + var enumVarName = enumName.ToCamelCase(); + + builder.AppendLine($"public static class {enumName}Extensions") + .AppendLine("{") + .IncrementDepth() + .AppendLine($"public static string ToPath(this {enumName} {enumVarName})") + .AppendLine("{") + .IncrementDepth() + .AppendLine($"return {enumVarName} switch {{") + .IncrementDepth(); + + builder.AppendLine($"{enumName}.None => \"\","); + + foreach (var control in layout.Controls) + { + var variant = control.Name.ToPascalCase(); + + var layoutName = control.SourceLayout ?? layout.Name; + + builder.AppendLine($"{enumName}.{variant} => \"<{layoutName}>/{control.Name}\","); + } + + builder.AppendLine($"_ => throw new ArgumentOutOfRangeException(nameof({enumVarName}), {enumVarName}, null)") + .DecrementDepth() + .AppendLine("};") + .DecrementDepth() + .AppendLine("}") + .DecrementDepth() + .AppendLine("}"); + + context.AddSource($"{enumName}.g.cs", builder.ToString()); + } + } + } +} \ No newline at end of file diff --git a/LethalCompanyInputUtils.SourceGen/LethalCompanyInputUtils.SourceGen.csproj b/LethalCompanyInputUtils.SourceGen/LethalCompanyInputUtils.SourceGen.csproj new file mode 100644 index 0000000..74a5337 --- /dev/null +++ b/LethalCompanyInputUtils.SourceGen/LethalCompanyInputUtils.SourceGen.csproj @@ -0,0 +1,36 @@ + + + + netstandard2.0 + false + enable + latest + + true + true + + LethalCompanyInputUtils.SourceGen + LethalCompanyInputUtils.SourceGen + + + + + all + runtime; build; native; contentfiles; analyzers; buildtransitive + + + + + + + + $(GetTargetPathDependsOn);GetDependencyTargetPaths + + + + + + + + + diff --git a/LethalCompanyInputUtils.SourceGen/Properties/launchSettings.json b/LethalCompanyInputUtils.SourceGen/Properties/launchSettings.json new file mode 100644 index 0000000..91124ef --- /dev/null +++ b/LethalCompanyInputUtils.SourceGen/Properties/launchSettings.json @@ -0,0 +1,9 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "profiles": { + "DebugRoslynSourceGenerator": { + "commandName": "DebugRoslynComponent", + "targetProject": "../LethalCompanyInputUtils.SourceGen.Sample/LethalCompanyInputUtils.SourceGen.Sample.csproj" + } + } +} \ No newline at end of file diff --git a/LethalCompanyInputUtils.SourceGen/Schema/Control.cs b/LethalCompanyInputUtils.SourceGen/Schema/Control.cs new file mode 100644 index 0000000..b314030 --- /dev/null +++ b/LethalCompanyInputUtils.SourceGen/Schema/Control.cs @@ -0,0 +1,13 @@ +using System; + +namespace LethalCompanyInputUtils.SourceGen.Schema; + +[Serializable] +public class Control +{ + public string Name { get; set; } = ""; + + public string DisplayName { get; set; } = ""; + + public string? SourceLayout { get; set; } +} \ No newline at end of file diff --git a/LethalCompanyInputUtils.SourceGen/Schema/ControlLayout.cs b/LethalCompanyInputUtils.SourceGen/Schema/ControlLayout.cs new file mode 100644 index 0000000..7f8b1c7 --- /dev/null +++ b/LethalCompanyInputUtils.SourceGen/Schema/ControlLayout.cs @@ -0,0 +1,14 @@ +using System; +using Newtonsoft.Json; + +namespace LethalCompanyInputUtils.SourceGen.Schema; + +[Serializable] +public class ControlLayout +{ + public string Name { get; set; } = ""; + + public string Extend { get; set; } = ""; + + public Control[] Controls { get; set; } = []; +} \ No newline at end of file diff --git a/LethalCompanyInputUtils.SourceGen/Schema/ControlLayouts.cs b/LethalCompanyInputUtils.SourceGen/Schema/ControlLayouts.cs new file mode 100644 index 0000000..f20652d --- /dev/null +++ b/LethalCompanyInputUtils.SourceGen/Schema/ControlLayouts.cs @@ -0,0 +1,9 @@ +using System; + +namespace LethalCompanyInputUtils.SourceGen.Schema; + +[Serializable] +public class ControlLayouts +{ + public ControlLayout[] Layouts { get; set; } = []; +} \ No newline at end of file diff --git a/LethalCompanyInputUtils.SourceGen/SourceBuilder.cs b/LethalCompanyInputUtils.SourceGen/SourceBuilder.cs new file mode 100644 index 0000000..f6d2478 --- /dev/null +++ b/LethalCompanyInputUtils.SourceGen/SourceBuilder.cs @@ -0,0 +1,57 @@ +using System.Text; + +namespace LethalCompanyInputUtils.SourceGen; + +internal class SourceBuilder +{ + private readonly StringBuilder _builder = new(); + private int _depth; + private bool _usedTabsThisLine; + + public SourceBuilder IncrementDepth() + { + _depth++; + + return this; + } + + public SourceBuilder DecrementDepth() + { + _depth--; + + if (_depth < 0 ) + _depth = 0; + + return this; + } + + public SourceBuilder Append(string text) + { + if (!_usedTabsThisLine) + { + for (int i = 0; i < _depth; i++) + _builder.Append('\t'); + + _usedTabsThisLine = false; + } + + _builder.Append(text); + + return this; + } + + public SourceBuilder AppendLine(string line) + { + Append(line); + + _builder.Append('\n'); + _usedTabsThisLine = false; + + return this; + } + + public override string ToString() + { + return _builder.ToString(); + } +} \ No newline at end of file diff --git a/LethalCompanyInputUtils.SourceGen/StringUtils.cs b/LethalCompanyInputUtils.SourceGen/StringUtils.cs new file mode 100644 index 0000000..cba2689 --- /dev/null +++ b/LethalCompanyInputUtils.SourceGen/StringUtils.cs @@ -0,0 +1,60 @@ +namespace LethalCompanyInputUtils.SourceGen; + +internal static class StringUtils +{ + public static string ToCamelCase(this string text) + { + var textLowerCase = text.ToLower(); + + var textCamelCase = ""; + for (int i = 0; i < text.Length; i++) + { + if (i == 0) + { + textCamelCase += textLowerCase[i]; + continue; + } + + textCamelCase += text[i]; + } + + return textCamelCase; + } + + public static string ToPascalCase(this string text) + { + if (int.TryParse(text, out var num)) + return $"Num{num}"; + + var textUpperCase = text.ToUpper(); + var capitalizeNext = false; + + var textPascalCase = ""; + for (int i = 0; i < text.Length; i++) + { + if (i == 0) + { + textPascalCase += textUpperCase[i]; + continue; + } + + if (text[i] == ' ' || text[i] == '/') + { + capitalizeNext = true; + continue; + } + + if (capitalizeNext) + { + capitalizeNext = false; + textPascalCase += textUpperCase[i]; + } + else + { + textPascalCase += text[i]; + } + } + + return textPascalCase; + } +} \ No newline at end of file diff --git a/LethalCompanyInputUtils.sln b/LethalCompanyInputUtils.sln index 8abad28..d737138 100644 --- a/LethalCompanyInputUtils.sln +++ b/LethalCompanyInputUtils.sln @@ -13,17 +13,23 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution CHANGELOG.md = CHANGELOG.md EndProjectSection EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LethalCompanyInputUtils.SourceGen", "LethalCompanyInputUtils.SourceGen\LethalCompanyInputUtils.SourceGen.csproj", "{D0544F61-1C64-44A0-A2BB-6DC53C41F2A2}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU Release|Any CPU = Release|Any CPU EndGlobalSection GlobalSection(ProjectConfigurationPlatforms) = postSolution - {566DD797-F558-4E46-92A7-31080C736C97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {566DD797-F558-4E46-92A7-31080C736C97}.Release|Any CPU.ActiveCfg = Release|Any CPU + {566DD797-F558-4E46-92A7-31080C736C97}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {566DD797-F558-4E46-92A7-31080C736C97}.Release|Any CPU.ActiveCfg = Release|Any CPU {94E68A23-78B8-4D27-BCA6-B14C238F9D67}.Debug|Any CPU.ActiveCfg = Debug|Any CPU {94E68A23-78B8-4D27-BCA6-B14C238F9D67}.Debug|Any CPU.Build.0 = Debug|Any CPU {94E68A23-78B8-4D27-BCA6-B14C238F9D67}.Release|Any CPU.ActiveCfg = Release|Any CPU {94E68A23-78B8-4D27-BCA6-B14C238F9D67}.Release|Any CPU.Build.0 = Release|Any CPU + {D0544F61-1C64-44A0-A2BB-6DC53C41F2A2}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {D0544F61-1C64-44A0-A2BB-6DC53C41F2A2}.Debug|Any CPU.Build.0 = Debug|Any CPU + {D0544F61-1C64-44A0-A2BB-6DC53C41F2A2}.Release|Any CPU.ActiveCfg = Release|Any CPU + {D0544F61-1C64-44A0-A2BB-6DC53C41F2A2}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection EndGlobal diff --git a/LethalCompanyInputUtils/Api/InputActionAttribute.cs b/LethalCompanyInputUtils/Api/InputActionAttribute.cs index f0b5c80..99b5e25 100644 --- a/LethalCompanyInputUtils/Api/InputActionAttribute.cs +++ b/LethalCompanyInputUtils/Api/InputActionAttribute.cs @@ -1,4 +1,5 @@ using System; +using LethalCompanyInputUtils.BindingPathEnums; using UnityEngine.InputSystem; namespace LethalCompanyInputUtils.Api; @@ -20,6 +21,18 @@ public InputActionAttribute(string kbmPath) KbmPath = kbmPath; } + /// The default Keyboard bind + public InputActionAttribute(KeyboardControl keyboardControl) + { + KbmPath = keyboardControl.ToPath(); + } + + /// The default Mouse bind + public InputActionAttribute(MouseControl mouseControl) + { + KbmPath = mouseControl.ToPath(); + } + public readonly string KbmPath; /// @@ -29,9 +42,17 @@ public InputActionAttribute(string kbmPath) /// /// The default bind for Gamepad devices. + /// For using an GamepadControl enum, use instead. + /// Takes priority when both this and are set. /// public string? GamepadPath { get; set; } + /// + /// The default bind for Gamepad devices. + /// For using a string path, use instead. + /// + public GamepadControl GamepadControl { get; set; } + public InputActionType ActionType { get; set; } = InputActionType.Button; /// diff --git a/LethalCompanyInputUtils/Api/LcInputActions.cs b/LethalCompanyInputUtils/Api/LcInputActions.cs index edd1981..cc03965 100644 --- a/LethalCompanyInputUtils/Api/LcInputActions.cs +++ b/LethalCompanyInputUtils/Api/LcInputActions.cs @@ -4,6 +4,7 @@ using System.Linq; using System.Reflection; using BepInEx; +using LethalCompanyInputUtils.BindingPathEnums; using LethalCompanyInputUtils.Config; using LethalCompanyInputUtils.Data; using LethalCompanyInputUtils.Utils; @@ -53,7 +54,11 @@ protected LcInputActions() continue; attr.ActionId ??= prop.Name; - attr.GamepadPath ??= UnboundGamepadIdentifier; + + attr.GamepadPath ??= attr.GamepadControl.ToPath(); + if (string.IsNullOrEmpty(attr.GamepadPath)) + attr.GamepadPath = UnboundGamepadIdentifier; + var kbmPath = string.IsNullOrWhiteSpace(attr.KbmPath) ? UnboundKeyboardAndMouseIdentifier : attr.KbmPath; mapBuilder.NewActionBinding() diff --git a/LethalCompanyInputUtils/LethalCompanyInputUtils.csproj b/LethalCompanyInputUtils/LethalCompanyInputUtils.csproj index 2e35f2f..4e5604e 100644 --- a/LethalCompanyInputUtils/LethalCompanyInputUtils.csproj +++ b/LethalCompanyInputUtils/LethalCompanyInputUtils.csproj @@ -18,6 +18,14 @@ + + + + + + + + ..\.gameReferences\ ..\libs\ diff --git a/LethalCompanyInputUtils/LethalCompanyInputUtilsPlugin.cs b/LethalCompanyInputUtils/LethalCompanyInputUtilsPlugin.cs index 85b6d59..3e4062b 100644 --- a/LethalCompanyInputUtils/LethalCompanyInputUtilsPlugin.cs +++ b/LethalCompanyInputUtils/LethalCompanyInputUtilsPlugin.cs @@ -46,6 +46,8 @@ private void Awake() ModCompat.Init(this); Logging.Info($"InputUtils {ModVersion} has finished loading!"); + + LayoutExporter.TryExportLayouts(); } private static void LoadAssetBundles() diff --git a/LethalCompanyInputUtils/Utils/LayoutExporter.cs b/LethalCompanyInputUtils/Utils/LayoutExporter.cs new file mode 100644 index 0000000..6e95dcd --- /dev/null +++ b/LethalCompanyInputUtils/Utils/LayoutExporter.cs @@ -0,0 +1,78 @@ +using System; +using System.IO; +using System.Text; +using UnityEngine; +using UnityEngine.InputSystem; +using UnityEngine.InputSystem.Layouts; + +namespace LethalCompanyInputUtils.Utils; + +internal static class LayoutExporter +{ + private static readonly InputControlLayout[] Layouts = [ + InputSystem.LoadLayout(), + InputSystem.LoadLayout(), + InputSystem.LoadLayout() + ]; + + /// + /// Helper method for exporting device layouts to a json file, checks for the require launch argument `--inputUtilsExportLayoutsToDir=PATH` + /// THIS WILL CLOSE THE GAME AFTER SUCCESSFULLY RUNNING!!!! + /// + public static void TryExportLayouts() + { + var args = Environment.GetCommandLineArgs(); + + string? exportDir = null; + foreach (var arg in args) + { + if (!arg.StartsWith("--inputUtilsExportLayoutsToDir=")) + continue; + + var argParts = arg.Split('='); + if (argParts.Length != 2) + continue; + + exportDir = argParts[1]; + } + + if (exportDir is null) + return; + + try + { + ExportLayouts(Layouts, Path.Combine(exportDir, "device_layouts.json")); + Application.Quit(); + } + catch (Exception e) + { + Logging.Error(e); + } + } + + public static void ExportLayouts(InputControlLayout[] layouts, string filePath) + { + var builder = new StringBuilder(); + + builder.AppendLine("{"); + builder.AppendLine("\t\"layouts\": ["); + + foreach (var layout in layouts) + { + var layoutJson = layout.ToJson(); + + var lines = layoutJson.Split("\n"); + foreach (var line in lines) + builder.AppendLine($"\t\t{line}"); + + builder.Remove(builder.Length - 2, 2); + builder.AppendLine(","); + } + + builder.Remove(builder.Length - 3, 1); + builder.AppendLine("\t]"); + builder.AppendLine("}"); + + File.WriteAllText(filePath, builder.ToString()); + } +} \ No newline at end of file diff --git a/device_layouts.json b/device_layouts.json new file mode 100644 index 0000000..d0ec999 --- /dev/null +++ b/device_layouts.json @@ -0,0 +1,3900 @@ +{ + "layouts": [ + { + "name": "Keyboard", + "extend": "", + "extendMultiple": [], + "format": "KEYS", + "beforeRender": "", + "runInBackground": "", + "commonUsages": [], + "displayName": "", + "description": "", + "type": "UnityEngine.InputSystem.Keyboard, Unity.InputSystem, Version=1.7.0.0, Culture=neutral, PublicKeyToken=null", + "variant": "", + "isGenericTypeOfDevice": true, + "hideInUI": false, + "controls": [ + { + "name": "anyKey", + "layout": "AnyKey", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 4294967295, + "sizeInBits": 109, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Any Key", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": true, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "escape", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 60, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "Back", + "Cancel" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Escape", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "space", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 1, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Space", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "enter", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 2, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "Submit" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Enter", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "tab", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 3, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Tab", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "backquote", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 4, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "`", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "quote", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 5, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "'", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "semicolon", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 6, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": ";", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "comma", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 7, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": ",", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "period", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 8, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": ".", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "slash", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 9, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "/", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "backslash", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 10, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "\\", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "leftBracket", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 11, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "[", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "rightBracket", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 12, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "]", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "minus", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 13, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "-", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "equals", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 14, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "=", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "upArrow", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 63, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Up Arrow", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "downArrow", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 64, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Down Arrow", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "leftArrow", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 61, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Left Arrow", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "rightArrow", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 62, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Right Arrow", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "a", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 15, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "A", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "b", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 16, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "B", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "c", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 17, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "C", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "d", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 18, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "D", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "e", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 19, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "E", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "f", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 20, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "F", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "g", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 21, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "G", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "h", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 22, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "H", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "i", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 23, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "I", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "j", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 24, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "J", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "k", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 25, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "K", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "l", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 26, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "L", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "m", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 27, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "M", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "n", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 28, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "N", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "o", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 29, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "O", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "p", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 30, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "P", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "q", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 31, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Q", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "r", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 32, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "R", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "s", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 33, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "S", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "t", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 34, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "T", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "u", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 35, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "U", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "v", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 36, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "V", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "w", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 37, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "W", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "x", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 38, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "X", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "y", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 39, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Y", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "z", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 40, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Z", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "1", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 41, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "1", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "2", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 42, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "2", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "3", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 43, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "3", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "4", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 44, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "4", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "5", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 45, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "5", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "6", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 46, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "6", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "7", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 47, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "7", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "8", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 48, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "8", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "9", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 49, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "9", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "0", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 50, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "0", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "leftShift", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 51, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "Modifier" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Left Shift", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "rightShift", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 52, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "Modifier" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Right Shift", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "shift", + "layout": "DiscreteButton", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 51, + "sizeInBits": 2, + "format": "", + "arraySize": 0, + "usages": [ + "Modifier" + ], + "aliases": [], + "parameters": "minValue=1,maxValue=3,writeMode=1", + "processors": "", + "displayName": "Shift", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": true, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "leftAlt", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 53, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "Modifier" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Left Alt", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "rightAlt", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 54, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "Modifier" + ], + "aliases": [ + "AltGr" + ], + "parameters": "", + "processors": "", + "displayName": "Right Alt", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "alt", + "layout": "DiscreteButton", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 53, + "sizeInBits": 2, + "format": "", + "arraySize": 0, + "usages": [ + "Modifier" + ], + "aliases": [], + "parameters": "minValue=1,maxValue=3,writeMode=1", + "processors": "", + "displayName": "Alt", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": true, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "leftCtrl", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 55, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "Modifier" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Left Control", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "rightCtrl", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 56, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "Modifier" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Right Control", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "ctrl", + "layout": "DiscreteButton", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 55, + "sizeInBits": 2, + "format": "", + "arraySize": 0, + "usages": [ + "Modifier" + ], + "aliases": [], + "parameters": "minValue=1,maxValue=3,writeMode=1", + "processors": "", + "displayName": "Control", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": true, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "leftMeta", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 57, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "Modifier" + ], + "aliases": [ + "LeftWindows", + "LeftApple", + "LeftCommand" + ], + "parameters": "", + "processors": "", + "displayName": "Left System", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "rightMeta", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 58, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "Modifier" + ], + "aliases": [ + "RightWindows", + "RightApple", + "RightCommand" + ], + "parameters": "", + "processors": "", + "displayName": "Right System", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "contextMenu", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 59, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "Modifier" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Context Menu", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "backspace", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 65, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Backspace", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "pageDown", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 66, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Page Down", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "pageUp", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 67, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Page Up", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "home", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 68, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Home", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "end", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 69, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "End", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "insert", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 70, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Insert", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "delete", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 71, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Delete", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "capsLock", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 72, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Caps Lock", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numLock", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 73, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Num Lock", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "printScreen", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 74, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Print Screen", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "scrollLock", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 75, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Scroll Lock", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "pause", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 76, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Pause/Break", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpadEnter", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 77, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad Enter", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpadDivide", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 78, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad /", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpadMultiply", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 79, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad *", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpadPlus", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 80, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad +", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpadMinus", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 81, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad -", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpadPeriod", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 82, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad .", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpadEquals", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 83, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad =", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpad1", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 85, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad 1", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpad2", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 86, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad 2", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpad3", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 87, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad 3", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpad4", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 88, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad 4", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpad5", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 89, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad 5", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpad6", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 90, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad 6", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpad7", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 91, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad 7", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpad8", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 92, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad 8", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpad9", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 93, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad 9", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "numpad0", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 84, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Numpad 0", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "f1", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 94, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "F1", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "f2", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 95, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "F2", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "f3", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 96, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "F3", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "f4", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 97, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "F4", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "f5", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 98, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "F5", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "f6", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 99, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "F6", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "f7", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 100, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "F7", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "f8", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 101, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "F8", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "f9", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 102, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "F9", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "f10", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 103, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "F10", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "f11", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 104, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "F11", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "f12", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 105, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "F12", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "OEM1", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 106, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "OEM2", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 107, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "OEM3", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 108, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "OEM4", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 109, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "OEM5", + "layout": "Key", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 110, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "IMESelected", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 111, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": true, + "defaultState": "", + "minValue": "", + "maxValue": "" + } + ] + }, + { + "name": "Mouse", + "extend": "Pointer", + "extendMultiple": [], + "format": "MOUS", + "beforeRender": "", + "runInBackground": "", + "commonUsages": [], + "displayName": "", + "description": "", + "type": "UnityEngine.InputSystem.Mouse, Unity.InputSystem, Version=1.7.0.0, Culture=neutral, PublicKeyToken=null", + "variant": "", + "isGenericTypeOfDevice": true, + "hideInUI": false, + "controls": [ + { + "name": "scroll/up", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 4294967295, + "bit": 4294967295, + "sizeInBits": 0, + "format": "BIT ", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": true, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "scroll/down", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 4294967295, + "bit": 4294967295, + "sizeInBits": 0, + "format": "BIT ", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": true, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "scroll/left", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 4294967295, + "bit": 4294967295, + "sizeInBits": 0, + "format": "BIT ", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": true, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "scroll/right", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 4294967295, + "bit": 4294967295, + "sizeInBits": 0, + "format": "BIT ", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": true, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "position", + "layout": "Vector2", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 4294967295, + "sizeInBits": 0, + "format": "VEC2", + "arraySize": 0, + "usages": [ + "Point" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Position", + "shortDisplayName": "", + "noisy": false, + "dontReset": true, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "delta", + "layout": "Delta", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 8, + "bit": 4294967295, + "sizeInBits": 0, + "format": "VEC2", + "arraySize": 0, + "usages": [ + "Secondary2DMotion" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Delta", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "scroll", + "layout": "Delta", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 16, + "bit": 4294967295, + "sizeInBits": 0, + "format": "VEC2", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Scroll", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "scroll/x", + "layout": "", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 4294967295, + "bit": 4294967295, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "ScrollHorizontal" + ], + "aliases": [ + "horizontal" + ], + "parameters": "", + "processors": "", + "displayName": "Left/Right", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "scroll/y", + "layout": "", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 4294967295, + "bit": 4294967295, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "ScrollVertical" + ], + "aliases": [ + "vertical" + ], + "parameters": "", + "processors": "", + "displayName": "Up/Down", + "shortDisplayName": "Wheel", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "press", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 24, + "bit": 0, + "sizeInBits": 0, + "format": "USHT", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Press", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": true, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "leftButton", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 24, + "bit": 0, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "PrimaryAction" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Left Button", + "shortDisplayName": "LMB", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "rightButton", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 24, + "bit": 1, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "SecondaryAction" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Right Button", + "shortDisplayName": "RMB", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "middleButton", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 24, + "bit": 2, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Middle Button", + "shortDisplayName": "MMB", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "forwardButton", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 24, + "bit": 3, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "Forward" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Forward", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "backButton", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 24, + "bit": 4, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "Back" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Back", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "pressure", + "layout": "Axis", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 4294967294, + "bit": 4294967295, + "sizeInBits": 32, + "format": "FLT ", + "arraySize": 0, + "usages": [ + "Pressure" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Pressure", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "1", + "minValue": "", + "maxValue": "" + }, + { + "name": "radius", + "layout": "Vector2", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 4294967294, + "bit": 4294967295, + "sizeInBits": 64, + "format": "VEC2", + "arraySize": 0, + "usages": [ + "Radius" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Radius", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "pointerId", + "layout": "Digital", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 4294967294, + "bit": 4294967295, + "sizeInBits": 1, + "format": "BIT ", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "displayIndex", + "layout": "Integer", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 26, + "bit": 4294967295, + "sizeInBits": 0, + "format": "USHT", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Display Index", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "clickCount", + "layout": "Integer", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 28, + "bit": 4294967295, + "sizeInBits": 0, + "format": "USHT", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Click Count", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": true, + "defaultState": "", + "minValue": "", + "maxValue": "" + } + ] + }, + { + "name": "Gamepad", + "extend": "", + "extendMultiple": [], + "format": "GPAD", + "beforeRender": "", + "runInBackground": "", + "commonUsages": [], + "displayName": "", + "description": "", + "type": "UnityEngine.InputSystem.Gamepad, Unity.InputSystem, Version=1.7.0.0, Culture=neutral, PublicKeyToken=null", + "variant": "", + "isGenericTypeOfDevice": true, + "hideInUI": false, + "controls": [ + { + "name": "dpad", + "layout": "Dpad", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 0, + "sizeInBits": 4, + "format": "BIT ", + "arraySize": 0, + "usages": [ + "Hatswitch" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "D-Pad", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "buttonSouth", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 6, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "PrimaryAction", + "Submit" + ], + "aliases": [ + "a", + "cross" + ], + "parameters": "", + "processors": "", + "displayName": "Button South", + "shortDisplayName": "A", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "buttonWest", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 7, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "SecondaryAction" + ], + "aliases": [ + "x", + "square" + ], + "parameters": "", + "processors": "", + "displayName": "Button West", + "shortDisplayName": "X", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "buttonNorth", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 4, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [ + "y", + "triangle" + ], + "parameters": "", + "processors": "", + "displayName": "Button North", + "shortDisplayName": "Y", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "buttonEast", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 5, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "Back", + "Cancel" + ], + "aliases": [ + "b", + "circle" + ], + "parameters": "", + "processors": "", + "displayName": "Button East", + "shortDisplayName": "B", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "leftStickPress", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 8, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Left Stick Press", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "rightStickPress", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 9, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Right Stick Press", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "leftShoulder", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 10, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Left Shoulder", + "shortDisplayName": "LB", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "rightShoulder", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 11, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Right Shoulder", + "shortDisplayName": "RB", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "start", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 12, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [ + "Menu" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Start", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "select", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 0, + "bit": 13, + "sizeInBits": 0, + "format": "", + "arraySize": 0, + "usages": [], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Select", + "shortDisplayName": "", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "leftStick", + "layout": "Stick", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 4, + "bit": 4294967295, + "sizeInBits": 0, + "format": "VEC2", + "arraySize": 0, + "usages": [ + "Primary2DMotion" + ], + "aliases": [], + "parameters": "", + "processors": "stickDeadzone", + "displayName": "Left Stick", + "shortDisplayName": "LS", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "rightStick", + "layout": "Stick", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 12, + "bit": 4294967295, + "sizeInBits": 0, + "format": "VEC2", + "arraySize": 0, + "usages": [ + "Secondary2DMotion" + ], + "aliases": [], + "parameters": "", + "processors": "stickDeadzone", + "displayName": "Right Stick", + "shortDisplayName": "RS", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "leftTrigger", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 20, + "bit": 4294967295, + "sizeInBits": 0, + "format": "FLT ", + "arraySize": 0, + "usages": [ + "SecondaryTrigger" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Left Trigger", + "shortDisplayName": "LT", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + }, + { + "name": "rightTrigger", + "layout": "Button", + "variants": "", + "usage": "", + "alias": "", + "useStateFrom": "", + "offset": 24, + "bit": 4294967295, + "sizeInBits": 0, + "format": "FLT ", + "arraySize": 0, + "usages": [ + "SecondaryTrigger" + ], + "aliases": [], + "parameters": "", + "processors": "", + "displayName": "Right Trigger", + "shortDisplayName": "RT", + "noisy": false, + "dontReset": false, + "synthetic": false, + "defaultState": "", + "minValue": "", + "maxValue": "" + } + ] + } + ] +} From 2c2db41875f174caa5cb2131524860ba02ea0030 Mon Sep 17 00:00:00 2001 From: Rune580 Date: Thu, 11 Apr 2024 11:42:26 -0400 Subject: [PATCH 2/3] add builder methods for input enums --- .../Api/InputActionBindingBuilder.cs | 33 ++++++++++++++++++- 1 file changed, 32 insertions(+), 1 deletion(-) diff --git a/LethalCompanyInputUtils/Api/InputActionBindingBuilder.cs b/LethalCompanyInputUtils/Api/InputActionBindingBuilder.cs index 36f29e6..117347d 100644 --- a/LethalCompanyInputUtils/Api/InputActionBindingBuilder.cs +++ b/LethalCompanyInputUtils/Api/InputActionBindingBuilder.cs @@ -1,4 +1,5 @@ -using LethalCompanyInputUtils.Utils; +using LethalCompanyInputUtils.BindingPathEnums; +using LethalCompanyInputUtils.Utils; using UnityEngine.InputSystem; namespace LethalCompanyInputUtils.Api; @@ -39,6 +40,26 @@ public InputActionBindingBuilder WithKbmPath(string kbmPath) return this; } + public InputActionBindingBuilder WithKeyboardControl(KeyboardControl keyboardControl) + { + _kbmPath = keyboardControl.ToPath(); + + if (string.IsNullOrWhiteSpace(_kbmPath)) + return WithKbmPathUnbound(); + + return this; + } + + public InputActionBindingBuilder WithMouseControl(MouseControl mouseControl) + { + _kbmPath = mouseControl.ToPath(); + + if (string.IsNullOrWhiteSpace(_kbmPath)) + return WithKbmPathUnbound(); + + return this; + } + public InputActionBindingBuilder WithKbmPathUnbound() { _kbmPath = LcInputActions.UnboundKeyboardAndMouseIdentifier; @@ -54,6 +75,16 @@ public InputActionBindingBuilder WithGamepadPath(string gamepadPath) return this; } + + public InputActionBindingBuilder WithGamepadControl(GamepadControl control) + { + _gamepadPath = control.ToPath(); + + if (string.IsNullOrWhiteSpace(_gamepadPath)) + return WithGamepadPathUnbound(); + + return this; + } public InputActionBindingBuilder WithGamepadPathUnbound() { From 575855260b4a58ef26935ccd2bf34c3e3c5639ca Mon Sep 17 00:00:00 2001 From: Rune580 Date: Sun, 14 Apr 2024 09:42:03 -0400 Subject: [PATCH 3/3] update docs for using the enums --- README.md | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 6e40712..e3a038d 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,7 @@ Extract the zip and add a reference to the dll file of the mod in Visual Studio ```csharp public class MyExampleInputClass : LcInputActions { - [InputAction("/g", Name = "Explode")] + [InputAction(KeyboardControl.G, Name = "Explode")] public InputAction ExplodeKey { get; set; } [InputAction("/h", Name = "Another")] public InputAction AnotherKey { get; set; } @@ -63,15 +63,18 @@ public class MyExampleInputClass : LcInputActions > [!IMPORTANT] > For actions to be registered to the API, **Properties MUST be annotated with `[InputAction(...)]`** >```csharp ->[InputAction("YourkbmPath", Name = "", GamepadPath = "", KbmInteractions = "", GamepadInteractions = "", ActionID = "", ActionType = InputActionType...)] +>[InputAction("YourkbmPath" /* You can also use a KeyboardControl or MouseControl */, Name = "", GamepadPath = "", GamepadControl = GamepadControl.None, KbmInteractions = "", GamepadInteractions = "", ActionID = "", ActionType = InputActionType...)] >``` #### Required Parameters +You only need to use **one** of the following overloads: * `kbmPath`: The default bind for Keyboard and Mouse devices +* `keyboardControl`: The default bind for Keyboard devices, uses the KeyboardControl Enum +* `mouseControl`: The default bind for Mouse devices, uses the MouseControl Enum #### Optional Parameters * `Name`: The Displayed text in the game keybinds menu -* `GamepadPath`: The default bind for Gamepad devices +* `GamepadPath` **_or_** `GamepadControl`: The default bind for Gamepad devices. When both are set, `GamepadPath` will take priority. * `KbmInteractions`: Sets the interactions of the kbm binding. See [Interactions Docs](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.7/api/UnityEngine.InputSystem.Interactions.html) * `GamepadInteractions`: Sets the interactions of the gamepad binding. See [Interactions Docs](https://docs.unity3d.com/Packages/com.unity.inputsystem@1.7/api/UnityEngine.InputSystem.Interactions.html) @@ -81,12 +84,12 @@ public class MyExampleInputClass : LcInputActions So your Attribute could be written like this: ```csharp -[InputAction("/minus", Name = "Explode")] +[InputAction(KeyboardControl.Minus, Name = "Explode")] public InputAction ExplodeKey { get; set; } ``` Or with any combination of optional parameters: ```csharp -[InputAction("/minus", Name = "Explode", GamepadPath = "/Button North", KbmInteractions = "hold(duration = 5)")] +[InputAction(KeyboardControl.Minus, Name = "Explode", GamepadControl = GamepadControl.ButtonNorth, KbmInteractions = "hold(duration = 5)")] public InputAction ExplodeKey { get; set; } ``` > [!NOTE] @@ -113,13 +116,18 @@ public class MyExampleInputClass : LcInputActions builder.NewActionBinding() .WithActionId("explodekey") .WithActionType(InputActionType.Button) - .WithKbmPath("/j") + .WithKeyboardControl(KeyboardControl.J) // or .WithKbmPath("/j") + .WithGamepadControl(GamepadControl.ButtonNorth) // or .WithGamepadPath("/buttonNorth") .WithBindingName("Explode") .Finish(); } } ``` +> [!IMPORTANT] +> Omitting `WithGamepadControl`, `WithGamepadPath`, or `WithGamepadUnbound`, will disable binding the `InputAction` to a Gamepad device. +> Similarly, omitting `WithKeyboardControl`, `WithMouseControl`, `WithKbmPath`, or `WithKbmUnbound`, will disable binding the `InputAction` to a Keyboard or Mouse device. + ### Referencing Your Binds To use your InputActions class, you need to instantiate it. @@ -142,15 +150,6 @@ public class MyExamplePlugin : BaseUnityPlugin } ``` -> [!IMPORTANT] -> #### But How Do I Get My Binds String? -> You may have noticed that `/yourKey` can be a little confusing for the special buttons. So try this: -> 1. First, arbitrarily set the value to some regular value or just an empty string -> 2. Then, load up your mod and change the keybind to the desired key -> 3. After, look in your `.../BepInEx/controls/YOURMODID.json` file -> 4. Find the `{"action":"myaction","origPath":"","path":"/f8"}]}` -> 5. Last, copy that `path:""` from the far right i.e. `"/f8"` - ### Using Your Binds You could then simply reference the instance anywhere you need to have your actions at. ```csharp