{"record":{"id":"9c0b14835a101b08","repo":"mgth/LittleBigMouse","slug":"invalid-remote-key-token","errorCode":null,"errorMessage":"Invalid remote key: {token}","messagePattern":"Invalid remote key: (.+?)","errorType":"validation","errorClass":"FormatException","httpStatus":null,"severity":"error","filePath":"LittleBigMouse.Plugins/LittleBigMouse.Plugin.Vcp.Avalonia/RemoteMacro.cs","lineNumber":28,"sourceCode":"        var result = new List<(string Key, TimeSpan DelayAfter)>();\n        var tokens = sequence.Split(\n            [',', ';', '+', '\\n', '\\r'],\n            StringSplitOptions.RemoveEmptyEntries | StringSplitOptions.TrimEntries);\n\n        foreach (var token in tokens)\n        {\n            if (int.TryParse(token, out var milliseconds))\n            {\n                if (result.Count == 0) throw new FormatException(\"A delay must follow a KEY_ command.\");\n                if (milliseconds is < 0 or > 10000)\n                    throw new FormatException(\"Macro delays must be between 0 and 10000 ms.\");\n                result[^1] = (result[^1].Key, TimeSpan.FromMilliseconds(milliseconds));\n                continue;\n            }\n\n            var key = token.ToUpperInvariant();\n            if (!key.StartsWith(\"KEY_\", StringComparison.Ordinal) || key.Any(char.IsWhiteSpace))\n                throw new FormatException($\"Invalid remote key: {token}\");\n            result.Add((key, TimeSpan.FromMilliseconds(150)));\n        }\n\n        if (result.Count == 0) throw new FormatException(\"Enter at least one KEY_ command.\");\n        return result;\n    }\n}\n","sourceCodeStart":10,"sourceCodeEnd":36,"githubUrl":"https://github.com/mgth/LittleBigMouse/blob/7a42f01d47d99d223b8ee33ba4019af82adf1c48/LittleBigMouse.Plugins/LittleBigMouse.Plugin.Vcp.Avalonia/RemoteMacro.cs#L10-L36","documentation":"Thrown by RemoteMacro.Parse when a token is neither a numeric delay nor a recognized remote-key name: the uppercase token does not start with 'KEY_' (or fails key validation). It is a generic input-validation guard; the at-fault input is the offending token embedded in the message, e.g. 'volume_up' or 'btn1'.","triggerScenarios":"Thrown at LittleBigMouse.Plugins/LittleBigMouse.Plugin.Vcp.Avalonia/RemoteMacro.cs:28 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Rewrite the token as a valid KEY_ command, e.g. 'KEY_VOLUP' instead of 'volume_up'.","Remove stray separators or typos that produced an unparseable token from splitting on ',', ';', '+', or newlines.","Consult the supported Samsung/VIDAA key list and use one of the accepted KEY_ names."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7a42f01d47d99d223b8ee33ba4019af82adf1c48","analyzedAt":"2026-09-16T00:35:00.514Z","contentChangedAt":"2026-09-16T00:35:00.514Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}