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 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.
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 (4)
public static KeyMapPreset Parse(string name, string yaml)Reads a preset from the same YAML a keymap is written in.
public static KeyMapPreset Of(string name, IEnumerable<KeyValuePair<string, KeyChord>> bindings)Builds one from bindings already in hand.
public string Save()Writes it back out in the format Parse reads.
public override string ToString()Returns a string that represents the current object.
Used by (4)
- KeyMapVixen.Editor.Ui
- KeyMapPresetTestsVixen.Editor.Ui.Tests
- KeyMapPresetsVixen.Editor.Ui
- MilestoneE3TestsVixen.Editor.App.Tests