mirror of
https://github.com/storytold/vectorcraft.git
synced 2026-11-12 23:05:05 +00:00
Keyboard Shortcuts: a command that a menu bar item runs can take a shortcut, Set Corners… among them
A shortcut given to Set Corners… (`addon.pathtools.cornerSet`) ran nothing,
on a single key or a chord. The keymap is built from the list in Edit ›
Keyboard Shortcuts, and that list left the command out. An engine command
without a menu path of its own was listed only when it had a default key,
or when it was an undoable command, not an alias, whose params doc ends
each field with `?`. A UI command was listed only when it had a default
key or a params doc of `{}` or `{path…}`, or was Rename. Set Corners…
needs a radius, so it was left out. The same rules left out other
commands that items of the menu bar run:
- View › Perspective Grid's Lock Grid, Lock Station Point, Show Rulers and
Snap to Grid, and Object › Perspective's Attach to Active Plane, Move
Plane to Match Object and Edit Text.
- Edit › Edit Custom Dictionary…, a query.
- UI commands: Recolor Artwork…, the Edit menu's four preset dialogs,
Apply SVG Filter…, Export As…, Export Selection…, Edit Original, Apply
Bullets, Apply Numbers, the four library saves, and the Window menu's
New Toolbar…, Double Column, Keep Tools Beside the Canvas, New
Workspace…, Float in Window and Consolidate All Windows.
Such a command is now listed when an item of the menu bar runs it as a key
press would: with no params, or with the one set of params all its items
give. `needs_a_value` already used this check, and it moves into
`a_menu_bar_item_runs` so that both use it. The command is listed in the
group named by the first part of its id, next to the commands of its
family that were listed before (Set Corners… under Addon with Corner
Tool, the grid toggles under Perspective).
File › Export Selection… was the row of `document.exportSelection`, which
no item of the menu bar runs. That row now runs `file.exportSelection`, as
the menu item does, and `document.exportSelection` is listed as Document ›
Export Selection…. A shortcut already given to it keeps running it. The
Window menu's Learn item gets no row, because the Learn panel's row
already has its name.
Tests: on F and on a chord, Set Corners…, Edit Custom Dictionary…, Recolor
Artwork…, the four preset dialogs and Apply SVG Filter… open the dialog a
click on their menu item opens. Snap to Grid turns off and on from F, and
Export Selection… on F opens Export for Screens. Every command the menu
bar runs this way is listed, none of them shares its group and label with
another entry, and a shortcut on four of them is kept through a saved
set's export and import. The other Object › Plug-ins dialogs, Select by
Link Status… and Composite Fonts… already opened from a shortcut and are
checked the same way.
This commit is contained in:
+24
@@ -4792,6 +4792,30 @@ They list such a command while the user has changed its shortcut (`overridden: t
|
||||
shortcut for that command runs what a click on the item runs: Object › Path › Clean Up…, Print Ink Fixes… and Edit ›
|
||||
Find and Replace… open their dialogs.
|
||||
|
||||
A command without a menu path of its own is listed when an item of the menu bar runs it with no params, or when every
|
||||
item that runs it gives it the same params. It is listed in the group named by the first part of its id. These
|
||||
commands are listed this way:
|
||||
|
||||
- `addon.pathtools.cornerSet` (Object › Plug-ins › Path Precision Tools › Set Corners…, which opens its dialog),
|
||||
under Addon;
|
||||
- `perspective.grid.lock`, `perspective.grid.lockStation`, `perspective.grid.rulers` and `perspective.grid.snap`
|
||||
(View › Perspective Grid), and `perspective.attach`, `perspective.editText` and `perspective.plane.matchObject`
|
||||
(Object › Perspective), under Perspective;
|
||||
- `text.spelling.dictionary` (Edit › Edit Custom Dictionary…), under Text;
|
||||
- the UI commands `ui.recolorDialog` (Edit › Edit Colors › Recolor Artwork…), `ui.flattenerPresetsDialog`,
|
||||
`ui.printPresetsDialog`, `ui.pdfPresetsDialog`, `ui.perspectivePresetsDialog`, `ui.svgFilterDialog`,
|
||||
`ui.saveSwatchLibrary`, `ui.saveBrushLibrary`, `ui.saveGraphicStyleLibrary` and `ui.saveSymbolLibrary`, under Ui;
|
||||
`file.exportAs` and `file.exportSelection`, under File; `links.editOriginal`, under Links; `type.applyBullets` and
|
||||
`type.applyNumbers`, under Type; and `window.toolbar.new`, `window.toolbarColumns`, `window.toolsBesideCanvas`,
|
||||
`window.workspace.new`, `window.arrange.floatInWindow` and `window.arrange.consolidateAllWindows`, under Window.
|
||||
|
||||
When such a command has the same group and label as an engine command that no item of the menu bar runs, the
|
||||
command the menu item runs keeps the name, and the engine command is listed in the group named by the first part of
|
||||
its id: File › Export Selection… runs `file.exportSelection`, as the menu item does, and `document.exportSelection`
|
||||
is listed as Document › Export Selection…. A shortcut already given to `document.exportSelection` keeps running it.
|
||||
When the other entry is anything else, the command is not listed: `window.learn` is left out, and Window › Learn is
|
||||
the Learn panel's entry.
|
||||
|
||||
Each installed filter plug-in's Object › Plug-ins item is its own row, with id `plugin:<id>` (the plug-in's id), its
|
||||
menu label and no default shortcut, so two filters with the same name have two rows. `shortcuts.set {id:
|
||||
"plugin:<id>", shortcut}`, `shortcuts.list` and Import Shortcut Set use that id, `shortcuts.exportText` writes one line
|
||||
|
||||
Reference in New Issue
Block a user