Vixen
dd8b0a81
csharp
public static class EditingCommands

The chord tables, one per platform, and the lookup both text controls go through.

Read the guide page for this →

Remarks

One edited table instead of two hand-maintained switches. TextField and CodeEditor each carried a switch (args.Key) over the same vocabulary, and they had already diverged on the question this type exists to answer: the field took Control or Meta with a comment saying the assembly could not know which platform it was on, and the editor took Control only — so ⌘← in the code editor moved by a single character on macOS while the same chord in a text box moved by a word.

⚠ Which table is a document's is a setting with a platform-derived default, not a compile-time question. A test that depended on the machine it ran on would be a suite that passes on Linux and fails on a Mac for a reason nobody could see in the diff; both fixtures pin Windows and the tables are compared against each other directly.

⚠ The exact chord is tried first and then the same one with Shift dropped, and every other modifier must match exactly. Shift says how for every motion — extend the selection — so a table that named it everywhere would double to say one bit; ⌘⇧Z is the one place it means something else, and it is macOS's only spelling of Redo. The switches this replaces used HasFlag, so ⌃⌥← was word motion — and ⌃⌥← is a window-management chord on two of the three desktops. Exactness is also what lets the macOS table give ⌥← and ⌘← two different meanings at all.

Fields and properties (1)

  • public static EditingKeymap Current

    The table this machine's platform expects.

Methods (2)

Used by (4)

  • CodeEditorVixen.Ui.Controls.Advanced
  • EditingCommandsTestsVixen.Ui.Tests
  • TextFieldVixen.Ui.Controls
  • UiDocumentVixen.Ui