public sealed class KeyMapPresetA named set of bindings that sits between the shipped defaults and the user's own.
No guide page documents this yet — the page shows what the code says about itself.
Remarks
The third layer, and doc 20's A5 is precise about why it has to be one. A preset applied by copying two hundred bindings into the user's file is a preset that stops being a preset the moment it is chosen: the next release moves a default and reaches nobody who ever picked Unreal, because their file now states every binding explicitly. Choosing a preset and then rebinding one key has to leave the other two hundred following the preset, which is only possible if the preset is a layer rather than an edit.
⚠ A preset maps the commands that exist. Doc 20's own risk table says this must be documented as "the bindings you know for the features we have" rather than as an emulation mode — a preset cannot bind Unreal's Landscape tools, because there are none. What it can do is put Play, Duplicate, Save All and the transform modes where the fingers of somebody who has used that editor for a decade already are.
The file format is a KeyMap's. A preset is a bindings: mapping of command id to chord, which is exactly what a user's keymap is — so a team can ship their own by writing one file, and a user can export their bindings and hand them to somebody as a preset.
⚠ The format is not here, and that is what let this class come down out of the editor. A preset is a named table of chords; writing one as YAML is a choice about where an application keeps its preferences, and a control library that made it would put a YAML parser in the dependency closure of every application that has a button. Vixen.Editor.Ui.KeyMapYaml is the editor's answer, and a game with a settings screen of its own can give a different one over the same Of.
Fields and properties (2)
public string NameWhat it is called, which is what a keymap file records.
public IReadOnlyDictionary<string, KeyChord> BindingsWhat it binds, as command id to chord.
Methods (2)
public static KeyMapPreset Of(string name, IEnumerable<KeyValuePair<string, KeyChord>> bindings)Builds one from bindings already in hand.
public override string ToString()Returns a string that represents the current object.
Used by (6)
- KeyMapVixen.Ui.Controls
- KeyMapTestsVixen.Ui.Controls.Tests
- KeyMapPresetTestsVixen.Editor.Ui.Tests
- KeyMapPresetsVixen.Editor.Ui
- KeyMapYamlVixen.Editor.Ui
- MilestoneE3TestsVixen.Editor.App.Tests