From 97aeab4e969f322372e73f2798eb5c3e396849e5 Mon Sep 17 00:00:00 2001 From: Korb Date: Mon, 3 Aug 2026 17:53:56 +0300 Subject: [PATCH] [Shortcut Guide] Add support for Greenshot (#49407) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary of the Pull Request Adds a Shortcut Guide manifest for **Greenshot**. - **New manifest:** `src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Greenshot.Greenshot.en-US.yml`: 32 shortcuts for `Greenshot.exe`, grouped into five sections: * **Capture:** Capture region, Capture last region, Capture window, Capture fullscreen, Capture Internet Explorer tab * **While selecting a region:** switch region/window mode, select a child window element, toggle magnifier, confirm selection, cancel capture * **Editor - draw:** rectangle/ellipse/line/arrow/freehand/highlight/obfuscate/crop/text/selection tools, enlarge screenshot, crop to visible elements, paste image from clipboard * **Editor - text:** insert line break, delete previous word, select all text, finish editing * **Editor - export:** save, save as, copy image to clipboard, print, e-mail - **No code changes.** The manifest is auto-included via the existing `Manifests/*.yml` glob in `ShortcutGuide.Ui.csproj`. - `BackgroundProcess: true`, matching the bundled PowerToys-itself manifest, since Greenshot's core value is its global capture hotkeys, which work regardless of the currently focused window. - Introduces a `` token for the Print Screen key (not previously needed by any bundled manifest, since Greenshot's capture shortcuts are all built around it) alongside the existing ``, ``, ``, ``, `` named-key tokens. ## PR Checklist - [ ] **Closes:** #ISSUE_NUMBER - [ ] **Communication:** discussed in the linked issue - [ ] **Tests:** N/A for data; relies on the existing manifest deserialization path - [x] **Localization:** all end-user-facing strings can be localized - [ ] **Dev docs:** N/A, no schema changes - [ ] **New binaries:** N/A - [ ] **Documentation updated:** N/A - [x] **Local run:** see issue screenshot ## Detailed Description of the Pull Request / Additional comments The Shortcut Guide displays per-app shortcuts from YAML manifests, matched to the foreground window (or shown continuously for background processes) via `WindowFilter`/`BackgroundProcess`. Adding support for an app is purely additive: drop a `..yml` file in the `Manifests` folder and it's picked up by the existing build glob and index generator. - `PackageName: Greenshot.Greenshot` is the WinGet package identifier; `WindowFilter: "Greenshot.exe"` is the process name (confirmed against a signed 1.3.315 build). - `Name: Greenshot` is the display name shown in the Shortcut Guide app picker. - Shortcut names follow the repo's sentence-case convention (capitalize only the first word plus proper nouns/product names). - Five shortcuts are marked `Recommended`: Capture region, Capture last region, Capture window, Save, Copy image to clipboard — the capture and export actions used most often. - Shortcut source: Greenshot's official help page (https://getgreenshot.org/help/), cross-checked against the unofficial `defkey.com` reference. ## Validation Steps Performed - **Source fidelity:** every shortcut and modifier combination matches the official Greenshot help page one-to-one; no unofficial-source shortcuts were added without confirming them against the official page. --- Closes #49406 --------- Co-authored-by: Korb Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> Co-authored-by: Muyuan Li <116717757+MuyuanMS@users.noreply.github.com> --- .github/actions/spell-check/expect.txt | 9 +- .../Manifests/Greenshot.Greenshot.en-US.yml | 276 ++++++++++++++++++ 2 files changed, 281 insertions(+), 4 deletions(-) create mode 100644 src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Greenshot.Greenshot.en-US.yml diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index e2da1807d0..27d8cbcf94 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -143,8 +143,8 @@ BITMAPINFO BITMAPINFOHEADER BITSPERPEL BITSPIXEL -Blackmagic bla +Blackmagic BLENDFUNCTION blittable Blockquotes @@ -411,8 +411,8 @@ devmgmt DEVMODE DEVMODEW DEVNODES -devpal devpackages +devpal DEVTYP dfx DIALOGEX @@ -552,9 +552,9 @@ extensionsdk EXTRALIGHT EXTRINSICPROPERTIES eyetracker +Fairlight FANCYZONESDRAWLAYOUTTEST FANCYZONESEDITOR -Fairlight FARPROC fdw fdx @@ -657,6 +657,7 @@ GRABANDMOVEMODULEINTERFACE gradians GRC grctlext +Greenshot GRGX Gridcustomlayout gridlines @@ -1655,6 +1656,7 @@ selfhost SENDCHANGE sendvirtualinput serverside +SETAUTOHIDEBAREX SETBUDDYINT SETCONTEXT SETCURSEL @@ -1668,7 +1670,6 @@ SETPOWEROFFACTIVE SETRANGE SETREDRAW SETRULES -SETAUTOHIDEBAREX SETSCREENSAVEACTIVE SETSTICKYKEYS SETTEXT diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Greenshot.Greenshot.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Greenshot.Greenshot.en-US.yml new file mode 100644 index 0000000000..69bd24be79 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Greenshot.Greenshot.en-US.yml @@ -0,0 +1,276 @@ +PackageName: Greenshot.Greenshot +Name: Greenshot +WindowFilter: "Greenshot.exe" +BackgroundProcess: true +Shortcuts: + - SectionName: Capture + Properties: + - Name: Capture region + Recommended: true + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - + - Name: Capture last region + Recommended: true + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - + - Name: Capture window + Recommended: true + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - + - Name: Capture fullscreen + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - + - Name: Capture Internet Explorer tab + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - + - SectionName: While selecting a region + Properties: + - Name: Switch between region and window mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - + - Name: Select a child window element + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - + - Name: Toggle magnifier + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Z + - Name: Confirm selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - + - Name: Cancel capture + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - + - SectionName: Editor - draw + Properties: + - Name: Rectangle tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - R + - Name: Ellipse tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - E + - Name: Line tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - L + - Name: Arrow tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - A + - Name: Freehand line tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F + - Name: Highlight tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - H + - Name: Obfuscate tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - O + - Name: Crop tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - C + - Name: Text tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - T + - Name: Selection tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - + - Name: Enlarge screenshot by 25px + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "+" + - Name: Crop to visible elements + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "-" + - Name: Paste image from clipboard + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - SectionName: Editor - text + Properties: + - Name: Insert line break + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - + - Name: Delete previous word + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - + - Name: Select all text + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - Name: Finish editing text + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - + - SectionName: Editor - export + Properties: + - Name: Save + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - S + - Name: Save as + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - S + - Name: Copy image to clipboard + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - C + - Name: Print + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: E-mail + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E