Type: the AltGr tests expect Ctrl+Alt+L to open Layer Options

Since #3355, Ctrl+Alt+L is New Layer Options… and opens Layer Options
for a new layer instead of adding a layer. On main merged with this
branch, ctrl_alt_chords_without_typed_text_still_run failed: its
Ctrl+Alt+L steps expected a new layer. They now expect Layer Options
in mode new with no layer added, while the Type tool edits and with
the Selection tool, and the test cancels the dialog between the two.

The doc comment of altgr_characters_typed_in_text_run_no_command names
New Layer Options… (Cmd+Alt+L) instead of New Layer, and the
docs/target-app-parity.md line says AltGr+L does not also open Layer
Options for a new layer.
This commit is contained in:
dotCooCoo
2026-10-21 23:14:25 +07:00
committed by bflatastic
parent acb017e1f1
commit 76058fb1b5
2 changed files with 14 additions and 6 deletions
+13 -5
View File
@@ -816,8 +816,9 @@ mod tests {
}
/// While the Type tool edits text, a character typed with AltGr (Ctrl+Alt in Firefox on
/// Windows) is typed and runs no command: not New Layer (Cmd+L), Reset Tracking (Cmd+Alt+Q),
/// Export for Screens (Cmd+Alt+E), Select All on Active Artboard (Cmd+Alt+A) or Undo (Cmd+Z).
/// Windows) is typed and runs no command: not New Layer Options… (Cmd+Alt+L), Reset Tracking
/// (Cmd+Alt+Q), Export for Screens (Cmd+Alt+E), Select All on Active Artboard (Cmd+Alt+A) or
/// Undo (Cmd+Z).
#[test]
fn altgr_characters_typed_in_text_run_no_command() {
let mut wrong = vec![];
@@ -847,7 +848,8 @@ mod tests {
}
/// Ctrl and Ctrl+Alt chords that type no text still run their commands while the Type tool
/// edits, and with the Selection tool a Ctrl+Alt press runs its chord as before.
/// edits, and with the Selection tool a Ctrl+Alt press runs its chord as before. Ctrl+L is New
/// Layer, and Ctrl+Alt+L is New Layer Options…, which opens Layer Options for a new layer.
#[test]
fn ctrl_alt_chords_without_typed_text_still_run() {
let mut app = VectorcraftApp::new(vectorcraft_engine::Session::new(), Default::default());
@@ -857,18 +859,24 @@ mod tests {
app.session.apply_actions(vec![vectorcraft_tools::Action::Notify("text.editNew".into())]).unwrap();
assert!(app.session.tool_wants_text());
let layers = text_and_layers(&mut app, id).1;
let new_layer_options =
|app: &VectorcraftApp| app.ui.dialog.as_ref().is_some_and(|d| d.kind == "layerOptions" && d.fields.get("mode") == Some(&json!("new")));
let m = Modifiers::COMMAND | Modifiers::CTRL;
let ctrl_l = egui::Event::Key { key: Key::L, physical_key: Some(Key::L), pressed: true, repeat: false, modifiers: m };
frame(&mut app, vec![egui::Event::ModifiersChanged(m), ctrl_l]);
assert_eq!(text_and_layers(&mut app, id), ("Hi".into(), layers + 1), "Ctrl+L while editing: New Layer");
assert!(app.ui.dialog.is_none(), "Ctrl+L opens no dialog");
app.select_tool("type");
app.session.apply_actions(vec![vectorcraft_tools::Action::Notify("text.editNew".into())]).unwrap();
assert!(app.session.tool_wants_text());
frame(&mut app, ctrl_alt_press(Key::L, None));
assert_eq!(text_and_layers(&mut app, id), ("Hi".into(), layers + 2), "Ctrl+Alt+L with no text typed while editing: New Layer");
assert!(new_layer_options(&app), "Ctrl+Alt+L with no text typed while editing: New Layer Options…");
assert_eq!(text_and_layers(&mut app, id), ("Hi".into(), layers + 1), "no layer is added until OK");
crate::dialogs::cancel(&mut app);
app.select_tool("selection");
frame(&mut app, ctrl_alt_press(Key::L, Some("ł")));
assert_eq!(text_and_layers(&mut app, id), ("Hi".into(), layers + 3), "Selection tool: Ctrl+Alt+L runs New Layer as before");
assert!(new_layer_options(&app), "Selection tool: Ctrl+Alt+L runs New Layer Options… as before");
assert_eq!(text_and_layers(&mut app, id), ("Hi".into(), layers + 1), "no layer is added until OK");
}
/// #2094: Cmd+Shift+O is Type › Create Outlines (not File › Open's Cmd+O, not the Artboard
+1 -1
View File
@@ -518,7 +518,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
- Shift+Tab (`window.panels`) shows and hides the dock and the floating panels and leaves the toolbar and the Control bar as they are; hiding the panels with Tab or Shift+Tab also closes a panel popped out of the icon column.
- The second Tab (`window.dock`) shows again only the bars the first Tab hid, after a restart too: a Control bar that was off stays off, a toolbar hidden with Window › Tools stays hidden, and panels shown with Shift+Tab in between stay shown.
- Cmd/Ctrl+A follows the keyboard: in a panel, dialog or search field it selects the field's text, while the Type tool edits it selects all of that text (also `select.all` over MCP), and only otherwise every object. On macOS the menu bar's Select All, Cut, Copy and Paste (keys or clicks) act on a focused field too, and elsewhere the in-window menus' do: the field that had the keyboard when the menu opened gets them, with its selection, and the keyboard back (#516). Not yet: Select All across threaded frames (one frame's text is selected).
- While the Type tool edits text, a character typed with AltGr is typed and runs no command. Firefox on Windows reports AltGr as Ctrl and Alt held, so in the web build AltGr+L (ł on a Polish layout) does not also run New Layer, and AltGr+Q (@ on a German layout) does not also run Reset Tracking and Kerning. A Ctrl+Alt chord that types no character runs its command.
- While the Type tool edits text, a character typed with AltGr is typed and runs no command. Firefox on Windows reports AltGr as Ctrl and Alt held, so in the web build AltGr+L (ł on a Polish layout) does not also open Layer Options for a new layer, and AltGr+Q (@ on a German layout) does not also run Reset Tracking and Kerning. A Ctrl+Alt chord that types no character runs its command.
- With the Artboard tool, Cmd/Ctrl+A after a click on a row of the Artboards panel selects every artboard, as the macOS menu bar's Select All does then; the active artboard stays active, and the art's selection does not change. After a press outside the panel's list, Cmd/Ctrl+A selects every object again. It used to select every object after a click in the panel too. Public reference: [Select artboards](https://helpx.adobe.com/illustrator/desktop/create-manage-artboards/add-edit-artboards/select-artboards.html).
- Cmd/Ctrl+/ (`appearance.addFill`) and Cmd/Ctrl+Alt+/ (`appearance.addStroke`) add a new fill and a new stroke to the selected objects, as the Appearance panel's Add New Fill and Add New Stroke buttons do, 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 "Add new fill" and "Add new stroke". Keyboard Shortcuts lists both under Window › Appearance.
- Cmd/Ctrl+Alt+Shift+. and , (`type.size.increaseByFive`, `type.size.decreaseByFive`) step the font size of the selected type, or of the text the Type tool has selected, by five times the Size/Leading increment (Preferences › Type); Cmd/Ctrl+Shift+. and , still step it by one increment.