mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-10-14 19:26:56 -04:00
Fix #392: Cmd+A selects a focused field's text or the type being edited
Select All (Cmd/Ctrl+A) now follows the keyboard, as in Illustrator:
- macOS menu bar: the system menu takes Cmd+A/X/C/V before the window
sees them, so a focused panel, dialog or search field got the document
command. `menus::invoke_from_system_menu` (used by `NativeMenu::poll`)
hands Select All, Cut, Copy and Paste to a focused text field as the
events its keys would send; clicks on those menu items follow the same
rule. Other commands, and these with no field focused, run as before.
- Type tool: `select.all` itself selects all of the text being edited
while the Type tool edits (returns {editing, start, end}), so the menu,
the shortcut, the control channel and headless MCP (`press_key`) agree.
The UI's own Select All interception and the Type tool's hard-wired
Cmd+A are gone; Cmd+A reaches it through the Select All shortcut.
- Windows, Linux and the web already left Cmd+A to a focused field; now
covered by headless app-frame tests (field, Type tool, canvas).
Docs: docs/mcp.md (Select All while editing type), ROADMAP. Not yet:
Select All across threaded frames (one frame's text is selected).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
1 parent
ffed92aba5
commit
0916534db9
13 files changed
+280
-20
No files matched your search
+12
@@ -1890,6 +1890,18 @@ square to the page. `object.resetBoundingBox` squares the box again without movi
|
||||
{"name":"run_command","arguments":{"command":"object.rotate","params":{"angle":45,"absolute":true}}}
|
||||
```
|
||||
|
||||
## Select All while editing type
|
||||
|
||||
While the Type tool edits text (a click into type, `pointer_gesture` with `"tool":"type"`), `select.all` (Cmd+A,
|
||||
`press_key {key: "A", mods: {cmd: true}}`) selects all of that text instead of the art, as in the reference app, and
|
||||
returns `{editing, start, end}` (the text's id and the selected byte range, which `text.getRange` and
|
||||
`text.setRangeStyle` take); the art selection stays as it is. Without text being edited it selects every object and
|
||||
returns `{count}`. Text in threaded frames is selected one frame at a time.
|
||||
|
||||
```json
|
||||
{"name":"press_key","arguments":{"key":"A","mods":{"cmd":true}}}
|
||||
```
|
||||
|
||||
## Empty point type
|
||||
|
||||
Point type the Type tool places with a click and leaves empty is discarded when editing ends: Escape, another tool,
|
||||
|
||||
Reference in new issue
Block a user