Keyboard Shortcuts: Export Text… also saves the list as a CSV file

Export Text…'s save dialog in the desktop app adds a CSV type after
Text and Shortcut sheet, and shortcuts.exportText takes `format: "csv"`.

The CSV file is UTF-8 with a byte order mark, CRLF line ends and RFC
4180 quoting. Its header row is Group,Command,Shortcut in every UI
language, then one record per row the dialog lists, in the sheet's
groups (Tools, then a group per top-level menu) with names and
shortcuts in the UI language. A row with no shortcut has an empty
Shortcut field. A field that starts with =, +, - or @ and has more
after it, or that starts with a tab or a carriage return, starts with
an apostrophe.

Docs: docs/mcp.md, docs/target-app-parity.md.
This commit is contained in:
dotCooCoo
2026-11-15 10:39:56 -08:00
parent 6bc3249fdf
commit 08b3c0b00a
8 changed files with 145 additions and 26 deletions
+1 -1
View File
@@ -182,7 +182,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
"shortcuts.exportText",
"Export Keyboard Shortcuts as Text…",
"",
"{path?, format?: \"text\"|\"sheet\" (default text), pageSize?: \"letter\"|\"a4\" (sheet only; default A4 when the current document prints on A4, else letter)} save the current set's tools and menu commands with their shortcuts (Keyboard Shortcuts › Export Text…). text: a UTF-8 text file: the set's name, then a Tools and a Menu Commands section in the dialog's order, one `name<TAB>shortcut` line per row, empty after the tab when it has none. sheet: a printable PDF on landscape pages that lists the rows with a shortcut, Tools and then a group per top-level menu, under a colored band per group, shortcut then name, in four columns. A `path` is written as given. Without it, pick a file: the desktop save dialog offers both formats (text first) unless `format` names one, and the file type picked decides and gives the name its extension; with no dialog, writer or download, returns {text} (text) or {pdf: base64} (sheet); a bad `format` or `pageSize` is an error",
"{path?, format?: \"text\"|\"sheet\"|\"csv\" (default text), pageSize?: \"letter\"|\"a4\" (sheet only; default A4 when the current document prints on A4, else letter)} save the current set's tools and menu commands with their shortcuts (Keyboard Shortcuts › Export Text…). text: a UTF-8 text file: the set's name, then a Tools and a Menu Commands section in the dialog's order, one `name<TAB>shortcut` line per row, empty after the tab when it has none. sheet: a printable PDF on landscape pages that lists the rows with a shortcut, Tools and then a group per top-level menu, under a colored band per group, shortcut then name, in four columns. csv: a UTF-8 CSV file (RFC 4180 quoting, CRLF) with a `Group,Command,Shortcut` header and one record per row in the sheet's groups, in the UI language; a field that starts with = + - @ and has more after it starts with '. A `path` is written as given. Without it, pick a file: the desktop save dialog offers the three formats (text first) unless `format` names one, and the file type picked decides and gives the name its extension; with no dialog, writer or download, returns {text} (text, csv) or {pdf: base64} (sheet); a bad `format` or `pageSize` is an error",
),
("shortcuts.import", "Import Keyboard Shortcuts…", "", "{path? | data?}"),
(
+1 -1
View File
@@ -183,7 +183,7 @@ pub const UI_COMMANDS: &[(&str, &str, &str, &str)] = &[
"shortcuts.exportText",
"Export Keyboard Shortcuts as Text…",
"",
"{path?, format?: \"text\"|\"sheet\" (default text), pageSize?: \"letter\"|\"a4\" (sheet only; default A4 when the current document prints on A4, else letter)} save the current set's tools and menu commands with their shortcuts (Keyboard Shortcuts › Export Text…). text: a UTF-8 text file: the set's name, then a Tools and a Menu Commands section in the dialog's order, one `name<TAB>shortcut` line per row, empty after the tab when it has none. sheet: a printable PDF on landscape pages that lists the rows with a shortcut, Tools and then a group per top-level menu, under a colored band per group, shortcut then name, in four columns. A `path` is written as given. Without it, pick a file: the desktop save dialog offers both formats (text first) unless `format` names one, and the file type picked decides and gives the name its extension; with no dialog, writer or download, returns {text} (text) or {pdf: base64} (sheet); a bad `format` or `pageSize` is an error",
"{path?, format?: \"text\"|\"sheet\"|\"csv\" (default text), pageSize?: \"letter\"|\"a4\" (sheet only; default A4 when the current document prints on A4, else letter)} save the current set's tools and menu commands with their shortcuts (Keyboard Shortcuts › Export Text…). text: a UTF-8 text file: the set's name, then a Tools and a Menu Commands section in the dialog's order, one `name<TAB>shortcut` line per row, empty after the tab when it has none. sheet: a printable PDF on landscape pages that lists the rows with a shortcut, Tools and then a group per top-level menu, under a colored band per group, shortcut then name, in four columns. csv: a UTF-8 CSV file (RFC 4180 quoting, CRLF) with a `Group,Command,Shortcut` header and one record per row in the sheet's groups, in the UI language; a field that starts with = + - @ and has more after it starts with '. A `path` is written as given. Without it, pick a file: the desktop save dialog offers the three formats (text first) unless `format` names one, and the file type picked decides and gives the name its extension; with no dialog, writer or download, returns {text} (text, csv) or {pdf: base64} (sheet); a bad `format` or `pageSize` is an error",
),
("shortcuts.import", "Import Keyboard Shortcuts…", "", "{path? | data?}"),
(
+49 -7
View File
@@ -1209,16 +1209,19 @@ pub enum TextFormat {
Text,
/// The printable shortcut sheet as a PDF ([`crate::shortcut_sheet::sheet_pdf`]).
Sheet,
/// A CSV file of [`export_sections`] ([`crate::shortcut_sheet::csv`]).
Csv,
}
impl TextFormat {
pub const ALL: [Self; 2] = [Self::Text, Self::Sheet];
pub const ALL: [Self; 3] = [Self::Text, Self::Sheet, Self::Csv];
/// The `format` param's value.
pub fn name(self) -> &'static str {
match self {
Self::Text => "text",
Self::Sheet => "sheet",
Self::Csv => "csv",
}
}
@@ -1226,6 +1229,7 @@ impl TextFormat {
match self {
Self::Text => "txt",
Self::Sheet => "pdf",
Self::Csv => "csv",
}
}
@@ -1234,6 +1238,7 @@ impl TextFormat {
let label = match self {
Self::Text => "Text",
Self::Sheet => "Shortcut sheet",
Self::Csv => "CSV",
};
crate::FilePick::filter(label, &[self.extension()])
}
@@ -1266,10 +1271,10 @@ impl TextFormat {
/// The section name for menu commands no menu holds, as Export Text's heading has it.
const MENU_COMMANDS: &str = "Menu Commands";
/// Export Text's rows in sections, for the shortcut sheet: Tools, then one section per top-level
/// menu in the order the dialog first lists a command of it, with the names and shortcuts as the
/// dialog shows them, each name without its top-level menu. Every row the dialog lists is there,
/// with an empty shortcut when it has none.
/// Export Text's rows in sections, for the shortcut sheet and the CSV file: Tools, then one section
/// per top-level menu in the order the dialog first lists a command of it, with the names and
/// shortcuts as the dialog shows them, each name without its top-level menu. Every row the dialog
/// lists is there, with an empty shortcut when it has none.
pub fn export_sections(overrides: &Overrides) -> Vec<crate::shortcut_sheet::Section> {
use crate::shortcut_sheet::{Row, Section};
let snapshot = snapshot();
@@ -1305,6 +1310,7 @@ fn export_text_file(format: TextFormat, set: &str, overrides: &Overrides, page:
let title = format!("{} · {}", tl!("Keyboard Shortcuts"), shown_set_name(set));
crate::shortcut_sheet::sheet_pdf(&title, &export_sections(overrides), page)
}
TextFormat::Csv => Ok(crate::shortcut_sheet::csv(&export_sections(overrides), ["Group", "Command", "Shortcut"]).into_bytes()),
}
}
@@ -2420,14 +2426,47 @@ mod tests {
assert!(sheet_as_named.1.starts_with(b"%PDF-"));
written.borrow_mut().clear();
let mut err = |p: Value| app.run("shortcuts.exportText", p);
assert_eq!(err(json!({"path": "/a/x", "format": "xlsx"})), Err("`format` must be one of text, sheet".to_string()));
assert_eq!(err(json!({"path": "/a/x", "format": "Sheet"})), Err("`format` must be one of text, sheet".to_string()));
assert_eq!(err(json!({"path": "/a/x", "format": "xlsx"})), Err("`format` must be one of text, sheet, csv".to_string()));
assert_eq!(err(json!({"path": "/a/x", "format": "Sheet"})), Err("`format` must be one of text, sheet, csv".to_string()));
assert_eq!(err(json!({"path": "/a/x", "format": 3})), Err("`format` must be a string".to_string()));
assert_eq!(err(json!({"path": "/a/x", "pageSize": "legal"})), Err("`pageSize` must be one of letter, a4".to_string()));
assert_eq!(err(json!({"path": "/a/x", "pageSize": "A4"})), Err("`pageSize` must be one of letter, a4".to_string()));
assert!(written.borrow().is_empty());
}
/// `format: "csv"` writes the CSV file: the `Group,Command,Shortcut` header, then a record per
/// row the dialog lists, every group and row of [`export_sections`] once. Without a file it
/// comes back under `text`.
#[test]
fn export_text_command_writes_a_csv_file() {
type Files = std::rc::Rc<std::cell::RefCell<Vec<(String, Vec<u8>)>>>;
let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default());
let written: Files = Default::default();
let (returned, files, sections) = with_steady_plugins(|| {
app.services.write = None;
written.borrow_mut().clear();
let returned = app.run("shortcuts.exportText", json!({"format": "csv"}));
let w = written.clone();
app.services.write = Some(Box::new(move |path: &str, b: &[u8]| {
w.borrow_mut().push((path.to_string(), b.to_vec()));
Ok(())
}));
app.run("shortcuts.exportText", json!({"path": "/a/list.csv", "format": "csv"})).unwrap();
(returned, written.borrow().clone(), export_sections(&app.ui.shortcut_overrides))
});
let [(path, bytes)] = files.as_slice() else { panic!("{} files", files.len()) };
assert_eq!(path, "/a/list.csv");
let text = String::from_utf8(bytes.clone()).unwrap();
assert_eq!(returned.unwrap()["text"].as_str(), Some(text.as_str()), "the same file without a writer");
assert_eq!(text, crate::shortcut_sheet::csv(&sections, ["Group", "Command", "Shortcut"]));
assert!(text.starts_with("\u{feff}Group,Command,Shortcut\r\nTools,"), "{text}");
let records = text.matches("\r\n").count();
assert_eq!(records, 1 + sections.iter().map(|s| s.rows.len()).sum::<usize>(), "a header and a record per row");
for s in &sections {
assert!(text.contains(&format!("\r\n{},", s.title)), "no {} group", s.title);
}
}
/// With no `pageSize` the sheet is on A4 when the current document prints on A4: its print
/// settings say so, or, with none saved, its first artboard is A4 either way up; else Letter.
#[test]
@@ -2477,6 +2516,9 @@ mod tests {
assert_eq!(TextFormat::with_extension("/a/list", TextFormat::Sheet), "/a/list.pdf");
assert_eq!(TextFormat::with_extension("/a/list.txt", TextFormat::Sheet), "/a/list.pdf");
assert_eq!(TextFormat::with_extension("/a/list", TextFormat::Text), "/a/list.txt");
assert_eq!(TextFormat::picked("/a/list.CSV", None), TextFormat::Csv);
assert_eq!(TextFormat::picked("/a/list", Some("csv")), TextFormat::Csv);
assert_eq!(TextFormat::with_extension("/a/list.pdf", TextFormat::Csv), "/a/list.csv");
assert_eq!(TextFormat::with_extension("/a/list.PDF", TextFormat::Sheet), "/a/list.PDF");
assert_eq!(TextFormat::with_extension("/a/v1.2", TextFormat::Sheet), "/a/v1.2.pdf");
}
+70 -2
View File
@@ -1,9 +1,10 @@
//! Keyboard Shortcuts › Export Text…'s printable shortcut sheet.
//! Keyboard Shortcuts › Export Text…'s printable shortcut sheet and CSV file.
//!
//! The rows come from [`crate::shortcut_editor::export_sections`]: a Tools section and one section
//! per top-level menu. The sheet lists the rows that have a shortcut, each section under a colored
//! band with the shortcut on the left and the name on the right, flowed down columns of landscape
//! pages, and is written as a PDF by laying it out as a document.
//! pages, and is written as a PDF by laying it out as a document. The CSV file lists every row
//! ([RFC 4180](https://www.rfc-editor.org/rfc/rfc4180.txt) quoting, CRLF line ends).
use vectorcraft_color::{Color, Paint};
use vectorcraft_doc::{Appearance, CharStyle, Document, Node, NodeId, NodeKind, TextObject};
@@ -55,6 +56,41 @@ impl PageSize {
}
}
/// Whether a spreadsheet would read `s` as a formula: it starts with `=`, `+`, `-` or `@` and has
/// more after it, or starts with a tab or a carriage return.
fn reads_as_formula(s: &str) -> bool {
let mut chars = s.chars();
match chars.next() {
Some('=' | '+' | '-' | '@') => chars.next().is_some(),
Some('\t' | '\r') => true,
_ => false,
}
}
/// A CSV field: a field a spreadsheet would read as a formula starts with an apostrophe, and a
/// field with a comma, a double quote or a line break is quoted, with each double quote doubled.
fn csv_field(s: &str) -> String {
let s = if reads_as_formula(s) { format!("'{s}") } else { s.to_string() };
if s.contains([',', '"', '\n', '\r']) { format!("\"{}\"", s.replace('"', "\"\"")) } else { s }
}
/// The CSV file: a byte order mark, so spreadsheets read it as UTF-8, a header row of `headers`,
/// then one `section,name,shortcut` record per row, each ending in CRLF.
pub fn csv(sections: &[Section], headers: [&str; 3]) -> String {
let mut out = String::from("\u{feff}");
let mut record = |fields: [&str; 3]| {
out += &fields.map(csv_field).join(",");
out += "\r\n";
};
record(headers);
for s in sections {
for r in &s.rows {
record([&s.title, &r.name, &r.shortcut]);
}
}
out
}
/// Section band colors, in turn.
const BANDS: [(u8, u8, u8); 9] = [
(0x2f, 0x6d, 0xb5),
@@ -346,6 +382,38 @@ mod tests {
}
}
/// A field with a comma, a double quote or a line break is quoted, with its double quotes
/// doubled; other fields are written as they are, and each record ends in CRLF.
#[test]
fn csv_quotes_fields_with_commas_quotes_and_line_breaks() {
let sections = [
Section { title: "Edit".into(), rows: vec![row("Paste in Front, Place", "Ctrl+F"), row("Say \"Hi\"", "")] },
Section { title: "Two\nLines".into(), rows: vec![row("Plain", "Ctrl+,")] },
];
let text = csv(&sections, ["Group", "Command", "Shortcut"]);
assert_eq!(
text,
"\u{feff}Group,Command,Shortcut\r\nEdit,\"Paste in Front, Place\",Ctrl+F\r\nEdit,\"Say \"\"Hi\"\"\",\r\n\"Two\nLines\",Plain,\"Ctrl+,\"\r\n"
);
}
/// A field a spreadsheet would read as a formula starts with an apostrophe; a lone `+`, `-`,
/// `=` or `@` key and other fields are written as they are.
#[test]
fn csv_keeps_fields_from_reading_as_formulas() {
let sections = [Section {
title: "Plug-ins".into(),
rows: vec![row("=HYPERLINK(\"x\")", "+"), row("@Sum", "-"), row("-Minus", "- · Ctrl+-"), row("Tab\tName", "=")],
}];
let text = csv(&sections, ["Group", "Command", "Shortcut"]);
assert_eq!(
text,
"\u{feff}Group,Command,Shortcut\r\nPlug-ins,\"'=HYPERLINK(\"\"x\"\")\",+\r\nPlug-ins,'@Sum,-\r\nPlug-ins,'-Minus,'- · Ctrl+-\r\nPlug-ins,Tab\tName,=\r\n"
);
assert_eq!(csv_field("\tx"), "'\tx");
assert_eq!(csv_field("\rx"), "\"'\rx\"");
}
/// The sheet lists the rows that have a shortcut and leaves out the others, and a section with
/// no shortcut at all has no band.
#[test]
+6 -4
View File
@@ -457,7 +457,7 @@ fn keyboard_shortcuts_export_text_writes_the_working_set_as_text() {
click(&mut app, "Export Text…", dialogs);
match shown.requests().as_slice() {
[PickRequest::Save(pick)] => {
assert_eq!(pick.filters, FilePick::filters([("Text", &["txt"][..]), ("Shortcut sheet", &["pdf"][..])]))
assert_eq!(pick.filters, FilePick::filters([("Text", &["txt"][..]), ("Shortcut sheet", &["pdf"][..]), ("CSV", &["csv"][..])]))
}
other => panic!("{other:?}"),
}
@@ -476,13 +476,15 @@ fn keyboard_shortcuts_export_text_writes_the_working_set_as_text() {
assert_eq!(app.ui.dialog.as_ref().map(|d| d.kind.as_str()), Some("shortcuts"), "the dialog stays open");
}
/// The file type picked in Export Text…'s save dialog picks the file: the PDF sheet for a name
/// typed with `.pdf`, and for a type the dialog reports with a name typed without an extension,
/// that type's file under the name with its extension.
/// The file type picked in Export Text…'s save dialog picks the file: the PDF sheet or the CSV file
/// for a name typed with `.pdf` or `.csv`, and for a type the dialog reports with a name typed
/// without an extension, that type's file under the name with its extension.
#[test]
fn keyboard_shortcuts_export_text_writes_the_format_picked_in_its_save_dialog() {
for (answer, path, start) in [
(&["/keys/list.pdf"][..], "/keys/list.pdf", &b"%PDF-"[..]),
(&["/keys/list.csv"][..], "/keys/list.csv", &b"\xef\xbb\xbfGroup,Command,Shortcut\r\n"[..]),
(&["/keys/table", "csv"][..], "/keys/table.csv", &b"\xef\xbb\xbfGroup,Command,Shortcut\r\n"[..]),
(&["/keys/sheet", "pdf"][..], "/keys/sheet.pdf", &b"%PDF-"[..]),
(&["/keys/plain", "txt"][..], "/keys/plain.txt", &b"Keyboard Shortcuts\n"[..]),
] {
+1 -1
View File
@@ -91,7 +91,7 @@ fn save_panels_show_the_file_type_they_write() {
app.run("shortcuts.exportText", json!({})).unwrap();
assert_eq!(
last_shown(&shown),
FilePick::filters([("Text", &["txt"][..]), ("Shortcut sheet", &["pdf"][..])]),
FilePick::filters([("Text", &["txt"][..]), ("Shortcut sheet", &["pdf"][..]), ("CSV", &["csv"][..])]),
"Keyboard Shortcuts › Export Text…"
);
app.run("shortcuts.exportText", json!({"format": "sheet"})).unwrap();
+16 -9
View File
@@ -6310,15 +6310,16 @@ cannot be written, returns an error, and nothing is written. The layout is Vecto
[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.
`format` picks the file: `"text"` (the default) writes the text file above, `"sheet"` a printable shortcut sheet as a
PDF and `"csv"` a CSV file. 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 the three formats (Text, Shortcut sheet and CSV, 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`, `.pdf` or `.csv`): 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 and the CSV file as `text`, the sheet in
base64 as `pdf`. A `format` other than `"text"`, `"sheet"` or `"csv"`, 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
@@ -6333,6 +6334,12 @@ never shortened: one too wide for its column is set smaller. A name too long for
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.
The CSV file is UTF-8 with a byte order mark, with CRLF line ends and fields quoted as
[RFC 4180](https://www.rfc-editor.org/rfc/rfc4180.txt) describes. Its header row is `Group,Command,Shortcut` in every
UI language. Each row the dialog lists has one record, in the sheet's groups and with names and shortcuts in the UI
language, and a row with no shortcut has an empty Shortcut field. A field that starts with `=`, `+`, `-` or `@` and has
more after it, or that starts with a tab or a carriage return, starts with an apostrophe (`'`).
```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"}}}
+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?, 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`.
- 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. It also offers a CSV file of the same rows (`format: "csv"`; Group, Command and Shortcut columns). 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.