Keyboard Shortcuts: Export Text… also saves a printable shortcut sheet

Export Text…'s save dialog in the desktop app offers two file types:
Text (the text file as before, still the first and default type) and
Shortcut sheet (PDF). The type picked decides the file.

The sheet lists the rows that have a shortcut, Tools and then a group
per top-level menu, each under a colored band, shortcut on the left and
name on the right. The groups flow down four columns of landscape Letter
or A4 pages, titled with the set's name. A row with several shortcuts
has a line for each, a shortcut too wide for its column is set smaller,
and a long name ends in "…". The sheet is laid out as a document and
written by the PDF writer.

shortcuts.exportText takes `format` ("text" or "sheet"; default text)
and `pageSize` ("letter" or "a4"). Without `pageSize` the sheet is on A4
when the current document prints on A4, else on Letter. A `path` is
written as given, as text without `format`, and a bad value is an error.
When `format` names a format, or the save dialog reports the type
picked, the name the dialog returns gets that format's extension, and a
file already at the changed path is replaced only after asking.

Docs: docs/mcp.md, docs/target-app-parity.md.
This commit is contained in:
dotCooCoo
2026-11-15 10:20:55 -08:00
parent 5bd8acfce9
commit 6bc3249fdf
9 changed files with 896 additions and 23 deletions
+32 -8
View File
@@ -6300,18 +6300,42 @@ path and label, with its id when the row shows it, and the key runs what a click
{id}`. A removed plug-in's row goes away and its key runs nothing; its shortcut stays saved and applies again when a
plug-in with the same id is installed.
`shortcuts.exportText {path?}` saves the current set's shortcut list as a UTF-8 text file, as Edit › Keyboard
Shortcuts › Export Text… does with the dialog's set as edited so far. The file starts with a "Keyboard Shortcuts" line
and a "Set:" line with the set's name, followed by a Tools section and a Menu Commands section. Each section lists the
rows Edit › Keyboard Shortcuts lists, in its order and with names as it shows them: one line per row, with the name, a
tab and the shortcuts as the dialog shows them on the current platform. A row with no shortcut ends after the tab.
Without `path` a save dialog asks for the file. A `path` that is not a string, or a file that cannot be written,
returns an error, and nothing is written. The layout is VectorCraft's own. The reference app's [Export keyboard
shortcuts list as a text document](https://helpx.adobe.com/illustrator/desktop/get-started/preferences-and-settings/export-keyboard-shortcuts-list.html)
`shortcuts.exportText {path?, format?, pageSize?}` saves the current set's shortcut list as a UTF-8 text file, as
Edit › Keyboard Shortcuts › Export Text… does with the dialog's set as edited so far. The file starts with a "Keyboard
Shortcuts" line and a "Set:" line with the set's name, followed by a Tools section and a Menu Commands section. Each
section lists the rows Edit › Keyboard Shortcuts lists, in its order and with names as it shows them: one line per
row, with the name, a tab and the shortcuts as the dialog shows them on the current platform. A row with no shortcut
ends after the tab. Without `path` a save dialog asks for the file. A `path` that is not a string, or a file that
cannot be written, returns an error, and nothing is written. The layout is VectorCraft's own. The reference app's
[Export keyboard shortcuts list as a text document](https://helpx.adobe.com/illustrator/desktop/get-started/preferences-and-settings/export-keyboard-shortcuts-list.html)
page describes saving the list from the Keyboard Shortcuts dialog as a text file, and does not describe its layout.
`format` picks the file: `"text"` (the default) writes the text file above and `"sheet"` a printable shortcut sheet
as a PDF. A `path` is written as given, in the format `format` names, or as text without `format`. In the desktop
app, without `path`, the save dialog offers both formats (Text and Shortcut sheet, Text first) unless `format` names
one, and the file type picked in it decides. When `format` names a format, or the dialog reports the type picked, the
name the dialog returns gets that format's extension (`.txt` or `.pdf`): one of these extensions is replaced, and the
extension is added to any other name. When that names a file that is already there, a question asks before replacing
it. The web app downloads the format `format` names, text without it. With no file dialog, file writer or download,
the command returns the file: the text file as `text`, the sheet in base64 as `pdf`. A `format` other than `"text"`
or `"sheet"`, or a `pageSize` other than `"letter"` or `"a4"` (lowercase), returns an error, and nothing is written.
The shortcut sheet lists the rows that have a shortcut in groups: the Tools rows under the Tools group, then each
top-level menu as a group, in the order the dialog first lists a command of it, with the command named without its
top-level menu. The group names, command names and shortcuts are in the UI language, as the dialog shows them. Each
group has a colored band with its name, and below it the rows, the shortcut on the left and the name on the right. The
groups flow down four columns of landscape pages and onto more pages when they do not fit. `pageSize` is `"letter"`
(792 × 612 pt) or `"a4"` (841.89 × 595.28 pt). Without it the sheet is on A4 when the current document prints on A4
(its print settings, or, with none saved, a first artboard of A4 size), and on Letter otherwise. Each page is titled
with "Keyboard Shortcuts" and the set's name. A group that continues in the next column repeats its band there. A row
with several shortcuts has a line for each, kept in one column unless the row is taller than a column. A shortcut is
never shortened: one too wide for its column is set smaller. A name too long for its column ends in "…". The type is
Source Sans 3, which VectorCraft bundles and which has the macOS modifier symbols (⌃ ⌥ ⇧ ⌘). Characters it does not
have are drawn in another font the app has loaded, when one has them. The layout is VectorCraft's own.
```json
{"name":"run_command","arguments":{"command":"shortcuts.exportText","params":{"path":"/Users/me/Shortcuts.txt"}}}
{"name":"run_command","arguments":{"command":"shortcuts.exportText","params":{"path":"/Users/me/Shortcuts.pdf","format":"sheet","pageSize":"a4"}}}
```
The desktop app adds its active artboard, the one the Artboards panel highlights, to the `object.align`,
+1 -1
View File
@@ -1096,7 +1096,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
- Cmd/Ctrl+F6 (`window.nextDocument`) and Cmd/Ctrl+Shift+F6 (`window.previousDocument`) make the next and the previous open document the current one, in tab order and as a click on its tab does, on the keys the reference app's [Default keyboard shortcuts](https://web.archive.org/web/20260726060015/https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html) page lists for navigating to the next and the previous document. After the last document comes the first, and before the first document comes the last. From the Home screen the keys go to the first and the last document. Keyboard Shortcuts lists both under Window.
- Cmd/Ctrl+Alt+Shift+U (`document.switchUnits`) switches the document to the next unit of measurement, in one undo step, on the key the reference app's [Default keyboard shortcuts](https://web.archive.org/web/20260726060015/https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html) page lists for switching units of measurement. The page does not give an order. VectorCraft steps through the units in the order a right-click on a ruler lists them (Points, Picas, Inches, Millimeters, Centimeters, Pixels, Feet & Inches, Meters, Yards, Feet) and goes from Feet back to Points.
- Shortcut sets other apps save as text (`.kys`) open in Import Shortcut Set from File › Open, from Edit › Keyboard Shortcuts › Import… in the desktop app, or from a drop on the window. It matches each entry to a tool, command or panel by name and decodes the file's key and modifier codes where VectorCraft's default shortcuts agree on them; the user answers the rest, and Apply fills the Keyboard Shortcuts dialog's working set. The answers are kept with the preferences for the next import (`shortcutSet.read`, `importMatches.*`).
- Edit › Keyboard Shortcuts › Export Text… saves the set shown in the dialog as a UTF-8 text file, as the reference app's [Export keyboard shortcuts list as a text document](https://helpx.adobe.com/illustrator/desktop/get-started/preferences-and-settings/export-keyboard-shortcuts-list.html) page describes (`shortcuts.exportText {path?}`). The layout is VectorCraft's own: the set's name, then the Tools and Menu Commands rows in the dialog's order, each with its name, a tab and its shortcuts as the dialog shows them, and nothing after the tab for a row with no shortcut. Tests `shortcut_editor::tests::export_text_*` and `tests::picks::keyboard_shortcuts_export_text_writes_the_working_set_as_text`.
- Edit › Keyboard Shortcuts › Export Text… saves the set shown in the dialog as a UTF-8 text file, as the reference app's [Export keyboard shortcuts list as a text document](https://helpx.adobe.com/illustrator/desktop/get-started/preferences-and-settings/export-keyboard-shortcuts-list.html) page describes (`shortcuts.exportText {path?, format?, pageSize?}`). The layout is VectorCraft's own: the set's name, then the Tools and Menu Commands rows in the dialog's order, each with its name, a tab and its shortcuts as the dialog shows them, and nothing after the tab for a row with no shortcut. In the desktop app its save dialog also offers a printable shortcut sheet as a PDF, which `format: "sheet"` also picks (`pageSize: "letter" | "a4"`, A4 when the current document prints on A4): the rows with a shortcut under a colored band per group, in columns on landscape pages, a layout of VectorCraft's own. Tests `shortcut_editor::tests::export_text_*`, `shortcut_editor::tests::export_sections_*`, `shortcut_editor::tests::the_save_dialogs_answer_picks_the_export_text_format`, `shortcut_editor::tests::the_sheet_is_on_a4_when_the_document_prints_on_a4`, `shortcut_sheet::tests::*`, `tests::picks::keyboard_shortcuts_export_text_*` and `tests::picks::export_text_with_a_format_gives_the_answered_name_its_extension`.
- On Windows and Linux the app bar is the window's title bar (its own minimize, maximize and close buttons, drag to move, edges to resize), with the dragon app icon as the brand mark; dialogs and menus size to their content. As on a native menu bar, once one menu is open, moving the pointer onto another title opens that one.
- On Linux and the BSDs, when the desktop leaves the window's frame to the app (a Wayland session without server-side decorations, such as GNOME) and the window is not opened through XWayland, the app bar's window buttons follow the `button-layout` key of `org.gnome.desktop.wm.preferences` ([schema](https://gitlab.gnome.org/GNOME/gsettings-desktop-schemas/-/blob/master/schemas/org.gnome.desktop.wm.preferences.gschema.xml.in)): Close alone at the right, all three at the left, or split between the ends, in the listed order with the first one leftmost. When the key cannot be read or names no window button, and for an app frame turned on by `VECTORCRAFT_TITLEBAR=app` or VectorCraft Title Bar on Every Desktop, all three stay at the right. Tests `titlebar::tests::caption_buttons_follow_the_caption_layout`, `tests::the_caption_buttons_follow_the_frame_layout` and `tests::the_start_frame_applies_the_app_title_bar_preference`.
- On Linux and the BSDs, Preferences › User Interface › VectorCraft Title Bar on Every Desktop (off by default) uses the app bar as the title bar from the next start in the sessions where the desktop would draw the window's frame (X11, Wayland compositors with server-side decorations such as KDE Plasma, a window opened through XWayland). System Title Bar and `VECTORCRAFT_TITLEBAR` take precedence over it, and `VECTORCRAFT_TITLEBAR` also takes precedence over System Title Bar for the run it is set in. Only the values `app`, `system` and `desktop` take precedence (case-sensitive, surrounding spaces ignored); any other value, such as `unknown`, is ignored and does not override System Title Bar.