mirror of
https://github.com/storytold/photocraft.git
synced 2026-10-14 19:26:51 -04:00
* Edit › Keyboard Shortcuts: Import Photoshop Shortcuts… loads a .kys set (#1163) Photoshop saves a shortcut set as .kys XML: <command name="Gaussian Blur..."> rows with one or more <shortcut>Control+Opt+Cmd+G</shortcut>, then the tool keys. The dialog's new button (and File › Open or a drop of a .kys) parses it with roxmltree, matches each row to our commands by menu label, and fills the dialog's overrides, so OK applies the set the way hand-made changes are (a key moved to a command is taken from its old owner) and Cancel discards it. Rules, from Photoshop's own ambiguities: a label in several menus (Levels… under Image › Adjustments and Layer › New Adjustment Layer; All under Select, Edit › Purge and View › Show) goes to the command whose default is one of the row's keys, else the one with a default, else the first in menu order. A row's first key is kept unless one of its keys is already the command's default (Zoom In is Cmd++ then Cmd+=). Scripts, Bridge, the frames commands and the macOS application menu have no command here and are counted in the message. Tool keys are not imported: the tool letters are fixed. * First launch beside Photoshop imports its live shortcut set; the Open dialog lists .kys Photoshop keeps the set in use as Keyboard Shortcuts.psp in its per-version settings folder (macOS ~/Library/Preferences/Adobe Photoshop <v> Settings, Windows %APPDATA%\Adobe\Adobe Photoshop <v>\Adobe Photoshop <v> Settings), the same XML a saved .kys holds. The desktop app hands the newest version's file to the UI (Services::photoshop_shortcuts); at the first launch that has no shortcut overrides yet, kys_import::auto_import applies it through the Keyboard Shortcuts dialog's own OK path and posts a notice naming the set and the count. The preference dialogs.photoshopShortcuts records the source, so the import happens once; someone who already changed a shortcut keeps theirs. Reset All to Defaults undoes it. The Open dialog's filter now lists .kys (it greyed them out), and dropping Keyboard Shortcuts.psp imports it like a .kys. * kys import: Ukrainian and Dutch strings; tests follow Cmd+K and Cmd+F as the defaults (#1900) * kys import: user-facing strings name no other product (#1985) The button is Import Shortcuts…, its tip names the .kys format, the notice says "Keyboard shortcuts imported" and names the set, and a file that is not a set is "not a keyboard shortcut set (.kys)". A set without a name is called by its file name. Comments, identifiers and the XML root tag keep the format's own name. * rustfmt: format panels.rs and prefs_ui.rs --------- Co-authored-by: Brandon Thomas <[email protected]>