mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-19 12:38:18 +00:00
combo: #7971
This commit is contained in:
+33
-2
@@ -7235,6 +7235,36 @@ more after it, or that starts with a tab or a carriage return, starts with an ap
|
||||
{"name":"run_command","arguments":{"command":"shortcuts.exportText","params":{"path":"/Users/me/Shortcuts.pdf","format":"sheet","pageSize":"a4"}}}
|
||||
```
|
||||
|
||||
A tool or command can also have a hold shortcut: a key that types a character (a letter, a digit or a punctuation
|
||||
key), alone or with Shift. Space and the backtick key cannot be hold shortcuts, and neither can a key with Cmd, Ctrl or
|
||||
Alt. Hold shortcuts act only while the preference `holdShortcuts` is on; it is off by default, and Edit › Keyboard
|
||||
Shortcuts shows it as the Hold Shortcuts checkbox, with a ? button that explains it. While it is off, the dialog shows
|
||||
no Hold column and every key runs on its press. While it is on, the dialog shows a Hold column and the Hold Shortcut
|
||||
Delay (`keyHoldDelay`, 0.2 to 1.0 s, 0.35 s by default; VectorCraft's own values). Preferences › General › Options
|
||||
lists both settings too, with Hold Shortcut Delay dimmed while Hold Shortcuts is off. A key with a hold shortcut then
|
||||
waits when it goes down: held for the delay, it runs its hold shortcut once and its repeats are ignored until it is let
|
||||
go; let go sooner, it runs what the key runs without a hold shortcut, at the release. Another key pressed while one
|
||||
waits, or Cmd, Ctrl or Alt pressed then, ends the wait first, so keys act in the order they went down. The window losing
|
||||
the keyboard, a dialog, a text field, Presentation Mode or an input method composition ends the wait and runs nothing.
|
||||
Keys without a hold shortcut run on their press as before, and so does a letter with Shift when only the letter alone
|
||||
has a hold shortcut, or a key the active tool uses itself (E with the Extend Path tool). When one entry holds a key with
|
||||
Shift (Shift+1) and another the character it types (`!`), that key runs the hold shortcut of the first.
|
||||
|
||||
`shortcuts.set {id, hold}` sets a hold shortcut, and `hold: ""` or `null` removes it; `hold` alone leaves the entry's
|
||||
shortcut as it is, and a key that another entry already holds is refused unless `force` is true. Hold shortcuts are
|
||||
kept apart from shortcuts: Use Default, Clear and `shortcut: null` leave them, and `overridden` in `shortcuts.list` is
|
||||
about the shortcut only. A command the editor lists only while it has a shortcut (one that needs a value, such as
|
||||
`transparency.set`) takes a hold shortcut only with a shortcut, and loses its hold shortcut when its shortcut is cleared
|
||||
or given to another entry. `shortcuts.list` rows give the hold shortcut as `hold`, `shortcuts.conflicts` lists a key two
|
||||
entries hold as `"Hold X"`, and Reset to Defaults and a preset remove every hold shortcut. `shortcuts.export` writes
|
||||
them as a `holds` object (entry id to key) when there are any, and `shortcuts.import` reads it; a file without `holds`
|
||||
has none, and a `holds` value that is not a usable hold shortcut fails the import, which then changes nothing.
|
||||
`shortcuts.exportText` adds a third `Hold X` column to a row with a hold shortcut while `holdShortcuts` is on.
|
||||
|
||||
```json
|
||||
{"name":"run_command","arguments":{"command":"shortcuts.set","params":{"id":"paint.swap","hold":"X"}}}
|
||||
```
|
||||
|
||||
The desktop app adds its active artboard, the one the Artboards panel highlights, to the `object.align`,
|
||||
`object.distribute`, `object.distributeSpacing` and `select.allOnArtboard` calls it runs without `artboard`, as it does
|
||||
for `edit.pasteInPlace`, `edit.pasteInFront` and `edit.pasteInBack` (while the Artboard tool has several artboards
|
||||
@@ -7491,8 +7521,9 @@ interface and not the art: a zoom shows the art at the same size at every UI Sca
|
||||
preference `holdToolKeys` also needs the desktop app. It is on by default: a single-key tool shortcut held for 0.25 s
|
||||
or more, or held while its tool is used, chooses the tool until the key is let go and then returns to the tool active
|
||||
before, after any drag in progress; a quicker press chooses the tool for good. With it off, every press and every key
|
||||
repeat chooses the tool. The canvas preference `boundingBoxWhileMovingAndDrawing` (off by default) also needs the
|
||||
desktop app: on, with View › Show Bounding Box, the bounding box and its handles stay visible while a drag moves the
|
||||
repeat chooses the tool. While `holdShortcuts` is on, a tool key that also has a hold shortcut runs the hold shortcut
|
||||
when held, and a quick press chooses its tool for good. The canvas preference `boundingBoxWhileMovingAndDrawing` (off
|
||||
by default) also needs the desktop app: on, with View › Show Bounding Box, the bounding box and its handles stay visible while a drag moves the
|
||||
selection, and the Rectangle, Rounded Rectangle, Ellipse, Polygon and Star tools draw the box around the shape being
|
||||
drawn; off, the box hides during both, except that a Selection tool move with `realTimeDrawing` off still moves the
|
||||
box. `highlightAlternateGlyphs` (off by default: on, the canvas paints a pink cell behind glyphs OpenType features
|
||||
|
||||
@@ -1421,6 +1421,7 @@ Moved from the ROADMAP's "Shipped so far" on 2026-10-10. Update it when a featur
|
||||
A Space+Shift drag rotates the view whatever the tool, as a Rotate View tool drag does, and Shift does not round the angle to 15°.
|
||||
While the Type tool edits text, Space types a space: held, it does not show the hand, pan or rotate the view, and Cmd+Space still zooms ([the help page](https://web.archive.org/web/20260726060015/https://helpx.adobe.com/illustrator/using/default-keyboard-shortcuts.html) lists the Spacebar as the Hand tool when not in text-edit mode). Test: `canvas::tests::space_types_a_space_while_editing_text_and_does_not_pan`.
|
||||
As VectorCraft's own rule, a zoom marquee that Cmd+Space starts while the Type tool edits text keeps the marquee's Space rules after Cmd is let go: Space held since the press sizes it, Space pressed again moves it ([the help page](https://helpx.adobe.com/illustrator/using/viewing-artwork.html) describes holding the spacebar to move the marquee), and that Space types no space, nor does it during an animated zoom drag. With no zoom drag, Space types a space. Test: `canvas::tests::space_moves_a_text_edit_zoom_marquee_after_cmd_is_let_go`.
|
||||
- **Hold shortcuts:** Edit › Keyboard Shortcuts › Hold Shortcuts (off by default, `holdShortcuts`) shows a Hold column, where a tool or command gets a letter, digit or punctuation key, alone or with Shift. Holding that key for the Hold Shortcut Delay (`keyHoldDelay`, 0.35 s, 0.2 to 1.0 s) runs it once; a quicker press runs what the key runs without one, at the release (`shortcuts.set {id, hold}`). On a tool key, the hold shortcut takes precedence over Hold a Tool Shortcut to Use the Tool Temporarily. This is VectorCraft's own feature and its own delay. Tests `shortcuts::hold_keys::tests` and `shortcut_editor::tests::{a_hold_shortcut_is_kept_apart_from_the_shortcut, hold_shortcuts_refuse_keys_that_cannot_wait, the_hold_shortcuts_checkbox_shows_the_hold_column}`.
|
||||
- **Swatches panel clicks:** Ctrl/Cmd-clicking New Swatch makes a spot color, and Ctrl/Cmd+Shift-clicking it makes a global process color.
|
||||
- **Panel drag and drop:** art dragged off the canvas onto the Symbols panel becomes a symbol, art dragged onto the Swatches panel becomes a pattern swatch, and art dropped on the Brushes panel opens New Brush for that art; a symbol dragged onto the canvas places an instance where it is dropped, and a brush dragged onto a path is applied to it.
|
||||
A symbol dragged from one document's Symbols panel and dropped on the canvas after another document became active places the dragged symbol, not a symbol of the same name in the active document (`symbol.placeFromDocument`). VectorCraft's own rules: the symbol, the symbols it nests and the resources they use are added to the active document as a drop of art from the other document adds them, in the same undo step as the instance; a symbol the document already has with the same art and Symbol Options is used, and one with the same name but other art or options is added under a free name ("Leaf 2"); the chip at the pointer shows the dragged symbol; a symbol whose document was closed before the drop places nothing and the status bar shows the error. Tests: `canvas::tests::a_symbol_dragged_from_another_document_places_that_documents_symbol`, `a_symbol_whose_document_closed_places_nothing`, `the_pointer_chip_of_a_dragged_symbol_shows_its_own_documents_symbol`, `tests::symbollib::another_documents_symbol_is_added_and_placed_in_one_step`.
|
||||
|
||||
Reference in New Issue
Block a user