diff --git a/.github/actions/spell-check/allow/code.txt b/.github/actions/spell-check/allow/code.txt index 02c4803173..2da3774b3b 100644 --- a/.github/actions/spell-check/allow/code.txt +++ b/.github/actions/spell-check/allow/code.txt @@ -51,6 +51,7 @@ resw resx srt Stereolithography +taskmgr terabyte UYVY xbf @@ -336,6 +337,10 @@ MRUCMPPROC MRUINFO REGSTR +#Xaml +NVI +Storyboards + # Misc Win32 APIs and PInvokes DEFAULTTONEAREST INVOKEIDLIST diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index ed26530ab3..c20d75ecc9 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -1,6 +1,7 @@ AAAAs abcdefghjkmnpqrstuvxyz abgr +ABlocked ABORTIFHUNG ABOUTBOX Abug @@ -10,13 +11,18 @@ ACCESSDENIED ACCESSTOKEN acfs ACIE +AClient +AColumn +ACR acrt ACTIVATEAPP ACTIVATEOPTIONS activationaction adaptivecards +ADate ADDSTRING ADDUNDORECORD +ADifferent ADMINS adml admx @@ -25,12 +31,15 @@ advapi advfirewall AFeature affordances +afterfx AFX agentskills AGGREGATABLE AHK +AHybrid AIUI akv +ALarger ALIGNRIGHT ALLAPPS ALLCHILDREN @@ -42,13 +51,17 @@ ALLOWUNDO ALLVIEW ALPHATYPE altkey +AModifier amr ANDSCANS animatedvisuals Animnate +ANull AOC aocfnapldcnfbofgmbbllojgocaelgdd +AOklab aot +APeriod apicontract apidl APIENTRY @@ -74,19 +87,24 @@ appxpackage APSTUDIO AQS Aquadrant +ARandom ARCHITEW +ARemapped ARPINSTALLLOCATION ARPPRODUCTICON ARRAYSIZE ARROWKEYS arrowshape +artboard ARTIFACTSTAGINGDIRECTORY asf Ashcraft AShortcut +ASingle ASSOCCHANGED ASSOCF ASSOCSTR +ASUS ASYNCWINDOWPLACEMENT ASYNCWINDOWPOS atl @@ -144,7 +162,9 @@ bluelightreductionstate BLURBEHIND BLURREGION bmi +BNumber BODGY +BOklab BOOTSTRAPPERINSTALLFOLDER Bootstrappers BOTTOMALIGN @@ -167,6 +187,8 @@ BUILDNUMBER buildtransitive builttoroam BUNDLEINFO +BVal +BValue byapp BYCOMMAND BYPOSITION @@ -182,13 +204,18 @@ CAPTURECHANGED CARETBLINKING carlos Carlseibert +CAtl caub CBN cch CCHDEVICENAME CCHFORMNAME +CCom +CContext +CDeclaration CDPX Cds +CElems CENTERALIGN cer certlm @@ -201,10 +228,13 @@ checkmarks CHILDACTIVATE CHILDWINDOW CHOOSEFONT +chu +Chunghwa CIBUILD cidl CIELCh cim +CImage cla CLASSDC classguid @@ -223,6 +253,7 @@ CLIPSIBLINGS closesocket clp CLSCTX +CLSIDs clsids Clusion cmder @@ -232,6 +263,7 @@ CMIC CMINVOKECOMMANDINFO CMINVOKECOMMANDINFOEX CMN +CMock CMONITORS cmph CNF @@ -288,6 +320,7 @@ Cowait cpcontrols cph cplusplus +CPower cpptools cppvsdbg cppwinrt @@ -306,9 +339,14 @@ CROPTOSQUARE Crossdevice crt csdevkit +CSearch +CSettings cso +CSOT CSRW +CStyle cswin +CTest CTEXT CTLCOLORSTATIC CURRENTDIR @@ -319,7 +357,9 @@ cursorwrap customaction CUSTOMACTIONTEST CUSTOMFORMATPLACEHOLDER +CVal cvd +CVirtual CWMO CXSCREEN CXSMICON @@ -332,7 +372,9 @@ Dac dacl DAffine DAFFINETRANSFORM +DArchitectures datareader +Datasheet datatracker Dayof dbcc @@ -346,6 +388,7 @@ DBT DCapabilities DCBA DCOM +DComposition DCR ddc DDEIf @@ -362,6 +405,7 @@ DEFAULTICON defaultlib DEFAULTONLY DEFAULTSIZE +defaulttonearest DEFAULTTONULL DEFAULTTOPRIMARY DEFERERASE @@ -410,6 +454,7 @@ DISPLAYFREQUENCY displayname DISPLAYORIENTATION DISPLAYPORT +diu divyan DLGFRAME dlgmodalframe @@ -465,10 +510,12 @@ DWMWINDOWATTRIBUTE DWMWINDOWMAXIMIZEDCHANGE DWORDLONG dworigin +dwrite DWRITE dxgi Dxva eab +EAccess easeofaccess ecount edid @@ -476,6 +523,8 @@ EDITKEYBOARD EDITSHORTCUTS EDITTEXT eep +EFile +EInvalid eku emojis ENABLEDELAYEDEXPANSION @@ -485,18 +534,21 @@ ENABLETEMPLATE encodedlaunch encryptor ENDSESSION +ENot ENSUREVISIBLE ENTERSIZEMOVE ENTRYW ENU environmentvariables EPO +EProvider epu ERASEBKGND EREOF EResize ERRORIMAGE ERRORTITLE +ESettings esrp etd ETDT @@ -539,11 +591,13 @@ FANCYZONESEDITOR FARPROC fdw fdx +FErase fesf FFFF fffffffzzz FFh Figma +figma FILEEXPLORER fileexploreraddons fileexplorerpreview @@ -564,13 +618,16 @@ FILESYSPATH Filetime FILEVERSION FILTERMODE +FInc findfast findmymouse FIXEDFILEINFO FIXEDSYS flac flyouts +FMask fmtid +FNumber FOF FOFX FOLDERID @@ -583,6 +640,7 @@ formatetc FORPARSING foundrylocal framechanged +FRestore frm FROMTOUCH fsanitize @@ -622,6 +680,7 @@ gfx GHND gitmodules GMEM +GNumber googleai googlegemini Gotchas @@ -637,14 +696,17 @@ GRC grctlext GRGX Gridcustomlayout +gridlines GSM gtm guiddata GUITHREADINFO +GValue gwl GWLP GWLSTYLE hangeul +Hann Hantai Hanzi Hardlines @@ -677,6 +739,7 @@ hgdiobj HGFE hglobal hhk +HHmmssfff hhx Hiber Hiberboot @@ -716,6 +779,7 @@ HORZSIZE Hostbackdropbrush hostfxr hostsfileeditor +Hostx hotfixes hotkeycontrol HOTKEYF @@ -723,6 +787,7 @@ hotkeys hotlight hotspot HPAINTBUFFER +HPhysical HPS HRAWINPUT HREDRAW @@ -733,11 +798,15 @@ HROW hsb HSCROLL hsi +HSpeed +HSync HTCLIENT hthumbnail HTOUCHINPUT HTTRANSPARENT hutchinsoniana +HVal +HValue Hvci hwb HWHEEL @@ -748,6 +817,7 @@ HWNDLAST HWNDNEXT HWNDPARENT HWNDPREV +HWP hyjiacan IAI icf @@ -787,6 +857,7 @@ imgflip inapp inbox INCONTACT +indesign Indo inetcpl Infobar @@ -797,6 +868,7 @@ INITDIALOG INITGUID initialfile INITTOLOGFONTSTRUCT +inkscape INLINEPREFIX inlines Inno @@ -827,6 +899,7 @@ INVALIDARG invalidoperatioexception invokecommand ipcmanager +IPREVIEW ipreviewhandlervisualssetfont IPTC irow @@ -840,13 +913,17 @@ issecret ISSEPARATOR issuecomment istep +Italicise ith +ITHUMBNAIL IUI IUWP +IVO IWIC jeli jfif jgeosdfsdsgmkedfgdfgdfgbkmhcgcflmi +JIDEA jjw jobject JOBOBJECT @@ -858,6 +935,8 @@ Jsons jsonval jxr Kantai +KBSC +kdc keybd KEYBDDATA KEYBDINPUT @@ -901,6 +980,7 @@ LEFTTEXT Lenovo LError LEVELID +LExit LFU LGD lhwnd @@ -940,6 +1020,7 @@ lowlevel LOWORD lparam LPBITMAPINFOHEADER +LPCFHOOKPROC lpch LPCITEMIDLIST LPCLSID @@ -958,6 +1039,7 @@ LPMONITORINFO LPOSVERSIONINFOEXW LPQUERY lprc +LPrivate LPSAFEARRAY lpstr lpsz @@ -971,6 +1053,7 @@ LPW lpwcx lpwndpl lquadrant +LReader LRESULT LSTATUS lstrcmp @@ -980,9 +1063,12 @@ lstrlen LTEXT LTRREADING luid +LUMA lusrmgr +LVal LVDS LWA +lwin LWIN LZero MAGTRANSFORM @@ -1033,6 +1119,7 @@ Mgmt Microwaved middleclickaction midl +midtones mii MIIM mikeclayton @@ -1046,11 +1133,12 @@ MINMAXINFO minwindef Mip Miracast -MIRACAST +miracast mkdn mlcfg mmc mmcexe +MMdd mmi mmsys mobileredirect @@ -1076,7 +1164,9 @@ mouseutils MOVESIZEEND MOVESIZESTART MRM +MRT mru +msaccess MSAL msc mscorlib @@ -1096,13 +1186,16 @@ msixbundle MSIXCA MSLLHOOKSTRUCT Mso +mspub msrc msstore mstsc msvcp mswhql +MT MTND multimonitor +Multiplayer MULTIPLEUSE multizone muxc @@ -1120,6 +1213,7 @@ myorg myrepo NAMECHANGE namespaceanddescendants +Nanjing nao NCACTIVATE ncc @@ -1158,6 +1252,7 @@ newrow nicksnettravels NIF nightlight +NLog NLSTEXT NMAKE NNN @@ -1206,6 +1301,7 @@ NORMALDISPLAY NORMALUSER NOSEARCH NOSENDCHANGING +NOSIZE nosize notdefault NOTHOUSANDS @@ -1277,6 +1373,7 @@ OUTOFCONTEXT Outptr outputtype outsettings +outsourced OVERLAPPEDWINDOW Oversampling OVERWRITEPROMPT @@ -1303,6 +1400,7 @@ PATINVERT PATPAINT pbc pbi +PBlob PBP pbrush pcb @@ -1324,6 +1422,7 @@ pdto pdtobj pdw Peb +PElems Pels PELSHEIGHT PELSWIDTH @@ -1340,12 +1439,15 @@ pguid phbm phbmp phicon +PHL Photoshop +photoshop phwnd pici pidl PIDLIST pii +pinboard pinfo pinvoke pipename @@ -1368,7 +1470,6 @@ POINTERID POINTERUPDATE Pokedex Pomodoro -Popups popups POPUPWINDOW POSITIONITEM @@ -1376,6 +1477,7 @@ POWERBROADCAST powerdisplay POWERDISPLAYMODULEINTERFACE powerocr +powerpnt POWERRENAMECONTEXTMENU powerrenameinput POWERRENAMETEST @@ -1431,6 +1533,7 @@ projectname PROPERTYKEY PROPVARIANT prot +Prt PRTL prvpane psapi @@ -1445,6 +1548,7 @@ psrm psrree pstatstg pstm +PStr pstream pstrm PSYSTEM @@ -1455,6 +1559,7 @@ PTCHAR ptcontrols ptd PTOKEN +PToy ptstr ptsym pui @@ -1465,6 +1570,7 @@ PWSTR pwsz pwtd qdc +QDS qit QITAB QITABENT @@ -1476,9 +1582,12 @@ QUERYOPEN QUEUESYNC quickaccent quicklinks +quickmask QUNS RAII +RAlt randi +RAquadrant rasterization Rasterize rasterizing @@ -1555,6 +1664,8 @@ RIDEV RIGHTBUTTON RIGHTSCROLLBAR riid +RKey +RNumber rollups rop ROUNDSMALL @@ -1592,6 +1703,7 @@ SCREENFONTS screenruler screensaver screenshots +Scrollback scrollviewer sddl SDKDDK @@ -1791,6 +1903,7 @@ sublang SUBMODULEUPDATE subresource sug +suntimes Superbar SUPPRESSMSGBOXES sut @@ -1866,6 +1979,7 @@ thickframe THISCOMPONENT threadpool throughs +Tianma TILEDWINDOW TILLSON timedate @@ -1915,11 +2029,16 @@ UACUI UAL uap UBR +UBreak ubrk +UCallback ucrt ucrtd uefi +UError uesc +UFlags +UHash UIA UIDs UIEx @@ -1928,10 +2047,13 @@ uitests UITo ULONGLONG Ultrawide +UMax +UMin ums uncompilable UNCPRIORITY UNDNAME +ungroup UNICODETEXT unins uninsdeletekey @@ -1944,10 +2066,13 @@ UNLEN UNORM unparsable unremapped +Unsend +unsubscribes untriaged unvirtualized unwide unzoom +UOffset UOI UPDATENOW updown @@ -1963,6 +2088,7 @@ USEINSTALLERFORTEST USESHOWWINDOW USESTDHANDLES USRDLL +UType uuidv uwp uxt @@ -1973,6 +2099,7 @@ valuegenerator VARTYPE vbcscompiler vcamp +vcenter VCENTER vcgtq VCINSTALLDIR @@ -1982,6 +2109,7 @@ vcpname VCRT vcruntime vcvars +VDesktop vdupq VERBSONLY VERBW @@ -2000,6 +2128,7 @@ VIRTKEY VIRTUALDESK VISEGRADRELAY visiblecolorformats +visio visualeffects vkey vmovl @@ -2009,6 +2138,7 @@ vorrq VOS vpaddlq vqsubq +vredraw VREDRAW vreinterpretq VSC @@ -2021,20 +2151,24 @@ VSINSTALLDIR VSM vso vsonline +VSpeed vstemplate vstest VSTHRD vstprintf VSTT vswhere +VSync Vtbl WANTNUKEWARNING WANTPALM WASDK wbem +WBounds Wca WCE wcex +WClass WCRAPI wcsicmp wcsncpy @@ -2084,13 +2218,16 @@ winlogon winmd winml WINNT +winproj winres winrt winsdk winsta WINTHRESHOLD WINVER +winword winxamlmanager +wireframes withinrafael Withscript wixproj @@ -2114,6 +2251,7 @@ WNDCLASSW wndproc wnode wom +workerw WORKSPACESEDITOR WORKSPACESLAUNCHER WORKSPACESSNAPSHOTTOOL @@ -2128,6 +2266,7 @@ wpr wprp wql wregex +WReserved WResize WRITEOBJECTS Wrk @@ -2145,22 +2284,49 @@ Wubi WUX Wwanpp xap +XAxis +XButton Xbuttondown xclip xcopy +XDeployment xdf +XDimension +XDocument +XElement xfd +XFile +XIncrement +XLoc xmp +XNamespace Xoshiro +XPels +XPixel +XPos +XResource xsi +XSpeed +XStr xstyler +XTimer XUP XVIRTUALSCREEN XXL xxxxxx +YAxis ycombinator +YDimension +YIncrement yinle yinyue +yoko +YPels +YPos +YResolution +YSpeed +YStr +YTimer YVIRTUALSCREEN zamora Zenbook diff --git a/.pipelines/ESRPSigning_core.json b/.pipelines/ESRPSigning_core.json index 8651e4e57d..3ecc64c128 100644 --- a/.pipelines/ESRPSigning_core.json +++ b/.pipelines/ESRPSigning_core.json @@ -243,8 +243,12 @@ "WinUI3Apps\\PowerToys.RegistryPreview.dll", "WinUI3Apps\\PowerToys.RegistryPreview.exe", - "PowerToys.ShortcutGuide.exe", - "PowerToys.ShortcutGuideModuleInterface.dll", + "WinUI3Apps\\PowerToys.ShortcutGuide.exe", + "WinUI3Apps\\PowerToys.ShortcutGuide.dll", + "WinUI3Apps\\PowerToys.ShortcutGuideModuleInterface.dll", + "WinUI3Apps\\PowerToys.ShortcutGuide.IndexYmlGenerator.dll", + "WinUI3Apps\\PowerToys.ShortcutGuide.IndexYmlGenerator.exe", + "WinUI3Apps\\ShortcutGuide.CPPProject.dll", "PowerToys.ZoomIt.exe", "PowerToys.ZoomItModuleInterface.dll", diff --git a/Directory.Packages.props b/Directory.Packages.props index f5612b5512..59c37e9f42 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -136,6 +136,7 @@ + diff --git a/NOTICE.md b/NOTICE.md index b0c42be2ed..9c2cf6583f 100644 --- a/NOTICE.md +++ b/NOTICE.md @@ -1601,3 +1601,4 @@ SOFTWARE. - WinUIEx - WmiLight - WyHash +- YamlDotNet \ No newline at end of file diff --git a/PowerToys.slnx b/PowerToys.slnx index f1a83cd35c..9121f904bf 100644 --- a/PowerToys.slnx +++ b/PowerToys.slnx @@ -989,9 +989,16 @@ - - - + + + + + + + + + + diff --git a/doc/devdocs/images/shortcutguide/diagram.png b/doc/devdocs/images/shortcutguide/diagram.png deleted file mode 100644 index 12d7256828..0000000000 Binary files a/doc/devdocs/images/shortcutguide/diagram.png and /dev/null differ diff --git a/doc/devdocs/modules/shortcut_guide.md b/doc/devdocs/modules/shortcut_guide.md index f150a4456c..9a7a0230db 100644 --- a/doc/devdocs/modules/shortcut_guide.md +++ b/doc/devdocs/modules/shortcut_guide.md @@ -9,12 +9,14 @@ [Pull Requests](https://github.com/microsoft/PowerToys/pulls?q=is%3Apr+is%3Aopen+label%3A%22Product-Shortcut+Guide%22+) ## Overview -Shortcut Guide is a PowerToy that displays an overlay of available keyboard shortcuts when the Windows key is pressed and held. It provides a visual reference for Windows key combinations, helping users discover and utilize built-in Windows shortcuts. +Shortcut Guide is a PowerToy that displays an overlay of available keyboard shortcuts when a user-set keyboard shortcut is pressed. It helps users discover and remember keyboard shortcuts for Windows and apps. + +> [!NOTE] +> The spec for the manifest files is in development and will be linked here once available. ## Usage -- Press and hold the Windows key to display the overlay of available shortcuts -- Press the hotkey again to dismiss the overlay -- The overlay displays Windows shortcuts with their corresponding actions +- Press the user-defined hotkey to display the overlay +- Press the hotkey again or press ESC to dismiss the overlay ## Build and Debug Instructions @@ -25,67 +27,89 @@ Shortcut Guide is a PowerToy that displays an overlay of available keyboard shor 4. The executable is named PowerToys.ShortcutGuide.exe ### Debug -1. Right-click the ShortcutGuide project and select 'Set as Startup Project' +1. Right-click the ShortcutGuide.Ui project and select 'Set as Startup Project' 2. Right-click the project again and select 'Debug' -## Code Structure +> [!NOTE] +> When run in debug mode, the window behaves differently than in release mode. It will not automatically close when loosing focus, it will be displayed on top of all other windows, and it is not hidden from the taskbar. -![Diagram](../images/shortcutguide/diagram.png) +## Project Structure -### Core Files +The Shortcut Guide module consists of the following 4 projects: -#### [`dllmain.cpp`](/src/modules/shortcut_guide/dllmain.cpp) -Contains DLL boilerplate code. Implements the PowertoyModuleIface, including enable/disable functionality and GPO policy handling. Captures hotkey events and starts the PowerToys.ShortcutGuide.exe process to display the shortcut guide window. +### [`ShortcutGuide.Ui`](/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuide.Ui.csproj -#### [`shortcut_guide.cpp`](/src/modules/shortcut_guide/shortcut_guide.cpp) -Contains the module interface code. It initializes the settings values and the keyboard event listener. Defines the OverlayWindow class, which manages the overall logic and event handling for the PowerToys Shortcut Guide. +This is the main UI project for the Shortcut Guide module. Upon startup it does the following tasks: -#### [`overlay_window.cpp`](/src/modules/shortcut_guide/overlay_window.cpp) -Contains the code for loading the SVGs, creating and rendering of the overlay window. Manages and displays overlay windows with SVG graphics through two main classes: -- D2DOverlaySVG: Handles loading, resizing, and manipulation of SVG graphics -- D2DOverlayWindow: Manages the display and behavior of the overlay window +1. Copies the built-in manifest files to the users manifest directory (overwriting existing files). +2. Generate the `index.yml` manifest file. +3. Populate the PowerToys shortcut manifest with the user-defined shortcuts. +4. Starts the UI. -#### [`keyboard_state.cpp`](/src/modules/shortcut_guide/keyboard_state.cpp) -Contains helper methods for checking the current state of the keyboard. +### Related files in PowerToys.Interop -#### [`target_state.cpp`](/src/modules/shortcut_guide/target_state.cpp) -State machine that handles the keyboard events. It's responsible for deciding when to show the overlay, when to suppress the Start menu (if the overlay is displayed long enough), etc. Handles state transitions and synchronization to ensure the overlay is shown or hidden appropriately based on user interactions. +#### [`excluded_app.cpp`](/src/modules/ShortcutGuide/ShortcutGuide.CPPProject/excluded_app.cpp) -#### [`trace.cpp`](/src/modules/shortcut_guide/trace.cpp) -Contains code for telemetry. +This file contains one function with the following signature: -### Supporting Files +```cpp +__declspec(dllexport) bool IsCurrentWindowExcludedFromShortcutGuide() +``` -#### [`animation.cpp`](/src/modules/shortcut_guide/animation.cpp) -Handles the timing and interpolation of animations. Calculates the current value of an animation based on elapsed time and a specified easing function. +This function checks if the current window is excluded from the Shortcut Guide overlay. It returns `true` if the current window is excluded otherwise it returns `false`. -#### [`d2d_svg.cpp`](/src/modules/shortcut_guide/d2d_svg.cpp) -Provides functionality for loading, resizing, recoloring, rendering, and manipulating SVG images using Direct2D. +#### [`tasklist_positions.cpp`](/src/modules/ShortcutGuide/ShortcutGuide.CPPProject/tasklist_positions.cpp) -#### [`d2d_text.cpp`](/src/modules/shortcut_guide/d2d_text.cpp) -Handles creation, resizing, alignment, and rendering of text using Direct2D and DirectWrite. +This file contains helper functions to retrieve the positions of the taskbar buttons. It exports the following function: -#### [`d2d_window.cpp`](/src/modules/shortcut_guide/d2d_window.cpp) -Manages a window using Direct2D and Direct3D for rendering. Handles window creation, resizing, rendering, and destruction. +```cpp +__declspec(dllexport) TasklistButton* get_buttons(HMONITOR monitor, int* size) +``` -#### [`native_event_waiter.cpp`](/src/modules/shortcut_guide/native_event_waiter.cpp) -Waits for a named event and executes a specified action when the event is triggered. Uses a separate thread to handle event waiting and action execution. +This function retrieves the positions of the taskbar buttons for a given monitor. It returns an array of `TasklistButton` structures (max 10), which contain the position and size of each button. -#### [`tasklist_positions.cpp`](/src/modules/shortcut_guide/tasklist_positions.cpp) -Handles retrieving and updating the positions and information of taskbar buttons in Windows. +`monitor` must be the monitor handle of the monitor containing the taskbar instance of which the buttons should be retrieved. -#### [`main.cpp`](/src/modules/shortcut_guide/main.cpp) -The entry point for the PowerToys Shortcut Guide application. Handles initialization, ensures single instance execution, manages parent process termination, creates and displays the overlay window, and runs the main event loop. +`size` will contain the resulting array size. + +It determines the positions through Windows `FindWindowEx` function. +For the primary taskbar it searches for: +* A window called "Shell_TrayWnd" +* that contains a window called "ReBarWindow32" +* that contains a window called "MSTaskSwWClass" +* that contains a window called "MSTaskListWClass" + +For any secondary taskbar it searches for: +* A window called "Shell_SecondaryTrayWnd" +* that contains a window called "WorkerW" +* that contains a window called "MSTaskListWClass" + +It then enumerates all the button elements inside "MSTaskListWClass" while skipping such with a same name (which implies the user does not use combining taskbar buttons) + +If this method fails, which it will for newer versions of Windows, it falls back to searching for: +* A window called "Shell_TrayWnd" or "Shell_SecondaryTrayWnd" +* that contains a window called "Windows.UI.Composition.DesktopWindowContentBridge" +* that contains a window called "Windows.UI.Input.InputSite.WindowClass" +* the first child element + +It then enumerates all the button elements inside the selected while skipping such with a same name (which implies the user does not use combining taskbar buttons) and such that do not start with "Appid:" (which are not actual taskbar buttons related to apps, but others like the widgets or the search button). + +### [`ShortcutGuide.IndexYmlGenerator`](/src/modules/ShortcutGuide/ShortcutGuide.IndexYmlGenerator/) + +This application generates the `index.yml` manifest file. + +It is a separate project so that its code can be easier ported to WinGet in the future. + +### [`ShortcutGuideModuleInterface`](/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.vcxproj) + +The module interface that handles opening and closing the user interface. ## Features and Limitations -- The overlay displays Windows shortcuts (Windows key combinations) -- The module supports localization, but only for the Windows controls on the left side of the overlay +- Currently the displayed shortcuts (Except the ones from PowerToys) are not localized. - It's currently rated as a P3 (lower priority) module ## Future Development -A community-contributed version 2 is in development that will support: -- Application-specific shortcuts based on the active application -- Additional shortcuts beyond Windows key combinations -- PowerToys shortcuts +- Implementing with WinGet to get new shortcut manifest files +- Adding localization support for the built-in manifest files \ No newline at end of file diff --git a/doc/specs/WinGet Manifest Keyboard Shortcuts schema.md b/doc/specs/WinGet Manifest Keyboard Shortcuts schema.md new file mode 100644 index 0000000000..5dddbad27c --- /dev/null +++ b/doc/specs/WinGet Manifest Keyboard Shortcuts schema.md @@ -0,0 +1,318 @@ +# WinGet Manifest Keyboard Shortcuts schema + +## 1 What this spec is about + +This spec provides an extension to the existing [WinGet manifest schema](https://github.com/microsoft/winget-pkgs/blob/master/doc/manifest/README.md) in form of an additional yaml file, that describes keyboard shortcuts the application provides. + +These yaml files are saved on a per-user base and so called manifest interpreters can then display these manifests in a human-friendly version. + +### 1.1 What this spec is not about + +This spec does not provide a way to back up or save user-defined keyboard shortcuts. + +## 2 Save location of manifests + +### 2.1 WinGet + +These files are saved online along with the other manifest files in the [WinGet Package repository](https://github.com/microsoft/winget-pkgs). + +### 2.2 Locally + +All manifests and one index file are saved locally under `%LocalAppData%/Microsoft/WinGet/KeyboardShortcuts`. All apps are allowed to add their manifest files there. In addition Package Managers (like WinGet) and manifest interpreters (like PowerToys Shortcut Guide) can control and add other manifests themselves. + +#### 2.2.1 Downloading manifests + +When WinGet or other package managers download a package, they should also download the corresponding keyboard shortcuts manifest file and save it in the local directory, given such a file exists in the WinGet repository. + +The downloader is also responsible for updating the local `index.yaml` file, which contains all the information about the different manifest files that are saved in the same directory. + +#### 2.2.2 Updating manifests + +When a manifest interpreter starts, it should download the latest version of the manifests from the WinGet repository and save them in the local directory. If a manifest interpreter is not able to download the manifests or they do not exist, it should use the locally saved manifests. + +The updater is also responsible for updating the local `index.yaml` file, which contains all the information about the different manifest files that are saved in the same directory. + +> Note: WinGet must provide a way to update the keyboard shortcuts manifests given a package id. + +### 2.3 File names + +The file name of a keyboard shortcuts file is the WinGet package identifier, plus the locale of the strings of the file and at last the `.KBSC.yaml` file extension. + +For example the package "test.bar" saves its manifest with `en-US` strings in `test.bar.en-US.KBSC.yaml`. + +#### 2.3.1 No winget package available + +If an application has no corresponding WinGet package its name starts with a plus (`+`) symbol. + +### 2.4 Reserved namespaces + +Every name starting with `+WindowsNT` is reserved for the Windows OS and its components. + +## 3 File syntax + +All relevant files are written in [YAML](https://yaml.org/spec). + +> Note: A JSON schema will be provided as soon as the spec reaches a further step + +### 3.1 Manifest Schema vNext Keyboard Shortcuts File + +``` +PackageName: # The package unique identifier +WindowFilter: # The filter of window processes to which the shortcuts apply to +BackgroundProcess: # Optionally allows applying WindowFilter to background processes +Shortcuts: # List of sections with keyboard shortcuts + - SectionName: # Name of the category of shortcuts + Properties: # List of shortcuts in the category + - Name: # Name of the shortcut + Description: # Optional description of the shortcut + AdditionalInfo: # Optional additional information about the shortcut + Recommended: # Optionally determines if the shortcut is displayed in a designated recommended area + Shortcut: # An array of shortcuts that need to be pressed + - Win: # Determines if the Windows Key is part of the shortcut + Ctrl: # Determines if the Ctrl Key is part of the shortcut + Shift: # Determines if the Shift Key is part of the shortcut + Alt: # Determines if the Alt Key is part of the shortcut + Keys: # Array of keys that need to be pressed +``` + +Per Application/Package one or more Keyboard manifests can be declared. Every manifest must have a different locale and the same `PackageName`, `WindowFilter` and `BackgroundProcess` fields. + +
+ PackageName - The package unique identifier + + Package identifier (see 2.1 for more information on the package identifier). + +
+ +
+ WindowFilter - The filter of window processes to which the shortcuts apply to + + This field declares for which process name the shortcuts should be showed (To rephrase: For which processes the shortcut will have an effect if pressed). You can use an asterisk to leave out a certain part. For example `*.PowerToys.*.exe` targets all PowerToys processes and `*` apply to any process. + +
+ +
+ BackgroundProcess - Optionally allows applying WindowFilter to background processes. + + **Optional field** + + Defaults to `False`. Determines if WindowFilter should apply to background processes as well (Rephrased: When the process is running, the shortcuts will apply). + +
+ +
+ Shortcuts - List of sections with keyboard shortcuts + + List of different section (also called categories) of shortcuts. +
+ +
+ SectionName - Name of the category of shortcuts + + Name of the section of shortcuts. + +**Special sections**: + +Special sections start with an identifier enclosed between `<` and `>`. This declares the category as a special display. If the interpreter of the manifest file can't understand the content this section should be left out. + +
+ +
+ Properties - List of shortcuts in the category +
+ +
+ Name - Name of the shortcut + + Name of the shortcut. This is the name that will be displayed in the interpreter. + +
+ + +
+ Description - Optional description of the shortcut + + Optional description of the shortcut. This is the description that will be displayed by the interpreter. +
+ +
+ AdditionalInfo - Optional additional information about the shortcut + + Array of additional information about the shortcut. This is the additional information that will be displayed by the interpreter and are not part of this manifest. + + **Example**: + + For example, if the shortcut is only available on a certain Windows version, this information could be added here. + ```yaml + AdditionalInfo: + - MinWindowsVersion: "10.0.19041.0" + ``` +
+ +
+ Shortcut - An array of shortcuts that need to be pressed + + An array of shortcuts that need to be pressed. This allows defining sequential shortcuts that need to be pressed in order to trigger the action. + +
+ +
+ Win - Determines if the Windows Key is part of the shortcut + + Refers to the left Windows Key on the keyboard. +
+ +
+ Ctrl - Determines if the Ctrl Key is part of the shortcut + + Refers to the left Ctrl Key on the keyboard. +
+ +
+ Shift - Determines if the Shift Key is part of the shortcut + + Refers to the left Shift Key on the keyboard. +
+ +
+ Alt - Determines if the Alt Key is part of the shortcut + + Refers to the left Alt Key on the keyboard. +
+ + +
+ Recommended - Optionally determines if the shortcut is displayed in a designated recommended area + + **Optional field** + + Defaults to `False`. Determines if the shortcut should be displayed in a designated recommended area. This is a visual hint for the user that this shortcut is important. + +
+ +
+ Keys - Array of keys that need to be pressed + + A string array of all the keys that need to be pressed. If a number is supplied, it should be read as a [KeyCode](https://learn.microsoft.com/windows/win32/inputdev/virtual-key-codes) and displayed accordingly (based on the Keyboard Layout of the user). + +**Special keys**: + +Special keys are enclosed between `<` and `>` and correspond to a key that should be displayed in a certain way. If the interpreter of the manifest file can't understand the content, the brackets should be left out. + +|Name|Description| +|----|-----------| +|``| Corresponds to the Office key on some Windows keyboards | +|``| Corresponds to the Copilot key on some Windows keyboards | +|``| Corresponds to the left arrow key | +|``| Corresponds to the right arrow key | +|``| Corresponds to the up arrow key | +|``| Corresponds to the down arrow key | +|``| Corresponds to the Enter key | +|``| Corresponds to the Space key | +|``| Corresponds to the Tab key | +|``| Corresponds to the Backspace key | +|``| Corresponds to the Delete key | +|``| Corresponds to the Insert key | +|``| Corresponds to the Home key | +|``| Corresponds to the End key | +|``| Corresponds to the Print Screen key | +|``| Corresponds to the pause key | +|``| Corresponds to the Page Up key | +|``| Corresponds to the Page Down key | +|``| Corresponds to the Escape key | +|``| Corresponds to either the left, right, up or down arrow key | +|``| Corresponds to either the left or right arrow key | +|``| Corresponds to either the up or down arrow key | +|``| Corresponds to any letter that is _underlined_ in the UI | + +
+ +#### 3.2.2 Example + +```yaml +PackageName: Microsoft.PowerToys +WindowFilter: "*" +BackgroundProcess: True +Shortcuts: + - SectionName: General + Properties: + - Name: Advanced Paste + Shortcut: + - Win: True + Ctrl: False + Alt: False + Shift: False + Keys: + - 86 + Description: Open Advanced Paste window + - Name: Advanced Paste + Shortcut: + - Win: True + Ctrl: True + Alt: True + Shift: False + Keys: + - 86 + Description: Paste as plain text directly + +``` + + +### 3.2 `index.yaml` file + +The `index.yaml` file is a file that contains all the information about the different manifest files that are saved in the same directory. This file is only available locally and is not saved in the WinGet repository as it is specific to the user. + +```yaml +DefaultShellName: # The package identifier of the default shell used in Windows +Index: # List of all manifest files + - WindowFilter: # The filter of window processes to which the shortcuts apply to + BackgroundProcess: # Optionally allows applying WindowFilter to background processes + Apps: # List of all manifest files for the filter +``` + +
+ DefaultShellName - The package identifier of the default shell used in Windows + + This declares the package identifier of the default shell used in Windows. Most commonly it is `+WindowsNT.Shell`. Although not enforced, only the shell declared in the registry key `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\Shell` should be used here. + +
+ +
+ Index - List of all manifest files +
+ +
+ WindowFilter - The filter of window processes to which the shortcuts apply to + + See the `WindowFilter` field in the manifest file for more information. + +
+ +
+ BackgroundProcess - Optionally allows applying WindowFilter to background processes + + **Optional field** + + See the `BackgroundProcess` field in the manifest file for more information. + +
+ +
+ Apps - List of all the package identifiers applying for the filter +
+ +#### 3.2.1 Example + +```yaml +DefaultShellName: "+WindowsNT.Shell" +Index: + - Filter: "*" + BackgroundProcess: True + Apps: ["+WindowsNT.Shell", "Microsoft.PowerToys"] + - Filter: "explorer.exe" + Apps: ["+WindowsNT.WindowsExplorer"] + - Filter: "taskmgr.exe" + Apps: ["+WindowsNT.TaskManager"] + - Filter: "msedge.exe" + Apps: ["+WindowsNT.Edge"] +``` diff --git a/installer/PowerToysSetupVNext/ShortcutGuide.wxs b/installer/PowerToysSetupVNext/ShortcutGuide.wxs index 37b1c7800b..262ddd267c 100644 --- a/installer/PowerToysSetupVNext/ShortcutGuide.wxs +++ b/installer/PowerToysSetupVNext/ShortcutGuide.wxs @@ -2,26 +2,25 @@ - - + + - - - + + - + - + - - + + - + - + diff --git a/installer/PowerToysSetupVNext/generateAllFileComponents.ps1 b/installer/PowerToysSetupVNext/generateAllFileComponents.ps1 index 7273251844..11fff0bfa8 100644 --- a/installer/PowerToysSetupVNext/generateAllFileComponents.ps1 +++ b/installer/PowerToysSetupVNext/generateAllFileComponents.ps1 @@ -397,8 +397,8 @@ Generate-FileComponents -fileListName "ValueGeneratorImagesCmpFiles" -wxsFilePat ## Plugins #ShortcutGuide -Generate-FileList -fileDepsJson "" -fileListName ShortcutGuideSvgFiles -wxsFilePath $PSScriptRoot\ShortcutGuide.wxs -depsPath "$PSScriptRoot..\..\..\$platform\Release\Assets\ShortcutGuide\" -Generate-FileComponents -fileListName "ShortcutGuideSvgFiles" -wxsFilePath $PSScriptRoot\ShortcutGuide.wxs +Generate-FileList -fileDepsJson "" -fileListName ShortcutGuideAssetsFiles -wxsFilePath $PSScriptRoot\ShortcutGuide.wxs -depsPath "$PSScriptRoot..\..\..\$platform\Release\WinUI3Apps\Assets\ShortcutGuide\" +Generate-FileComponents -fileListName "ShortcutGuideAssetsFiles" -wxsFilePath $PSScriptRoot\ShortcutGuide.wxs -regroot $registryroot #Settings Generate-FileList -fileDepsJson "" -fileListName SettingsV2AssetsFiles -wxsFilePath $PSScriptRoot\Settings.wxs -depsPath "$PSScriptRoot..\..\..\$platform\Release\WinUI3Apps\Assets\Settings\" diff --git a/src/common/interop/PowerToys.Interop.vcxproj b/src/common/interop/PowerToys.Interop.vcxproj index 938b9cc21a..4b38d2609b 100644 --- a/src/common/interop/PowerToys.Interop.vcxproj +++ b/src/common/interop/PowerToys.Interop.vcxproj @@ -41,7 +41,6 @@ DynamicLibrary - Unicode false @@ -100,6 +99,7 @@ KeyboardListener.idl + HotkeyManager.idl @@ -114,6 +114,7 @@ + TwoWayPipeMessageIPCManaged.idl @@ -127,6 +128,7 @@ KeyboardListener.idl + HotkeyManager.idl @@ -140,6 +142,7 @@ Create + TwoWayPipeMessageIPCManaged.idl @@ -165,6 +168,9 @@ + + {6955446d-23f7-4023-9bb3-8657f904af99} + {cc6e41ac-8174-4e8a-8d22-85dd7f4851df} diff --git a/src/common/interop/PowerToys.Interop.vcxproj.filters b/src/common/interop/PowerToys.Interop.vcxproj.filters index 6fa51a3275..9a2b3edb6f 100644 --- a/src/common/interop/PowerToys.Interop.vcxproj.filters +++ b/src/common/interop/PowerToys.Interop.vcxproj.filters @@ -54,6 +54,12 @@ Header Files + + Header Files + + + Header Files + @@ -83,6 +89,12 @@ Source Files + + Source Files + + + Source Files + diff --git a/src/common/interop/excluded_app.cpp b/src/common/interop/excluded_app.cpp new file mode 100644 index 0000000000..7b3e491ffc --- /dev/null +++ b/src/common/interop/excluded_app.cpp @@ -0,0 +1,41 @@ +#include "pch.h" +#include "excluded_app.h" +#include <../utils/string_utils.h> + +extern "C" +{ + __declspec(dllexport) bool IsCurrentWindowExcludedFromShortcutGuide() + { + PowerToysSettings::PowerToyValues settings = PowerToysSettings::PowerToyValues::load_from_settings_file(L"Shortcut Guide"); + auto settingsObject = settings.get_raw_json(); + std::wstring apps = settingsObject.GetNamedObject(L"properties").GetNamedObject(L"disabled_apps").GetNamedString(L"value").c_str(); + auto excludedUppercase = apps; + CharUpperBuffW(excludedUppercase.data(), static_cast(excludedUppercase.length())); + std::wstring_view view(excludedUppercase); + view = left_trim(trim(view)); + + m_excludedApps.clear(); + + while (!view.empty()) + { + auto pos = (std::min)(view.find_first_of(L"\r\n"), view.length()); + m_excludedApps.emplace_back(view.substr(0, pos)); + view.remove_prefix(pos); + view = left_trim(trim(view)); + } + + if (m_excludedApps.empty()) + { + return false; + } + + if (HWND foregroundApp{ GetForegroundWindow() }) + { + auto processPath = get_process_path(foregroundApp); + CharUpperBuffW(processPath.data(), static_cast(processPath.length())); + + return check_excluded_app(foregroundApp, processPath, m_excludedApps); + } + return false; + } +} diff --git a/src/common/interop/excluded_app.h b/src/common/interop/excluded_app.h new file mode 100644 index 0000000000..652449a138 --- /dev/null +++ b/src/common/interop/excluded_app.h @@ -0,0 +1,7 @@ +#pragma once + +extern "C" +{ + std::vector m_excludedApps; + __declspec(dllexport) bool IsCurrentWindowExcludedFromShortcutGuide(); +} diff --git a/src/common/interop/pch.h b/src/common/interop/pch.h index c4835a98e1..7b06662237 100644 --- a/src/common/interop/pch.h +++ b/src/common/interop/pch.h @@ -12,3 +12,29 @@ #include #include #include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include <../SettingsAPI/settings_objects.h> diff --git a/src/common/interop/tasklist_positions.cpp b/src/common/interop/tasklist_positions.cpp new file mode 100644 index 0000000000..1fa82ad1bf --- /dev/null +++ b/src/common/interop/tasklist_positions.cpp @@ -0,0 +1,246 @@ +#include "pch.h" +#include "tasklist_positions.h" + +// Tried my hardest adapting this to C#, but FindWindowW didn't work properly in C#. ~Noraa Junker + +static winrt::com_ptr automation; +static winrt::com_ptr element; +static winrt::com_ptr true_condition; + +extern "C" +{ + HWND GetTaskbarHwndForCursorMonitor(HMONITOR monitor) + { + POINT pt; + if (!GetCursorPos(&pt)) + return nullptr; + + // Find the primary taskbar + HWND primaryTaskbar = FindWindowW(L"Shell_TrayWnd", nullptr); + if (primaryTaskbar) + { + MONITORINFO mi = { sizeof(mi) }; + if (GetWindowRect(primaryTaskbar, &mi.rcMonitor)) + { + HMONITOR primaryMonitor = MonitorFromRect(&mi.rcMonitor, MONITOR_DEFAULTTONEAREST); + if (primaryMonitor == monitor) + return primaryTaskbar; + } + } + + // Find the secondary taskbar(s) + HWND secondaryTaskbar = nullptr; + while ((secondaryTaskbar = FindWindowExW(nullptr, secondaryTaskbar, L"Shell_SecondaryTrayWnd", nullptr)) != nullptr) + { + MONITORINFO mi = { sizeof(mi) }; + RECT rc; + if (GetWindowRect(secondaryTaskbar, &rc)) + { + HMONITOR taskbarMonitor = MonitorFromRect(&rc, MONITOR_DEFAULTTONEAREST); + if (monitor == taskbarMonitor) + return secondaryTaskbar; + } + } + + return nullptr; + } + + void update(HMONITOR monitor) + { + // Get HWND of the tasklist for the monitor under the cursor + auto taskbar_hwnd = GetTaskbarHwndForCursorMonitor(monitor); + if (!taskbar_hwnd) + return; + + wchar_t class_name[64] = {}; + GetClassNameW(taskbar_hwnd, class_name, 64); + + HWND tasklist_hwnd = nullptr; + + if (wcscmp(class_name, L"Shell_TrayWnd") == 0) + { + // Primary taskbar structure + tasklist_hwnd = FindWindowExW(taskbar_hwnd, 0, L"ReBarWindow32", nullptr); + if (!tasklist_hwnd) + return; + tasklist_hwnd = FindWindowExW(tasklist_hwnd, 0, L"MSTaskSwWClass", nullptr); + if (!tasklist_hwnd) + return; + tasklist_hwnd = FindWindowExW(tasklist_hwnd, 0, L"MSTaskListWClass", nullptr); + if (!tasklist_hwnd) + return; + } + else if (wcscmp(class_name, L"Shell_SecondaryTrayWnd") == 0) + { + // Secondary taskbar structure + HWND worker_hwnd = FindWindowExW(taskbar_hwnd, 0, L"WorkerW", nullptr); + if (!worker_hwnd) + return; + tasklist_hwnd = FindWindowExW(worker_hwnd, 0, L"MSTaskListWClass", nullptr); + if (!tasklist_hwnd) + return; + } + else + { + // Unknown taskbar type + return; + } + + if (!automation) + { + winrt::check_hresult(CoCreateInstance(CLSID_CUIAutomation, + nullptr, + CLSCTX_INPROC_SERVER, + IID_IUIAutomation, + automation.put_void())); + winrt::check_hresult(automation->CreateTrueCondition(true_condition.put())); + } + element = nullptr; + winrt::check_hresult(automation->ElementFromHandle(tasklist_hwnd, element.put())); + } + + void update_new(HMONITOR monitor) + { + // Get HWND of the tasklist for the monitor under the cursor + auto taskbar_hwnd = GetTaskbarHwndForCursorMonitor(monitor); + if (!taskbar_hwnd) + return; + + wchar_t class_name[64] = {}; + GetClassNameW(taskbar_hwnd, class_name, 64); + + HWND tasklist_hwnd = nullptr; + + if (wcscmp(class_name, L"Shell_TrayWnd") == 0 || wcscmp(class_name, L"Shell_SecondaryTrayWnd") == 0) + { + // Primary taskbar structure + tasklist_hwnd = FindWindowExW(taskbar_hwnd, 0, L"Windows.UI.Composition.DesktopWindowContentBridge", nullptr); + if (!tasklist_hwnd) + return; + tasklist_hwnd = FindWindowExW(tasklist_hwnd, 0, L"Windows.UI.Input.InputSite.WindowClass", nullptr); + if (!tasklist_hwnd) + return; + } + else + { + // Unknown taskbar type + return; + } + + if (!automation) + { + winrt::check_hresult(CoCreateInstance(CLSID_CUIAutomation, + nullptr, + CLSCTX_INPROC_SERVER, + IID_IUIAutomation, + automation.put_void())); + winrt::check_hresult(automation->CreateTrueCondition(true_condition.put())); + } + + winrt::com_ptr tempElement; + element = nullptr; + winrt::check_hresult(automation->ElementFromHandle(tasklist_hwnd, tempElement.put())); + + winrt::check_hresult( + tempElement->FindFirst(TreeScope_Children, true_condition.get(), element.put())); + } + + bool update_buttons(std::vector& buttons) + { + if (!automation || !element) + { + return false; + } + winrt::com_ptr elements; + if (element->FindAll(TreeScope_Children, true_condition.get(), elements.put()) < 0) + return false; + if (!elements) + return false; + int count; + if (elements->get_Length(&count) < 0) + return false; + winrt::com_ptr child; + std::vector found_buttons; + found_buttons.reserve(count); + for (int i = 0; i < count; ++i) + { + child = nullptr; + if (elements->GetElement(i, child.put()) < 0) + return false; + TasklistButton button = {}; + if (VARIANT var_rect; child->GetCurrentPropertyValue(UIA_BoundingRectanglePropertyId, &var_rect) >= 0) + { + if (var_rect.vt == (VT_R8 | VT_ARRAY)) + { + LONG pos; + double value; + pos = 0; + SafeArrayGetElement(var_rect.parray, &pos, &value); + button.x = static_cast(value); + pos = 1; + SafeArrayGetElement(var_rect.parray, &pos, &value); + button.y = static_cast(value); + pos = 2; + SafeArrayGetElement(var_rect.parray, &pos, &value); + button.width = static_cast(value); + pos = 3; + SafeArrayGetElement(var_rect.parray, &pos, &value); + button.height = static_cast(value); + } + VariantClear(&var_rect); + } + else + { + return false; + } + if (BSTR automation_id; child->get_CurrentAutomationId(&automation_id) >= 0) + { + wcsncpy_s(button.name, automation_id, _countof(button.name)); + SysFreeString(automation_id); + if (wcsncmp(button.name, L"Appid:", wcslen(L"Appid:")) != 0) + { + continue; + } + } + found_buttons.push_back(button); + } + // assign keynums + buttons.clear(); + for (auto& button : found_buttons) + { + if (buttons.empty()) + { + button.keynum = 1; + buttons.push_back(std::move(button)); + } + else + { + if (button.x < buttons.back().x || button.y < buttons.back().y) // skip 2nd row + break; + if (wcsncmp(button.name, buttons.back().name, _countof(button.name)) == 0) + continue; // skip buttons from the same app + button.keynum = buttons.back().keynum + 1; + buttons.push_back(std::move(button)); + if (buttons.back().keynum == 10) + break; // no more than 10 buttons + } + } + return true; + } + + __declspec(dllexport) TasklistButton* get_buttons(HMONITOR monitor, int* size) + { + update(monitor); + static std::vector buttons; + update_buttons(buttons); + *size = static_cast(buttons.size()); + if (*size == 0) + { + // After a certain Windows update, the old method stopped working, try the new one + update_new(monitor); + update_buttons(buttons); + *size = static_cast(buttons.size()); + } + return buttons.data(); + } +} \ No newline at end of file diff --git a/src/common/interop/tasklist_positions.h b/src/common/interop/tasklist_positions.h new file mode 100644 index 0000000000..5e32b70747 --- /dev/null +++ b/src/common/interop/tasklist_positions.h @@ -0,0 +1,19 @@ +#pragma once + +struct TasklistButton +{ + wchar_t name[256]; + int x; + int y; + int width; + int height; + int keynum; +}; + +extern "C" +{ + // Helper to get the taskbar HWND for the monitor under the cursor + HWND GetTaskbarHwndForCursorMonitor(HMONITOR monitor); + bool update_buttons(std::vector& buttons); + __declspec(dllexport) TasklistButton* get_buttons(HMONITOR monitor, int* size); +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.IndexYmlGenerator/IndexYmlGenerator.cs b/src/modules/ShortcutGuide/ShortcutGuide.IndexYmlGenerator/IndexYmlGenerator.cs new file mode 100644 index 0000000000..018c160530 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.IndexYmlGenerator/IndexYmlGenerator.cs @@ -0,0 +1,68 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.IO; +using System.Linq; +using ShortcutGuide.Helpers; +using ShortcutGuide.Models; +using YamlDotNet.Serialization; + +// This class should be moved to WinGet in the future +namespace ShortcutGuide.IndexYmlGenerator +{ + public class IndexYmlGenerator + { + public static void Main() + { + CreateIndexYmlFile(); + } + + // Todo: Exception handling + public static void CreateIndexYmlFile() + { + string path = ManifestInterpreter.PathOfManifestFiles; + if (File.Exists(Path.Combine(path, "index.yml"))) + { + File.Delete(Path.Combine(path, "index.yml")); + } + + IndexFile indexFile = new() { }; + Dictionary<(string WindowFilter, bool BackgroundProcess), List> processes = []; + + foreach (string file in Directory.EnumerateFiles(path, "*.yml")) + { + string content = File.ReadAllText(file); + Deserializer deserializer = new(); + ShortcutFile shortcutFile = deserializer.Deserialize(content); + if (processes.TryGetValue((shortcutFile.WindowFilter, shortcutFile.BackgroundProcess), out List? apps)) + { + if (apps.Contains(shortcutFile.PackageName)) + { + continue; + } + + apps.Add(shortcutFile.PackageName); + continue; + } + + processes[(shortcutFile.WindowFilter, shortcutFile.BackgroundProcess)] = [shortcutFile.PackageName]; + } + + indexFile.Index = processes.Select(item => new IndexFile.IndexItem + { + WindowFilter = item.Key.WindowFilter, + BackgroundProcess = item.Key.BackgroundProcess, + Apps = [.. item.Value], + }).ToArray(); + + // Todo: Take the default shell name from the settings or environment variable, default to "+WindowsNT.Shell" + indexFile.DefaultShellName = "+WindowsNT.Shell"; + + Serializer serializer = new(); + string yamlContent = serializer.Serialize(indexFile); + File.WriteAllText(Path.Combine(path, "index.yml"), yamlContent); + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.IndexYmlGenerator/ShortcutGuide.IndexYmlGenerator.csproj b/src/modules/ShortcutGuide/ShortcutGuide.IndexYmlGenerator/ShortcutGuide.IndexYmlGenerator.csproj new file mode 100644 index 0000000000..571ca9de03 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.IndexYmlGenerator/ShortcutGuide.IndexYmlGenerator.csproj @@ -0,0 +1,24 @@ + + + + + + + WinExe + ShortcutGuide.IndexYmlGenerator + enable + false + false + ..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps + PowerToys.ShortcutGuide.IndexYmlGenerator + + + + + + + + + + + diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/HeroImage-dark.png b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/HeroImage-dark.png new file mode 100644 index 0000000000..aa1a055744 Binary files /dev/null and b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/HeroImage-dark.png differ diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/HeroImage.png b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/HeroImage.png new file mode 100644 index 0000000000..54c028ec54 Binary files /dev/null and b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/HeroImage.png differ diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/+WindowsNT.Notepad.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/+WindowsNT.Notepad.en-US.yml new file mode 100644 index 0000000000..d0d607253c --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/+WindowsNT.Notepad.en-US.yml @@ -0,0 +1,247 @@ +PackageName: +WindowsNT.Notepad +Name: Notepad +WindowFilter: "Notepad.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: File + Properties: + - Name: New tab + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: New window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: Open + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - Name: Save + 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: Save all + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - S + - Name: Print + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: Close tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Name: Close window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - W + - SectionName: Edit + Properties: + - Name: Undo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Z + - Name: Cut + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Paste + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Search with Bing + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - Name: Find + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Find next + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F3 + - Name: Find previous + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F3 + - Name: Replace + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - H + - Name: Go to + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Select all + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - Name: Time/Date + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F5 + - SectionName: View + Properties: + - Name: Zoom in + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Plus + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Minus + - Name: Reset zoom + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 0 + - SectionName: Formatting + Properties: + - Name: Bold + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Italic + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Insert link + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Name: Clear formatting + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Space \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/+WindowsNT.Shell.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/+WindowsNT.Shell.en-US.yml new file mode 100644 index 0000000000..de9eb03ab1 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/+WindowsNT.Shell.en-US.yml @@ -0,0 +1,773 @@ +PackageName: +WindowsNT.Shell +WindowFilter: "*" +BackgroundProcess: true +Shortcuts: + - SectionName: Desktop Shortcuts + Properties: + - Name: Close active window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F4 + - Name: Open shutdown box + Description: When no windows are open + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F4 + - Name: Cycle through open Windows + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Esc + - Name: Reveal typed password + Description: On sign-in screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F8 + - Name: Go back + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Go forward + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Move up one screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Move down one screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Window context menu + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Space + - Name: Switch between open apps + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Tab + Description: While pressing Tab multiple times + - Name: Run command + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + Description: for the underlined letter in the app + - Name: View open apps + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Tab + - Name: Change start menu size + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move cursor + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + Description: To the beginning or end of a word + - Name: Switch keyboard layout + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Select block of text + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Open Task Manager + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Esc + - Name: Enable/Disable Chinese IME + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Space + - Name: Open context menu + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F10 + Description: For the selected item + - SectionName: Virtual desktop + Properties: + - Name: Open task view + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - Tab + - Name: Add a virtual desktop + Shortcut: + - Win: true + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Close current desktop + Shortcut: + - Win: true + Ctrl: true + Shift: false + Alt: false + Keys: + - F4 + - Name: Switch desktop + Shortcut: + - Win: true + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + Recommended: true + - SectionName: "Windows key" + Properties: + - Name: Open start menu + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Open Action Center + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "A" + - Name: Open Date and Time + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: true + Keys: + - "D" + - Name: Focus on the notification area + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "B" + - Name: Open narrator + Shortcut: + - Win: true + Ctrl: true + Shift: false + Alt: false + Keys: + - "Enter" + - Name: Open domain search + Shortcut: + - Win: true + Ctrl: true + Shift: false + Alt: false + Keys: + - "F" + - Name: Open Quick Assist + Shortcut: + - Win: true + Ctrl: true + Shift: false + Alt: false + Keys: + - "Q" + - Name: Wake up device + Shortcut: + - Win: true + Ctrl: true + Shift: true + Alt: false + Keys: + - "B" + Description: When black or a blank screen. + - Name: Change input option + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "Space" + Description: To next option + - Name: Change input option + Shortcut: + - Win: true + Ctrl: true + Shift: false + Alt: false + Keys: + - "Space" + Description: To previous option + - Name: Display/Hide desktop + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "D" + - Name: Minimize the active window + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "Down" + Recommended: true + - Name: Open file Explorer + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "E" + - Name: Close Magnifier + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "Esc" + - Name: Open Feedback Hub + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "F" + Recommended: true + - Name: Start IME reconversion + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "/" + - Name: Open Game Bar + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "G" + - Name: Open voice dictation + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "H" + - Name: Minimize or restore all other windows + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Open Settings + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "I" + - Name: Set focus to a Windows tip + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "J" + - Name: Open Cast + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "K" + - Name: Lock the device + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "L" + - Name: Snap the window + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Minimize all windows + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "M" + - Name: Zoom out Magnifier + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "-" + - Name: Zoom in Magnifier + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "=" + - Name: Open notification center + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "N" + - Name: Lock the device orientation + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "O" + - Name: Open project Settings + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "P" + - Name: Open Settings about Page + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Open the emoji panel + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "." + - Name: Open the emoji panel + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - ";" + - Name: Capture a screenshot + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + Description: Save to the pictures folder + - Name: Open search + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "Q" + - Name: Open search + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "S" + - Name: Open Run dialog + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "R" + - Name: Restore window + Description: If a window is snapped or maximized + Shortcut: + - Win: true + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Make UWP app full screen + Shortcut: + - Win: true + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Move window to monitor + Shortcut: + - Win: true + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Open Snipping Tool + Shortcut: + - Win: true + Ctrl: false + Shift: true + Alt: false + Keys: + - "S" + - Name: Stretch window + Description: To the top and bottom of the screen + Shortcut: + - Win: true + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Open task view + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "Tab" + - Name: Open Accessibility Settings + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "U" + - Name: Maximize the active window + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Open the clipboard history + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "V" + - Name: Open widgets + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "W" + - Name: Open Quick Link menu + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "X" + - Name: Open snap layouts + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "Z" + - SectionName: Clipboard + Properties: + - Name: Copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "C" + - Name: Cut + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "X" + - Name: Paste + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "V" + - Name: Paste + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + Description: Paste as plain text + - SectionName: Taskbar Shortcuts + Properties: + - Name: Open app in Taskbar + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Open jump list + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Switch to last active window + Shortcut: + - Win: true + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Open as administrator + Shortcut: + - Win: true + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - SectionName: Copilot key + Properties: + - Name: Open Copilot + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - '' + Description: When copilot is available + - Name: Open Windows search + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - '' + Description: When copilot is not available + - SectionName: Office key + Properties: + - Name: Open Word + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - "W" + - Name: Open Excel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - "X" + - Name: Open PowerPoint + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - "P" + - Name: Open Outlook + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - "O" + - Name: Open Microsoft Teams + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - "T" + - Name: Open OneNote + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - "N" + - Name: Open OneDrive + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - "D" + - Name: Open Yammer + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - "Y" + - Name: Open LinkedIn + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - "L" \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/+WindowsNT.WindowsExplorer.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/+WindowsNT.WindowsExplorer.en-US.yml new file mode 100644 index 0000000000..ca134ea792 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/+WindowsNT.WindowsExplorer.en-US.yml @@ -0,0 +1,266 @@ +PackageName: +WindowsNT.WindowsExplorer +WindowFilter: "explorer.exe" +Name: File Explorer +Shortcuts: + - SectionName: General + Properties: + - Name: Open File Explorer + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "E" + Recommended: true + - Name: Select the address bar + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "D" + - Name: Select the address bar + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "L" + - Name: Select the address bar + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "F4" + - Name: Select the search box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "E" + - Name: Select the search box + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "F3" + - Name: Select the search box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "F" + - Name: Refresh the window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "F5" + - Name: Cycle through elements in the active window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "F6" + - Name: Maximize or restore the active window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "F11" + - SectionName: Navigation + Properties: + - Name: Navigate to the previous folder + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Navigate to the previous folder + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Navigate to the next folder + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Move up a level in the folder path + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - SectionName: "Window management" + Properties: + - Name: Open a new window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "N" + - Name: Open a new tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "T" + Recommended: true + - Name: Close the current active tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "W" + - Name: Move to the next tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "Tab" + - Name: Move to the previous tab + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "Tab" + - Name: Move to that tab number + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "Number (1-9)" + - Name: Show/Hide the preview pane + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "P" + - Name: Show/Hide the details pane + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "P" + - Name: Resize all columns to fit text + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "+" + - Name: Expand all folders + Description: In the navigation pane + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "E" + - SectionName: "File management" + Properties: + - Name: Display properties for the selected item + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "Enter" + - Name: Delete the selected item + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Delete the selected item + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "D" + - Name: Delete the selected item permanently + Description: "This removes the item without sending it to the Recycle Bin" + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "D" + - Name: Create a new folder + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "N" + Recommended: true + - Name: Rename the selected item + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "F2" + - Name: Select multiple items + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Adobe.AfterEffects.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Adobe.AfterEffects.en-US.yml new file mode 100644 index 0000000000..304f9569cc --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Adobe.AfterEffects.en-US.yml @@ -0,0 +1,1623 @@ +PackageName: Adobe.AfterEffects +Name: Adobe After Effects +WindowFilter: "afterfx.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: General + Properties: + - Name: Select all + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl A + - Name: Deselect all + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F2 + - Name: "Duplicate selected layers, masks, effects, text selectors, animators, puppet meshes, shapes, render items, output modules, or compositions" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl D + - Name: Quit + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Q + - Name: Undo + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Z + - Name: Redo + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift Z + - Name: Interrupt running a script + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Display filename corresponding to the frame at the current time in the Info panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt E + - SectionName: Projects + Properties: + - Name: New project + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt N + - Name: Open project + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl O + - Name: Find in Project panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl F + - SectionName: "Panels, viewers, workspaces" + Properties: + - Name: Open or close Project panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl 0 + - Name: Open or close Render Queue panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt 0 + - Name: Open or close Tools panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl 1 + - Name: Open or close Info panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl 2 + - Name: Open or close Preview panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl 3 + - Name: Open or close Audio panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl 4 + - Name: "Open or close Effects & Presets panel" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl 5 + - Name: Open or close Character panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl 6 + - Name: Open or close Paragraph panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl 7 + - Name: Open or close Paint panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl 8 + - Name: Open or close Brushes panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl 9 + - Name: Open or close Effect Controls panel for selected layer + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F3 + - Name: Open Flowchart panel for project flowchart + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl F11 + - Name: Switch to workspace + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Shift F10 + - Name: Close active viewer or panel (closes content first) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl W + - Name: "Close active panel or all viewers of type of active viewer (closes content first). For example, if a Timeline panel is active, this command closes all Timeline panels." + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift W + - Name: "Cycle to previous or next item in active viewer (for example, cycle through open compositions)" + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + + - Name: "Cycle to previous or next panel in active frame (for example, cycle through open Timeline panels)" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt Shift + - SectionName: Activate + Properties: + - Name: Activate Selection tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - V + - Name: Activate Hand tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - H + - Name: Activate Zoom In tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Z + - Name: Activate Rotation tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - W + - Name: Activate Roto Brush tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt W + - Name: Activate Refine Edge tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt W + - Name: "Activate and cycle through Camera tools (Unified Camera, Orbit Camera, Track XY Camera, and Track Z Camera)" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - C + - Name: Activate Pan Behind tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Y + - Name: "Activate and cycle through mask and shape tools (Rectangle, Rounded Rectangle, Ellipse, Polygon, Star)" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Q + - Name: Activate and cycle through Type tools (Horizontal and Vertical) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl T + - Name: "Activate and cycle between the Pen and Mask Feather tools. (Note: You can turn off this setting in the Preferences dialog box.)" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - G + - Name: Temporarily activate Selection tool when a pen tool is selected + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + + - Name: Temporarily activate Pen tool when the Selection tool is selected and pointer is over a path (Add Vertex tool when pointer is over a segment; Convert Vertex tool when pointer is over a vertex) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt + - Name: "Activate and cycle through Brush, Clone Stamp, and Eraser tools" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl B + - Name: Activate and cycle through Puppet tools + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl P + - SectionName: Composition + Properties: + - Name: New composition + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl N + - Name: Open Composition Settings dialog box for selected composition + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl K + - Name: Set beginning or end of work area to current time + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - B + - Name: "Set work area to duration of selected layers or, if no layers are selected, set work area to composition duration" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt B + - Name: Open Composition Mini-Flowchart for active composition + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Tab + - Name: Activate the most recently active composition that is in the same composition hierarchy (network of nested compositions) as the currently active composition + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Shift Esc + - Name: Trim Composition to work area + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift X + - Name: New Composition from selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt \ + - SectionName: Time navigation + Properties: + - Name: Go to specific time + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt Shift J + - Name: Go to beginning or end of work area + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Shift Home + - Name: "Go to previous or next visible item in time ruler (keyframe, layer marker, work area beginning or end)" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - J + - Name: "Go to beginning of composition, layer, or footage item" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Home + - Name: "Go to end of composition, layer, or footage item" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - End + - Name: Go forward 1 frame + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageDown + - Name: Go backward 1 frame + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageUp + - Name: Go to layer In point + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - I + - Name: Go to layer Out point + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - O + - Name: Scroll to current time in Timeline panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - D + - SectionName: Previews + Properties: + - Name: Start or stop preview + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Take snapshot + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Shift F5 + - Name: Display snapshot in active viewer + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F5 + - Name: "Fast Previews > Off" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt 1 + - Name: "Fast Previews > Adaptive Resolution" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt 2 + - Name: "Fast Previews > Draft" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt 3 + - Name: "Fast Previews > Fast Draft" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt 4 + - Name: "Fast Previews > Wireframe" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt 5 + - SectionName: Views + Properties: + - Name: "Show red, green, blue, or alpha channel as grayscale" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt 1 + - Name: "Show colorized red, green, or blue channel" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt Shift 1 + - Name: Toggle showing straight RGB color + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt Shift 4 + - Name: Show alpha boundary (outline between transparent and opaque regions) in Layer panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt 5 + - Name: Show alpha overlay (colored overlay on transparent regions) in Layer panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt 6 + - Name: Show Refine Edge X-ray + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt X + - Name: "Set resolution to Full, Half, or Custom in Composition panel" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl J + - Name: Open View Options dialog box for active Composition panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt U + - Name: Prevent images from being rendered for previews in viewer panels + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Caps Lock + - Name: Show or hide rulers + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl R + - Name: "Show or hide layer controls (masks, motion paths, light and camera wireframes, effect control points, and layer handles)" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift H + - SectionName: Footage + Properties: + - Name: Import one file or image sequence + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl I + - Name: Import multiple files or image sequences + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt I + - Name: Open Interpret Footage dialog box for selected footage item + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt G + - Name: Remember footage interpretation + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt C + - Name: Edit selected footage item in application with which it’s associated (Edit Original) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl E + - Name: Replace selected footage item + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl H + - Name: Reload selected footage items + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt L + - Name: Set proxy for selected footage item + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt P + - SectionName: Effects and animation presets + Properties: + - Name: Delete all effects from selected layers + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift E + - SectionName: Layers + Properties: + - Name: New solid layer + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Y + - Name: New adjustment layer + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt Y + - Name: Deselect all layers + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift A + - Name: Scroll topmost selected layer to top of Timeline panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - X + - Name: Show or hide Parent column + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Shift F4 + - Name: Show or hide Layer Switches and Modes columns + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F4 + - Name: Setting the sampling method for selected layers (Best/Bilinear) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt B + - Name: Setting the sampling method for selected layers (Best/Bicubic) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt Shift B + - Name: Turn off Video switch for all video layers other than selected layers + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift V + - Name: "Open settings dialog box for selected solid, light, camera, null, or adjustment layer" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift Y + - Name: Paste layers at current time + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt V + - Name: "Split selected layers. (If no layers are selected, split all layers.)" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift D + - Name: Precompose selected layers + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift C + - Name: Open Effect Controls panel for selected layers + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift T + - Name: Reverse selected layers in time + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt R + - Name: Enable time remapping for selected layers + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt T + - Name: Set In point or Out point by time-stretching + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift + - Name: Move selected layers so that their In point is at beginning of composition + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt Home + - Name: Move selected layers so that their Out point is at end of composition + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt End + - Name: Lock selected layers + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl L + - Name: Unlock all layers + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift L + - Name: "Set Quality to Best, Draft, or Wireframe for selected layers" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl U + - Name: Find in Timeline panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl F + - SectionName: Showing properties and groups in the Timeline panel + Properties: + - Name: Find in Timeline panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl F + - Name: "Show only Anchor Point property (for lights and cameras, Point Of Interest)" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - A + - Name: Show only Audio Levels property + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - L + - Name: Show only Mask Feather property + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F + - Name: Show only Mask Path property + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - M + - Name: Show only Mask Opacity property + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - TT + - Name: "Show only Opacity property (for lights, Intensity)" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - T + - Name: Show only Position property + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - P + - Name: Show only Rotation and Orientation properties + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - R + - Name: Show only Scale property + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - S + - Name: Show only Time Remap property + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - RR + - Name: Show only instances of missing effects + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - FF + - Name: Show only Effects property group + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - E + - Name: Show only mask property groups + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - MM + - Name: Show only Material Options property group + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - AA + - Name: Show only expressions + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - EE + - Name: Show properties with keyframes + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - U + - Name: Show only modified properties + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - UU + - Name: "Show only paint strokes, Roto Brush strokes, and Puppet pins" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PP + - Name: Show only audio waveform + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - LL + - Name: Show only selected properties and groups + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - SS + - SectionName: Modifying layer properties + Properties: + - Name: Open Auto-Orientation dialog box for selected layers + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt O + - Name: Open Opacity dialog box for selected layers + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift O + - Name: Open Rotation dialog box for selected layers + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift R + - Name: Open Position dialog box for selected layers + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift P + - Name: Center-selected layers in view (modifies Position property to place anchor points of selected layers in center of current view) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Home + - Name: Move selected layers 1 pixel at current magnification (Position) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Arrow key + - Name: Move selected layers 1 frame earlier or later + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt Page Up + - Name: Increase or decrease Rotation (Z Rotation) of selected layers by 1° + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - (plus) + - Name: Increase or decrease Rotation (Z Rotation) of selected layers by 10° + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Shift (plus) + - Name: "Increase Scale of selected layers by 1%" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl (plus) + - Name: Scale and reposition selected layers to fit composition + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt F + - SectionName: 3D Layers + Properties: + - Name: Switch to 3D view 1 (defaults to Front) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F10 + - Name: Switch to 3D view 2 (defaults to Custom View 1) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - Name: Switch to 3D view 3 (defaults to Active Camera) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F12 + - Name: Return to previous view + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: "With a camera tool selected, move the camera and its point of interest to look at selected 3D layers" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F + - Name: "With a camera tool selected, move the camera and its point of interest to look at all 3D layers" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift F + - Name: Turn Casts Shadows property on or off for selected 3D layers + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt Shift C + - SectionName: Keyframes and the Graph Editor + Properties: + - Name: Toggle between Graph Editor and layer bar modes + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Shift F3 + - Name: Select all visible keyframes and properties + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt A + - Name: "Deselect all keyframes, properties, and property groups" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Shift F2 + - Name: Set interpolation for selected keyframes (layer bar mode) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt K + - Name: Set keyframe interpolation method to hold or Auto Bezier + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt H + - Name: Easy ease selected keyframes + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F9 + - Name: Easy ease selected keyframes in + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Shift F9 + - Name: Set velocity for selected keyframes + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift K + - SectionName: Text + Properties: + - Name: "Align selected horizontal text left, center, or right" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift L + - Name: "Align selected vertical text top, center, or bottom" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift L + - Name: Select text from insertion point to beginning or end of line + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Shift Home + - Name: Move insertion point to beginning or end of line + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Home + - Name: "In horizontal text, move insertion point one character left or right; one line up or down; one word left or right; or one paragraph up or down" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Left Arrow + - Name: "In vertical text, move insertion point one character up or down; one left or right; one word up or down; or one paragraph left or right" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Up Arrow + - Name: Turn All Caps on or off for selected text + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift K + - Name: "Set horizontal scale to 100% for selected text" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift X + - Name: Reset tracking to 0 for selected text + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift Q + - Name: Justify paragraph; left align last line + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift J + - Name: Justify paragraph; force last line + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift F + - Name: Decrease or increase font size of selected text by 2 units + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift + - SectionName: Masks + Properties: + - Name: New mask + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift N + - Name: Exit free-transform mask editing mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Move selected path points 1 pixel at current magnification + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Arrow key + - Name: Invert selected mask + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift I + - Name: Open Mask Feather dialog box for selected mask + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift F + - Name: Open Mask Shape dialog box for selected mask + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift M + - Name: Subtract mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - S + - Name: Darken mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - D + - Name: Difference mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F + - Name: Add mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - A + - Name: Intersect mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - I + - Name: None + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - N + - SectionName: Paint tools + Properties: + - Name: Swap paint background color and foreground colors + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - X + - Name: Set paint foreground color to black and background color to white + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - D + - Name: Momentarily activate Eraser tool with Last Stroke Only option + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift + - Name: Activate a specific Clone Stamp tool preset + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - 3 + - Name: Move earlier or later by number of frames specified for stroke Duration + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Page Up + - SectionName: Shape Layers + Properties: + - Name: Group selected shapes + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl G + - Name: Ungroup selected shapes + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift G + - SectionName: Motion Tracking + Properties: + - Name: "Move feature region, search region, and attach point 1 pixel at current magnification" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Arrow key + - SectionName: "Saving, exporting, and rendering" + Properties: + - Name: Save project + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl S + - Name: Save As + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift S + - Name: Add current frame to render queue + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt S + - Name: Duplicate render item with same output filename as original + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Shift D + - Name: Add a composition to the Adobe Media Encoder encoding queue + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Ctrl Alt M diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Adobe.Illustrator.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Adobe.Illustrator.en-US.yml new file mode 100644 index 0000000000..afde6d0669 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Adobe.Illustrator.en-US.yml @@ -0,0 +1,2148 @@ +PackageName: Adobe.Illustrator +Name: Adobe Illustrator +WindowFilter: "illustrator.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Popular shortcuts + Properties: + - Name: Undo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Z + - Name: Cut + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Paste + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Paste in front + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Paste at back + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Paste in place + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - B + - Name: Paste on all artboards + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - B + - Name: Check spelling + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Open the Color Settings dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - K + - Name: Open the Keyboard Shortcuts dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - K + - Name: Open the Preferences dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - SectionName: Work with documents + Properties: + - Name: Create a document + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Create a document from a template + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: Create a document without opening the New Document dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - N + - Name: Open a document + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - Name: Place a file in the document + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - P + - Name: Open the File Information dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - I + - Name: Open the Document Setup dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - P + - Name: Browse in Adobe Bridge + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - O + - Name: Close the document window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Name: Save changes made to the document + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - S + - Name: Open the Save As dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - S + - Name: Save a copy of the document + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - S + - Name: Save the document as script files + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F12 + - Name: Open the Export for screens dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - E + - Name: Open the Save For Web dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - S + - Name: Package the document + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - P + - Name: Print + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: Exit the application + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Q + - SectionName: Select tools + Properties: + - Name: Artboard tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - O + - Name: Selection tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - V + - Name: Direct Selection tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - A + - Name: Magic Wand tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Y + - Name: Lasso tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Q + - Name: Pen tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - P + - Name: Curvature tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - ~ + - Name: Blob Brush tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - B + - Name: Add Anchor Point tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - (plus) + - Name: Delete Anchor Point tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "- (minus)" + - Name: Switch to Anchor Point tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - C + - Name: Type tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - T + - Name: Touch Type tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - T + - Name: Rectangle tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - M + - Name: Ellipse tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - L + - Name: Paintbrush tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - B + - Name: Pencil tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - N + - Name: Shaper tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - N + - Name: Rotate tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - R + - Name: Reflect tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - O + - Name: Scale tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - S + - Name: Warp tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - R + - Name: Width Tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - W + - Name: Free Transform tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - E + - Name: Shape Builder Tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - M + - Name: Perspective Grid Tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - P + - Name: Perspective Selection Tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - V + - Name: Symbol Sprayer tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - S + - Name: Column Graph tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - J + - Name: Mesh tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - U + - Name: Gradient tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - G + - Name: Eyedropper tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - I + - Name: Blend tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - W + - Name: Live Paint Bucket tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - K + - Name: Live Paint Selection tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - L + - Name: Slice tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - K + - Name: Eraser tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - E + - Name: Scissors tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - C + - Name: Hand tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - H + - Name: Zoom tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Z + - Name: Switch to Smooth tool while using Blob Brush tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Press Alt + - SectionName: View artwork + Properties: + - Name: "Toggle between screen modes: Normal Screen Mode, Full Screen Mode with Menu Bar, Full Screen Mode" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F + - Name: Switch to Hand tool (when not in text-edit mode) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Switch to Zoom tool in magnify mode + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Switch to Zoom tool in reduce mode + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "" + - Name: Move Zoom marquee while dragging with the Zoom tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Hide bounding box + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - B + - Name: Hide unselected artwork + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - 3 + - Name: Show document template + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - H + - Name: Show/Hide artboards + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - H + - Name: Show/Hide artboard rulers + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - R + - Name: Show transparency grid + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - D + - Name: View all artboards in window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 0 (zero) + - Name: Paste in place on the active artboard + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - V + - Name: Exit Artboard tool mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Navigate to next document + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F6 + - Name: Navigate to previous document + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F6 + - Name: Navigate to next document group + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - F6 + - Name: Navigate to previous document group + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - F6 + - Name: Toggle between Outline and GPU Preview of the document + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Y + - Name: Toggle between GPU and CPU Preview of the document + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - Name: View the document in Overprint Preview mode + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - Y + - Name: View the document in Pixel Preview mode + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Y + - Name: Exit Full Screen mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Zoom in + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - = + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Minus + - Name: Hide guides + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Semicolon + - Name: Lock guides + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Semicolon + - Name: Make guides + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 5 + - Name: Release guides + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 5 + - Name: Show/ hide smart guides + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Show/ hide perspective grid + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - I + - Name: Show grid + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Quote + - Name: Snap to grid + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Quote + - Name: Snap to point + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Quote + - SectionName: Work with selections + Properties: + - Name: "Switch to last-used selection tool (Selection tool, Direct Selection tool, or Group Selection tool)" + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tilde + - Name: Switch between Direct Selection tool and Group Selection tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Change pointer to cross hair for Lasso tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Caps Lock + - Name: Select artwork in active artboard + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - A + - Name: Create crop marks around selected object + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - C + - O + - Name: Select all + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - Name: Deselect + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - A + - Name: Reselect + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 6 + - Name: Select the object above the current selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - RightBracket + - Name: Select the object below the current selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - LeftBracket + - Name: Group the selected artwork + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Ungroup the selected artwork + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - G + - Name: Lock a selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 2 + - Name: Unlock a selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 2 + - Name: Hide a selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 3 + - Name: Show all selections + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 3 + - Name: Move selection in user-defined increments + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Right Arrow + - Name: Move selection in 10x user-defined increments + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Right Arrow + - Name: Lock all deselected artwork + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - 2 + - Name: Bring a selection forward + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - RightBracket + - Name: Move a selection to the front + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - RightBracket + - Name: Send a selection backward + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - LeftBracket + - Name: Move a selection to the back + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - LeftBracket + - SectionName: Draw + Properties: + - Name: Constrain Blob Brush path horizontally or vertically + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + + - Name: Switch through drawing modes + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - D + - Name: Create a compound path + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 8 + - Name: Release a compound path + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - 8 + - Name: Edit a pattern + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F8 + - Name: Perspective Grid Tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - P + - Name: Perspective Selection Tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - V + - Name: Perspective Grid + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - I + - Name: Repeat transforming objects in perspective + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Switching between drawing modes + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - D + - SectionName: Edit shapes + Properties: + - Name: Switch Pen tool to Convert Anchor Point tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Switch between Add Anchor Point tool and Delete Anchor Point tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Switch Scissors tool to Add Anchor Point tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Switch Pencil tool to Smooth tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Use shape mode buttons in Pathfinder panel to create compound paths + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Shape mode + - Name: Select the Shape Builder tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - M + - Name: Increase the intensity of symbols (when using Symbolism tool) + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "}" + - Name: Decrease the intensity of symbols (when using Symbolism tool) + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "{" + - Name: Blend objects + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - B + - Name: Finish adding objects to the blend + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - B + - Name: Distort objects using a warp-shaped envelope + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - W + - Name: Distort objects using a mesh as the shape of the envelope + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - M + - Name: Distort objects using another object as the shape of the envelope + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - C + - SectionName: Work with Live Paint groups + Properties: + - Name: "Select opposite Live Paint Bucket tool options (if Paint Fills and Paint Strokes are currently selected, switch to Paint Fills only)" + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Live Paint Bucket tool + - SectionName: Work with objects + Properties: + - Name: Reapply a transformation to an object + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Apply last pathfinder effect to the selected object + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 4 + - Name: Move an object + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - Name: Open the Transform Each dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - D + - Name: Make a clipping mask + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 7 + - Name: Release a clipping mask + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 7 + - Name: Toggle between fill and stroke + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - X + - Name: Set fill and stroke to default + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - D + - Name: Swap fill and stroke + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - X + - Name: Select gradient fill mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ">" + - Name: Hide gradient annotator (when using the Gradient tool) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - G + - Name: Select color fill mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - < + - Name: Sample color from an image or intermediate color from gradient + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Eyedropper tool + - Name: Add new fill + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - / (forward slash) + - Name: Add new stroke + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - / (forward slash) + - Name: Make Live Paint (when using the Paint Bucket tool) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - X + - Name: Decrease Bristle brush size + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - LeftBracket + - Name: Increase Bristle brush size + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - RightBracket + - SectionName: Create variable width points + Properties: + - Name: Delete selected width point + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Deselect a width point + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - SectionName: Work with type + Properties: + - Name: Move one character right or left + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Right Arrow + - Name: Move up or down one line + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Up Arrow + - Name: Move one word right or left + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Right Arrow + - Name: Move up or down one paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Up Arrow + - Name: Select one word right or left + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Right Arrow + - Name: Select one paragraph before or after + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Up Arrow + - Name: "Align paragraph left, right, or center" + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - L + - Name: Justify text left + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - J + - Name: Justify all lines + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F + - Name: Toggle line composer + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - C + - Name: Insert soft return + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Highlight kerning + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - K + - Name: "Reset horizontal scale to 100%" + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - X + - Name: Increase or decrease font size + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Period + - Name: Increase or decrease font size by steps + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - Period + - Name: Increase or decrease leading + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Select tracking value + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - K + - Name: Reset tracking/kerning to 0 + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Q + - Name: Increase or decrease kerning and tracking + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Increase or decrease kerning and tracking by five times + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "" + - Name: Increase or decrease baseline shift + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: "Switch between Type and Vertical Type, Area Type and Vertical Area Type, and Path Type and Vertical Path Type tools" + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + + - Name: "Switch between Area Type and Path Type, Vertical Area Type and Vertical Path Type tools" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Create outlines + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - O + - Name: Open the Character panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: Open the Paragraph panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - T + - Name: Open the Tabs panel + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - Name: Open the OpenType panel + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - T + - Name: Insert bullets + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 8 + - Name: Insert copyright symbol + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - G + - Name: Insert ellipsis + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Semicolon + - Name: Insert paragraph symbol + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 7 + - Name: Insert section symbol + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 6 + - Name: Insert trademark symbol + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 2 + - Name: Insert registered trademark symbol + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - R + - Name: Superscript + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - = + - Name: Subscript + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - = + - Name: Insert em dash + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Minus + - Name: Insert en dash + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Minus + - Name: Insert discretionary hyphen + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Minus + - Name: Toggle auto-hyphenation + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - H + - Name: Insert double left quotation marks + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - LeftBracket + - Name: Insert double right quotation marks + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - LeftBracket + - Name: Insert single left quotation marks + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - RightBracket + - Name: Insert single right quotation marks + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - RightBracket + - Name: Insert em space + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - Name: Insert en space + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: Insert thin space + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - M + - Name: Show hidden characters + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - I + - SectionName: Use panels + Properties: + - Name: Switch units of measurement + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - U + - Name: Apply value and keep text box active + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Show/Hide all panels + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Tab + - Name: Show/Hide all panels except the Tools panel and Control panel + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Tab + - Name: Increase/ decrease values in logical fractions of the measurement unit + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Increase/ decrease measurement unit by 10x + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - SectionName: Character and Paragraph panels + Properties: + - Name: Open the Character panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: Open the Paragraph panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - T + - Name: Increase/decrease the selected value by a small increment + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Up Arrow + - Name: Increase/decreases the selected value by a large increment + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Up Arrow + - Name: Increase/decrease the selected value by a fraction + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Highlight the font name field in the Character panel + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - F + - SectionName: Color panel + Properties: + - Name: Open Color Guide + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F3 + - SectionName: Gradient panel + Properties: + - Name: Open Color Guide + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F3 + - SectionName: Layers panel + Properties: + - Name: Add a layer + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - L + - Name: Add a layer while opening the New Layer dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - L + - SectionName: Transform panel + Properties: + - Name: Apply a value and keep focus in edit field + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Apply a value and copy object + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Apply a value and scale option proportionately for width or height + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - SectionName: Transparency panel + Properties: + - Name: Apply last effect to the selected object + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - E + - Name: Apply last effect to the selected object by adjusting the values in the effects dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - E + - SectionName: Function keys + Properties: + - Name: Invoke Help + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F1 + - Name: Cut + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F2 + - Name: Copy + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F3 + - Name: Paste + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F4 + - Name: Show/hide Brushes panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F5 + - Name: Show/hide Color panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F6 + - Name: Show/hide Layers panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F7 + - Name: Create new symbol + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F8 + - Name: Show/hide Info panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F8 + - Name: Show/hide Gradient panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F9 + - Name: Show/hide Stroke panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F10 + - Name: Show/hide Attributes panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F11 + - Name: Revert + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F12 + - Name: Show/hide Graphic Styles panel + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F5 + - Name: Show/hide Appearance panel + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F6 + - Name: Show/hide Align panel + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F7 + - Name: Show/hide Transform panel + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F8 + - Name: Show/hide Pathfinder panel + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F9 + - Name: Show/hide Transparency panel + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F10 + - Name: Show/hide Symbols panel + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F11 diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Adobe.InDesign.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Adobe.InDesign.en-US.yml new file mode 100644 index 0000000000..f2b2d94fbd --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Adobe.InDesign.en-US.yml @@ -0,0 +1,1370 @@ +PackageName: Adobe.InDesign +Name: Adobe InDesign +WindowFilter: "indesign.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Tools + Properties: + - Name: Selection tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - V + - Name: Direct Selection tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - A + - Name: Toggle Selection and Direct Selection tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tab + - Name: Page tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - P + - Name: Gap tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - U + - Name: Pen tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - P + - Name: Add Anchor Point tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - = + - Name: Add Anchor Point tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - = + - Name: Delete Anchor Point tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Minus + - Name: Convert Direction Point tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - C + - Name: Type tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - T + - Name: Type On A Path tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - T + - Name: Pencil tool (Note tool) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - N + - Name: Line tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Backslash + - Name: Rectangle Frame tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F + - Name: Rectangle tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - M + - Name: Ellipse tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - L + - Name: Rotate tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - R + - Name: Scale tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - S + - Name: Shear tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - O + - Name: Free Transform tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - E + - Name: Eyedropper tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - I + - Name: Measure tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - K + - Name: Gradient tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - G + - Name: Scissors tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - C + - Name: Hand tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - H + - Name: Zoom tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Z + - Name: Temporarily selects Zoom In tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Toggle Fill and Stroke + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - X + - Name: Swap Fill and Stroke + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - X + - Name: Toggle between Formatting Affects Container and Formatting Affects Text + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - J + - Name: Apply Gradient + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ". [period]" + - Name: Apply No Color + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Slash + - Name: Switch between Normal View and Preview Mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - W + - Name: Frame Grid tool (horizontal) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Y + - Name: Frame Grid tool (vertical) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Q + - Name: Gradient Feather tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - G + - SectionName: Selecting and moving objects + Properties: + - Name: Duplicate and offset selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Left Arrow + - Name: Duplicate and offset selection by 10 times + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Left Arrow + - Name: Move selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Left Arrow + - Name: Move selection by 10th + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Left Arrow + - Name: Move selection by 10 times + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Left Arrow + - Name: Select next or previous frame in story + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Page Down/ Alt + - PageUp + - Name: Select first or last frame in story + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - Page Down/ Shift + - PageUp + - SectionName: Transforming objects + Properties: + - Name: "Decrease scale by 1%" + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + + - Name: "Decrease scale by 5%" + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + + - Name: "Increase scale by 1%" + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Period + - Name: "Increase scale by 5%" + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Period + - Name: Switch image from High Quality Display to Fast Display + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - Z + - SectionName: Editing paths and frames + Properties: + - Name: Temporarily select Convert Direction Point tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Direct Selection tool + - Name: Temporarily switch between Add Anchor Point and Delete Anchor Point tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Temporarily select Add Anchor Point tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Scissors tool + - Name: Keep Pen tool selected when pointer is over path or anchor point + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Pen tool + - Name: Move anchor point and handles while drawing + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Pen tool + - "" + - Name: Display the Stroke panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F10 + - SectionName: Tables + Properties: + - Name: Move to next/previous cell + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Tab/Shift + - Tab + - Name: Move to first/last cell in column + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Page Up/ Alt + - PageDown + - Name: Move to first/last cell in row + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Home/ Alt + - End + - Name: Select cell above/below the current cell + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Up Arrow/ Shift + - Down Arrow + - Name: Select cell to the right/left of the current cell + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Right Arrow/ Shift + - Left Arrow + - Name: Start row on next frame + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Enter (numeric keypad) + - Name: Toggle between text selection and cell selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - SectionName: Finding and changing text + Properties: + - Name: Insert selected text into Find What box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F1 + - Name: Insert selected text into Find What box and finds next + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F1 + - Name: Find next occurrence of Find What text + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F2 + - Name: Insert selected text into Change To box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F2 + - Name: Replace selection with Change To text + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F3 + - SectionName: Working with type + Properties: + - Name: Bold (only for fonts with bold face) + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - B + - Name: Italic (only for fonts with italic face) + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - I + - Name: Normal + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Y + - Name: Underline + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - U + - Name: Strikethrough + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Slash + - Name: All caps (on/off) + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - K + - Name: Asian language hyphenation + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - K + - Name: Small caps (on/off) + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - H + - Name: Tate-chu-yoko setting + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - H + - Name: Superscript + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - ( + - ") [plus sign]" + - Name: Subscript + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - ( + - ") [plus sign]" + - Name: "Reset horizontal or vertical scale to 100%" + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - X + - Name: Basic letter group setting or detail setting + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - X + - Name: "Align left, right, or center" + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - L + - Name: Justify all lines + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F (all lines) + - Name: Align both ends or equal spacing + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F (align both end) + - Name: Increase or decrease point size + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - ">" + - Name: Increase or decrease point size by five times + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - ">" + - Name: Increase or decrease leading (horizontal text) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Up Arrow/ Alt + - Down Arrow + - Name: Increase or decrease leading (vertical text) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Right Arrow/ Alt + - Left Arrow + - Name: Increase or decrease leading by five times (horizontal text) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Up Arrow/ Alt + - Down Arrow + - Name: Increase or decrease leading by five times (vertical text) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Right Arrow/ Alt + - Left Arrow + - Name: Auto leading + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - A + - Name: Align to grid (on/off) + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - G + - Name: Auto-hyphenate (on/off) + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - H + - Name: Increase or decrease kerning and tracking (horizontal text) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Left Arrow/Alt + - Right Arrow + - Name: Increase or decrease kerning and tracking (vertical text) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Up Arrow/ Alt + - Down Arrow + - Name: Increase or decrease kerning and tracking by five times (horizontal text) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Left Arrow/ Alt + - Right Arrow + - Name: Increase or decrease kerning and tracking by five times (vertical text) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Up Arrow/ Alt + - Down Arrow + - Name: Increase kerning between words + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Backslash + - Name: Decrease kerning between words + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "" + - Name: Clear all manual kerning and reset tracking to 0 + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Q + - Name: Increase or decrease baseline shift (horizontal text) + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Up Arrow/ Shift + - Down Arrow + - Name: Increase or decrease baseline shift (vertical text) + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Right Arrow/ Shift + - Left Arrow + - Name: Increase or decrease baseline shift by five times (horizontal text) + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - Up Arrow/ Shift + - Down Arrow + - Name: Increase or decrease baseline shift by five times (vertical text) + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - Right Arrow/ Shift + - Left Arrow + - Name: Recompose all stories + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Slash + - Name: Insert current page number + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - N + - SectionName: Navigating through and selecting text + Properties: + - Name: Move to right or left one word + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Right Arrow/ Ctrl + - Left Arrow + - Name: Move to start or end of line + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Home/End + - Name: Move to previous or next paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Up Arrow/ Ctrl + - Down Arrow + - Name: Move to start or end of story + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Home/ Ctrl + - End + - Name: Select one character right or left + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Right Arrow/ Shift + - Left Arrow + - Name: Select one line above or below + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Up Arrow/ Shift + - Down Arrow + - Name: Select start or end of line + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Home/ Shift + - End + - Name: Select one paragraph before or after + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Up Arrow/ Shift + - Down Arrow + - Name: Select current line + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Backslash + - Name: Select start or end of story + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Home/ Shift + - End + - Name: Select all in story + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - Name: Select first/last frame + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - Page Up/ Shift + - PageDown + - Name: Select previous/next frame + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Page Up/ Alt + - PageDown + - Name: Delete word in front of insertion point (Story Editor) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Update missing font list + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - Slash + - SectionName: Viewing documents and document workspaces + Properties: + - Name: Temporarily select Zoom In tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Temporarily select Zoom Out tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "" + - Name: "Zoom to 50%, 200%, or 400%" + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 5 + - Name: Redraw screen + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F5 + - Name: Open new default document + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - N + - Name: Switch between current and previous zoom levels + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 2 + - Name: Switch to next/previous document window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "~ [tilde]/ Shift" + - F6 + - Name: Go back/forward to last-viewed page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Page Up/ Ctrl + - PageDown + - Name: Go to previous/next spread + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Page Up/ Alt + - PageDown + - Name: Activate the Go To command + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Name: Fit selection in window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - ( + - ") [plus sign]" + - Name: Display the entire object + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - ( + - ") [plus sign]" + - Name: Go to master page while \ panel is closed + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Name: Cycle through units of measurement + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - U + - Name: Select all guides + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - G + - Name: Show information on installed plug‑ins and InDesign components + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "Help > About Design" + - SectionName: Control panel + Properties: + - Name: Toggle focus to/from Control panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 6 + - Name: Toggle Character/Paragraph text attributes mode + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 7 + - Name: Display the pop-up menu that has focus + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Down Arrow + - SectionName: Type panels and dialog boxes + Properties: + - Name: Open Justification dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - J + - Name: Open Paragraph Rules dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - J + - Name: Open Keep Options dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - K + - Name: Activate Character panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: Activate Paragraph panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - T + - SectionName: Character and paragraph styles + Properties: + - Name: Open Justification dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - J + - Name: Open Paragraph Rules dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - J + - Name: Open Keep Options dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - K + - Name: Activate Character panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: Activate Paragraph panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - T + - SectionName: Tabs panel + Properties: + - Name: Activate Tabs panel + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - SectionName: Pages panel + Properties: + - Name: Add new page after last page + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - P + - SectionName: Separations Preview panel + Properties: + - Name: Turn on Overprint preview + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - Y + - Name: Show all plates + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - "~ [tilde]" + - Name: Show Cyan plate + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - 1 + - Name: Show Magenta plate + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - 2 + - Name: Show Yellow plate + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - 3 + - Name: Show Black plate + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - 4 + - Name: Show 1st Spot plate + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - 5 + - Name: Show 2nd Spot plate + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - 6 + - Name: Show 3rd Spot plate + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - 7 + - SectionName: Transform panel + Properties: + - Name: Apply value and copy object + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: "Apply width, height, or scale value proportionally" + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Adobe.Photoshop.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Adobe.Photoshop.en-US.yml new file mode 100644 index 0000000000..c8097e8140 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Adobe.Photoshop.en-US.yml @@ -0,0 +1,2692 @@ +PackageName: Adobe.Photoshop +Name: Adobe Photoshop +WindowFilter: "photoshop.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Popular shortcuts + Properties: + - Name: Free Transform + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: Decrease Brush Size + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - LeftBracket + - Name: Increase Brush Size + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - RightBracket + - Name: Decrease Brush Hardness + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "{" + - Name: Increase Brush Hardness + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "}" + - Name: Default Foreground/Background colors + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - D + - Name: Switch Foreground/Background colors + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - X + - Name: New layer via copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Name: New layer via cut + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - J + - Name: Cancel any modal dialog window (including the Start Workspace) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Select the first edit field of the tool bar + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Navigate between fields + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Tab + - Name: Navigate between fields in opposite direction + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Tab + - Name: Change Cancel to Reset + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - SectionName: Function keys + Properties: + - Name: Start Help + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F1 + - Name: Cut + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F2 + - Name: Copy + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F3 + - Name: Paste + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F4 + - Name: Show/Hide Brush panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F5 + - Name: Show/Hide Color panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F6 + - Name: Show/Hide Layers panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F7 + - Name: Show/Hide Info panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F8 + - Name: Show/Hide Actions panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F9 + - Name: Revert + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F12 + - Name: Fill + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F5 + - Name: Feather Selection + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F6 + - Name: Inverse Selection + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F7 + - SectionName: Select tools + Properties: + - Name: Move tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - V + - Name: Rectangular Marquee tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - M + - Name: Elliptical Marquee tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - M + - Name: Lasso tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - L + - Name: Polygonal Lasso tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - L + - Name: Magnetic Lasso tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - L + - Name: Magic Wand tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - W + - Name: Quick Selection tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - W + - Name: Crop tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - C + - Name: Slice tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - C + - Name: Slice Select tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - C + - Name: Eyedropper tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - I + - Name: Color Sampler tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - I + - Name: Ruler tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - I + - Name: Note tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - I + - Name: Spot Healing Brush tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - J + - Name: Healing Brush tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - J + - Name: Patch tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - J + - Name: Red Eye tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - J + - Name: Brush tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - B + - Name: Pencil tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - B + - Name: Color Replacement tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - B + - Name: Mixer Brush tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - B + - Name: Clone Stamp tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - S + - Name: Pattern Stamp tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - S + - Name: History Brush tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Y + - Name: Art History Brush tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Y + - Name: Eraser tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - E + - Name: Background Eraser tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - E + - Name: Magic Eraser tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - E + - Name: Gradient tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - G + - Name: Paint Bucket tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - G + - Name: Dodge tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - O + - Name: Burn tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - O + - Name: Sponge tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - O + - Name: Pen tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - P + - Name: Freeform Pen tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - P + - Name: Horizontal Type tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - T + - Name: Vertical Type tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - T + - Name: Horizontal Type mask tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - T + - Name: Vertical Type mask tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - T + - Name: Path Selection tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - A + - Name: Direct Selection tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - A + - Name: Rectangle tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - U + - Name: Rounded Rectangle tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - U + - Name: Ellipse tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - U + - Name: Polygon tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - U + - Name: Line tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - U + - Name: Custom Shape tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - U + - Name: Hand tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - H + - Name: Rotate View tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - R + - Name: Zoom tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Z + - Name: Default Foreground/Background colors + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - D + - Name: Switch Foreground/Background colors + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - X + - Name: Toggle Standard/Quick Mask modes + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Q + - Name: Content-Aware Move tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - J + - Name: Perspective Crop tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - C + - Name: Artboard tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - V + - Name: Rotate View tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - R + - Name: Decrease Brush Hardness + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "{" + - Name: Increase Brush Hardness + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "}" + - Name: Next Brush + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Period + - Name: First Brush + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - < + - Name: Last Brush + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ">" + - SectionName: Images + Properties: + - Name: Cycle through open documents + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tab + - Name: Switch to previous document + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Tab + - Name: Close a file in Photoshop and open Bridge + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Shift-Control-W + - Name: Toggle between Standard mode and Quick Mask mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Q + - Name: "Toggle (forward) between Standard screen mode, Full screen mode with menu bar, and Full screen mode" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F + - Name: "Toggle (backward) between Standard screen mode, Full screen mode with menu bar, and Full screen mode" + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F + - Name: Toggle (backward) canvas color + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - F + - Name: "" + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 1 + - Name: Switch to Hand tool (when not in text-edit mode) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Switch to Zoom In tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Switch to Zoom Out tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: "Apply zoom percentage, and keep zoom percentage box active" + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Enter in Navigator panel zoom percentage box + - Name: Scroll up or down 1 screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageUp + - Name: Scroll up or down 10 units + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - PageUp + - Name: Move view to upper-left corner or lower-right corner + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Home + - SectionName: Refine Edge + Properties: + - Name: Open the Refine Edge dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - R + - Name: Cycle (forward) through preview modes + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F + - Name: Cycle (backward) through preview modes + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F + - Name: Toggle between original image and selection preview + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - X + - Name: Toggle between original selection and refined version + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - P + - Name: Toggle radius preview on and off + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - J + - Name: Toggle between Refine Radius and Erase Refinements tools + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - E + - SectionName: Filter Gallery + Properties: + - Name: Reapply last-used filter + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - F + - Name: Change Cancel button to Default + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + + - Name: Change Cancel button to Reset + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Undo/Redo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Step forward + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Z + - Name: Step backward + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Z + - SectionName: Liquify filter + Properties: + - Name: Forward Warp tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - W + - Name: Reconstruct tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - R + - Name: Twirl Clockwise tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - C + - Name: Pucker tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - S + - Name: Bloat tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - B + - Name: Push Left tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - O + - Name: Mirror tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - M + - Name: Turbulence tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - T + - Name: Freeze Mask tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F + - Name: Thaw Mask tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - D + - Name: "Reverse direction for Bloat, Pucker, Push Left, and Mirror tools" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - tool + - Name: Cycle through controls on right from top + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Tab + - Name: Cycle through controls on right from bottom + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Tab + - Name: Change Cancel to Reset + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - SectionName: Vanishing Point + Properties: + - Name: Zoom 2x (temporary) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - X + - Name: Zoom in + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - (plus) + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "- (hyphen)" + - Name: "Increase brush size (Brush, Stamp tools)" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - RightBracket + - Name: "Decrease brush size (Brush, Stamp tools)" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - LeftBracket + - Name: "Increase brush hardness (Brush, Stamp tools)" + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - RightBracket + - Name: "Decrease brush hardness (Brush, Stamp tools)" + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - LeftBracket + - Name: Undo last action + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo last action + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Z + - Name: Deselect all + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Hide selection and planes + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - H + - Name: Move selection 1 pixel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Arrow keys + - Name: Move selection 10 pixels + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - arrow keys + - Name: Copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Paste + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Repeat last duplicate and move + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - Name: Create a floating selection from the current selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - T + - Name: Constrain selection to a 15° rotation + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Shift to rotate + - Name: Delete last node while creating plane + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - SectionName: Camera Raw dialog box + Properties: + - Name: Zoom tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Z + - Name: Hand tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - H + - Name: White Balance tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - I + - Name: Color Sampler tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - S + - Name: Crop tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - C + - Name: Straighten tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - A + - Name: Spot Removal tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - B + - Name: Red Eye Removal tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - E + - Name: Basic panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 1 + - Name: Tone Curve panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 2 + - Name: Detail panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 3 + - Name: HSL/Grayscale panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 4 + - Name: Split Toning panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 5 + - Name: Lens Corrections panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 6 + - Name: Camera Calibration panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 7 + - Name: Presets panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 9 + - Name: Open Snapshots panel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 9 + - Name: Parametric Curve Targeted Adjustment tool + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - T + - Name: Hue Targeted Adjustment tool + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - H + - Name: Saturation Targeted Adjustment tool + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - S + - Name: Luminance Targeted Adjustment tool + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - L + - Name: Grayscale Mix Targeted Adjustment tool + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - G + - Name: Last-used Targeted Adjustment tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - T + - Name: Adjustment Brush tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - K + - Name: Graduated Filter tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - G + - Name: Increase/decrease brush size + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "] / [" + - Name: Increase/decrease brush feather + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "] / Shift" + - LeftBracket + - Name: "Temporarily switch from Add to Erase mode for theAdjustment Brush tool, or from Erase to Add mode" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Increase/decrease temporary Adjustment Brush tool size + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "] / Alt" + - LeftBracket + - Name: Increase/decrease temporary Adjustment Brush tool feather + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "] / Alt" + - LeftBracket + - Name: Increase/decrease temporary Adjustment Brush tool flow in increments of 10 + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - = (equal sign) / Alt + - "- (hyphen)" + - Name: Switch to New mode from Add or Erase mode of theAdjustment Brush tool or the Graduated Filter + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - N + - Name: Toggle Auto Mask for Adjustment Brush tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - M + - Name: Toggle Show Mask for Adjustment Brush tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Y + - Name: Toggle pins for Adjustment Brush tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - V + - Name: "Toggle overlay for Graduated Filter, Spot Removal tool, or Red Eye Removal tool." + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - V + - Name: Rotate image left + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - L + - Name: Rotate image right + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - R + - Name: Zoom in + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - (plus) + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "- (hyphen)" + - Name: Temporarily switch to Zoom In tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + + - Name: Temporarily switch to Zoom Out tool and change the Open Image button to Open Copy and the Cancel button to Reset. + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Toggle preview + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - P + - Name: Full screen mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F + - Name: Temporarily activate the White Balance tool and change the Open Image button to Open Object. + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + + - Name: Move selected point in Curves panel (1 unit) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Arrow keys + - Name: Move selected point in Curves panel (10 units) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Shift-arrow + - Name: Open selected images in Camera Raw dialog box from Bridge + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - R + - Name: Highlight clipping warning + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - O + - Name: Shadows clipping warning + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - U + - Name: (Filmstrip mode) Add 1 - 5 star rating + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 1 - 5 + - Name: (Filmstrip mode) Increase/decrease rating + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - . (period) / Ctrl + - Name: (Filmstrip mode) Add red label + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 6 + - Name: (Filmstrip mode) Add yellow label + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 7 + - Name: (Filmstrip mode) Add green label + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 8 + - Name: (Filmstrip mode) Add blue label + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 9 + - Name: (Filmstrip mode) Add purple label + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - 0 + - Name: Camera Raw preferences + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Name: Deletes Adobe Camera Raw preferences + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Alt (on open) + - SectionName: Black-and-White dialog box + Properties: + - Name: Open the Black-and-White dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - B + - Name: "Increase/decrease selected value by 10%" + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Up Arrow/Down Arrow + - SectionName: Curves + Properties: + - Name: Open the Curves dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - M + - Name: Select next point on the curve + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - (plus) + - Name: Select the previous point on the curve + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - – (minus) + - Name: Deselect a point + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Move the selected point 1 unit + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Arrow keys + - Name: Move the selected point 10 units + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Arrow keys + - SectionName: Select and move objects + Properties: + - Name: Apply/cancel an operation of the Magnetic Lasso + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Enter/Esc + - Name: Move selection 1 pixel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Move tool + - Right Arrow + - Name: Move layer 1 pixel when nothing selected on layer + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Right Arrow + - Name: Increase/decrease detection width + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Magnetic Lasso tool + - LeftBracket + - Name: Accept cropping or exit cropping + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Crop tool + - "" + - SectionName: "Transform selections, selection borders, and paths" + Properties: + - Name: Transform from center or reflect + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Constrain + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + + - Name: Distort + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + + - Name: Apply + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Cancel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - . (period) + - Name: Free transform with duplicate data + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - T + - Name: Transform again with duplicate data + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - T + - SectionName: Edit paths + Properties: + - Name: "Switch from Path Selection, Pen, Add Anchor Point, Delete Anchor Point, or Convert Point tools to Direct Selection tool" + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + + - Name: Switch from Pen tool or Freeform Pen tool to Convert Point tool when pointer is over anchor or direction point + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - SectionName: Painting + Properties: + - Name: Color sampler tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Eyedropper tool + - Name: Mixer Brush changes Mix setting + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - number + - Name: Mixer Brush changes Wet setting + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Number keys + - Name: Mixer Brush changes Wet and Mix to zero + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - 0 + - Name: Cycle through blending modes + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - (plus) + - Name: Open Fill dialog box on background or standard layer + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Fill with foreground or background color + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Fill from history + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "" + - Name: Displays Fill dialog box + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - SectionName: Blending modes + Properties: + - Name: Cycle through blending modes + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - (plus) + - Name: Normal + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - N + - Name: Dissolve + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - I + - Name: Behind (Brush tool only) + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Q + - Name: Clear (Brush tool only) + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - R + - Name: Darken + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - K + - Name: Multiply + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - M + - Name: Color Burn + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - B + - Name: Linear Burn + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - A + - Name: Lighten + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - G + - Name: Screen + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - S + - Name: Color Dodge + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - D + - Name: Linear Dodge + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - W + - Name: Overlay + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - O + - Name: Soft Light + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - F + - Name: Hard Light + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - H + - Name: Vivid Light + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - V + - Name: Linear Light + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - J + - Name: Pin Light + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Z + - Name: Hard Mix + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - L + - Name: Difference + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - E + - Name: Exclusion + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - X + - Name: Hue + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - U + - Name: Saturation + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - T + - Name: Color + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - C + - Name: Luminosity + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Y + - Name: Desaturate + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Sponge tool + - D + - Name: Saturate + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Sponge tool + - S + - Name: Dodge/burn shadows + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Dodge tool/Burn tool + - S + - Name: Dodge/burn midtones + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Dodge tool/Burn tool + - M + - Name: Dodge/burn highlights + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Dodge tool/Burn tool + - H + - Name: "Set blending mode to Threshold for bitmap images, Normal for all other images" + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - N + - SectionName: Select and edit text + Properties: + - Name: "Select 1 character left/right or 1 line down/up, or 1 word left/right" + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Left Arrow/Right Arrow + - Name: Show/Hide selection on selected type + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - H + - Name: "Display the bounding box for transforming text when editing text, or activate Move tool if cursor is inside the bounding box" + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + + - SectionName: Format type + Properties: + - Name: "Align left, center, or right" + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Horizontal Type tool + - L + - Name: "Align top, center, or bottom" + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Vertical Type tool + - L + - Name: "Choose 100% horizontal scale" + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - X + - Name: "Choose 100% vertical scale" + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - X + - Name: Choose Auto leading + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - A + - Name: Choose 0 for tracking + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Q + - Name: "Justify paragraph, left aligns last line" + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - J + - Name: "Justify paragraph, justifies all" + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F + - Name: Toggle paragraph hyphenation on/off + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - H + - Name: Toggle single/every-line composer on/off + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - T + - Name: Decrease or increase type size of selected text 2 points or pixels + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + + - Name: Decrease or increase leading 2 points or pixels + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Down Arrow + - Name: Decrease or increase baseline shift 2 points or pixels + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Down Arrow + - Name: Decrease or increase kerning/tracking 20/1000 ems + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Left Arrow + - SectionName: Panels + Properties: + - Name: Apply value and keep text box active + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Show/Hide all panels + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Tab + - Name: Show/Hide all panels except the toolbox and options bar + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Tab + - Name: Increase/decrease selected values by 10 + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Up Arrow/Down Arrow + - SectionName: Adjustment layers + Properties: + - Name: Choose specific channel for adjustment + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 3 (red) + - Name: Choose composite channel for adjustment + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 2 + - Name: Delete adjustment layer + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - SectionName: Brush panel + Properties: + - Name: Select first/last brush + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + + - Name: Display precise cross hair for brushes + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Caps Lock + - Name: Toggle airbrush option + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - P + - SectionName: Clone Source panel + Properties: + - Name: Show Clone Source (overlays image) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⌥ + - ⇧ + - Name: Nudge Clone Source + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⌥ + - ⇧ + - arrow keys + - Name: Rotate Clone Source + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⌥ + - ⇧ + - Name: Scale (increase or reduce size) Clone Source + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⌥ + - ⇧ + - LeftBracket + - SectionName: History panel + Properties: + - Name: Create a new snapshot + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - New Snapshot + - Name: Step forward through image states + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Z + - Name: Step backward through image states + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Z + - Name: Permanently clear history (no Undo) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Clear History (in History panel pop‑up menu) + - SectionName: Layers panel + Properties: + - Name: New layer + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: New layer via copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Name: New layer via cut + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - J + - Name: Group layers + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Ungroup layers + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - G + - Name: Create/release clipping mask + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - G + - Name: Select all layers + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - A + - Name: Merge visible layers + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - E + - Name: Select top layer + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - . (period) + - Name: Select bottom layer + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Add to layer selection in Layers panel + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - LeftBracket + - Name: Select next layer down/up + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - LeftBracket + - Name: Move target layer down/up + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - LeftBracket + - Name: Merge a copy of all visible layers into target layer + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - E + - Name: Move layer to bottom or top + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - LeftBracket + - Name: Copy current layer to layer below + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Merge Down command from the Panel pop‑up menu + - Name: Merge all visible layers to a new layer above the currently selected layer + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Merge Visible command from the Panel pop‑up menu + - SectionName: Paths panel + Properties: + - Name: Hide path + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - H diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/BlenderFoundation.Blender.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/BlenderFoundation.Blender.en-US.yml new file mode 100644 index 0000000000..3658639cde --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/BlenderFoundation.Blender.en-US.yml @@ -0,0 +1,687 @@ +PackageName: BlenderFoundation.Blender +Name: Blender +WindowFilter: "blender.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: General + Properties: + - Name: Open file + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - Name: Save file + 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: New file + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Quit Blender + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Q + - Name: Undo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Z + - Name: Search menu (operator search) + Recommended: true + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F3 + - Name: Toggle fullscreen window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Save user preferences + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Toggle Edit Mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Tab + - Name: Toggle quad view + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Q + - SectionName: Editor switching + Properties: + - Name: 3D Viewport + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F5 + - Name: Image Editor + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F10 + - Name: UV Editor + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F10 + - Name: Shader Editor + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F3 + - Name: Compositor + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F3 + - Name: Outliner + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F9 + - Name: Properties + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F7 + - Name: Text Editor + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F11 + - Name: Timeline + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F12 + - Name: Python Console + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F4 + - SectionName: Selection (3D Viewport) + Properties: + - Name: Select all / deselect all (toggle) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - A + - Name: Deselect all + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - A + - Name: Invert selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Box select + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - B + - Name: Circle select + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - C + - Name: Lasso select + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - drag + - Name: Select linked under cursor + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - L + - Name: Select linked + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - L + - SectionName: Object mode + Properties: + - Name: Add menu + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - A + - Name: Duplicate + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - D + - Name: Duplicate linked + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - D + - Name: Move (grab) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - G + - Name: Rotate + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - R + - Name: Scale + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - S + - Name: Apply transformation + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - Name: Clear location + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - G + - Name: Clear rotation + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - R + - Name: Clear scale + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - S + - Name: Parent + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: Clear parent + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - P + - Name: Join + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Name: Move to collection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - M + - Name: Hide selected + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - H + - Name: Hide unselected + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - H + - Name: Reveal hidden + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - H + - Name: Delete selected + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - X + - SectionName: Edit mode (mesh) + Properties: + - Name: Vertex select mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - 1 + - Name: Edge select mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - 2 + - Name: Face select mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - 3 + - Name: Extrude region + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - E + - Name: Inset faces + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - I + - Name: Bevel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Loop cut + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - R + - Name: Knife tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - K + - Name: Subdivide + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Right-click menu + - Name: Merge vertices menu + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - M + - Name: Separate selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - P + - Name: Fill + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F + - Name: Toggle proportional editing + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - O + - SectionName: Viewport navigation + Properties: + - Name: View selected + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Numpad Period + - Name: View all + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Home + - Name: Toggle perspective / orthographic + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Numpad 5 + - Name: Front view + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Numpad 1 + - Name: Right view + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Numpad 3 + - Name: Top view + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Numpad 7 + - Name: Camera view + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Numpad 0 + - Name: Local view (toggle) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Numpad Slash + - Name: Toggle wireframe / solid shading + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Z + - Name: Toggle x-ray + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Z + - SectionName: Render and animation + Properties: + - Name: Render image + Recommended: true + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F12 + - Name: Render animation + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F12 + - Name: Show / hide render window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - Name: Play / pause animation + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Next frame + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Previous frame + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: First frame + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Last frame + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Forward 10 frames + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Back 10 frames + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Insert keyframe + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - I + - Name: Delete keyframe + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - I diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Discord.Discord.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Discord.Discord.en-US.yml new file mode 100644 index 0000000000..bc87326230 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Discord.Discord.en-US.yml @@ -0,0 +1,264 @@ +PackageName: Discord.Discord +Name: Discord +WindowFilter: "discord.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Server and channel navigation + Properties: + - Name: Navigate between servers (up) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "" + - Name: Navigate between servers (down) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "" + - Name: Navigate between channels (up) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Navigate between channels (down) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Navigate between unread channels (up) + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Navigate between unread channels (down) + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Navigate between unread channels with mentions (up) + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - "" + - Name: Navigate between unread channels with mentions (down) + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - "" + - Name: Return to previous text channel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Return to active audio channel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - A + - Name: Find or start a direct message + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Name: Create or join a server + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: Create a private group + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - SectionName: Message reading + Properties: + - Name: Mark channel as read + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Mark server as read + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Scroll chat up a screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageUp + - Name: Scroll chat down a screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageDown + - Name: Jump to oldest unread message + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - PageUp + - SectionName: Pop-outs and panels + Properties: + - Name: Toggle pins pop-out + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: Toggle mentions pop-out + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Toggle channel member list + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Toggle emoji picker + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - Name: Toggle hotkeys reference + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Slash + - SectionName: Voice and calls + Properties: + - Name: Answer incoming call + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Decline incoming call + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Start call in private message or group + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - LeftBracket + - Name: Toggle mute + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - Name: Toggle deafen + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - D + - SectionName: Other + Properties: + - Name: Focus text area + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Tab + - Name: Get help + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - H + - Name: Upload a file + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - U diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Figma.Figma.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Figma.Figma.en-US.yml new file mode 100644 index 0000000000..6d6840ade4 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Figma.Figma.en-US.yml @@ -0,0 +1,957 @@ +PackageName: Figma.Figma +Name: Figma +WindowFilter: "figma.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Essentials + Properties: + - Name: Show / Hide UI + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL \ + - Name: Pick color + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⌃ C + - Name: Quick actions + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL / + - SectionName: Tools + Properties: + - Name: Move tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - V + - Name: Frame tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F + - Name: Pen tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - P + - Name: Pencil tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ P + - Name: Text tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - T + - 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: + - O + - 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: + - ⇧ L + - Name: Add comment + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - C + - Name: Pick color + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - I + - Name: Slice cool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - S + - SectionName: View + Properties: + - Name: Show / Hide UI + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL \ + - Name: Multiplayer cursors + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt CTRL \ + - Name: Rulers + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ R + - Name: Outlines + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL O + - Name: Pixel preview + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL ⇧ P + - Name: Layout grids + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ G + - Name: Pixel grid + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "⇧ `" + - Name: Open layers panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt 1 + - Name: Open assets panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt 2 + - Name: Open design panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt 8 + - Name: Open prototype panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt 9 + - Name: Open inspect panel + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt 0 + - SectionName: Zoom + Properties: + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Minus + - Name: "Zoom to 100%" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ 0 + - Name: Zoom to fit + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ 1 + - Name: Zoom to selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ 2 + - Name: Zoom to previous frame + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ N + - Name: Zoom to next frame + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - N + - Name: Previous page + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageUp + - Name: Next page + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageDown + - Name: Find previous frame + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Home + - Name: Find next frame + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - End + - SectionName: Text + Properties: + - Name: Bold + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL B + - Name: Italic + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL I + - Name: Underline + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL U + - Name: Create link + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL K + - Name: Strikethrough + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ CTRL X + - Name: Turn into a list + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ CTRL 7 + - Name: Text align left + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt CTRL L + - Name: Text align center + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt CTRL T + - Name: Text align right + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt CTRL R + - Name: Text align justified + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt CTRL J + - Name: Adjust font size + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ CTRL + - Name: Adjust font weight + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt CTRL + - Name: Adjust letter spacing + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Adjust line height + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ Alt + - SectionName: Shape + Properties: + - Name: Pen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - P + - Name: Pencil + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ P + - Name: Paint bucket + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - B + - Name: Bend tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + + - Name: Remove fill + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt / + - Name: Remove stroke + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Slash + - Name: Swap fill and stroke + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ X + - Name: Outline stroke + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ CTRL O + - Name: Flatten selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL E + - Name: Join selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL J + - Name: Smooth join selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ CTRL J + - Name: Delete and heal selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ Delete + - SectionName: Selection + Properties: + - Name: Select all + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL A + - Name: Select inverse + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ CTRL A + - Name: Select none + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Select children + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ↩ + - Name: Select parent + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ ↩ + - Name: Select next sibling + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Tab + - Name: Select previous sibling + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ Tab + - Name: Group selections + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL G + - Name: Ungroup selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ CTRL G + - Name: Frame selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt CTRL G + - Name: Show / Hide selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ CTRL H + - Name: Lock / Unlock selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ CTRL L + - SectionName: Cursor + Properties: + - Name: Measure to selection (while pointing) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Duplicate selection (while moving) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Resize from center (while dragging) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + + - Name: Resize proportionally (while dragging) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ + - Name: Move while resizing (while dragging) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: "Ignore constraints (frames only, while dragging)" + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + + - SectionName: Edit + Properties: + - Name: Copy + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL C + - Name: Cut + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL X + - Name: Paste + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL V + - Name: Paste over selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ CTRL V + - Name: Duplicate + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL D + - Name: Rename selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL R + - Name: Export + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ CTRL E + - Name: Copy properties + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt CTRL C + - Name: Paste properties + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt CTRL V + - Name: Copy as PNG + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ CTRL C + - Name: Copy Page Link to Clipboard + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - CTRL L + - SectionName: Transform + Properties: + - Name: Flip horizontal + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ H + - Name: Flip vertical + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ V + - Name: Use a mask + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⌃ CTRL M + - Name: Edit shape or image + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ↩ + - Name: Place image + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ CTRL K + - Name: Set opacity to 10 + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - 1 + - Name: Set opacity to 50 + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - 5 + - Name: Set opacity to 100 + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - 0 + - SectionName: Arrange + Properties: + - Name: Bring forward + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "CTRL ]" + - Name: Send backward + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "CTRL [" + - Name: Bring to front + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "Alt CTRL [" + - Name: Send to back + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "Alt CTRL ]" + - Name: Align left + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt A + - Name: Align right + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt D + - Name: Align top + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt W + - Name: Align bottom + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt S + - Name: Tidy up + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⌃ Alt T + - Name: Add auto layout + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - ⇧ A + - Name: Remove auto layout + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt ⇧ A + - SectionName: Components + Properties: + - Name: Show assets + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt 2 + - Name: Team library + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt CTRL O + - Name: Create component + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt CTRL K + - Name: Detach intense + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Alt CTRL B + - Name: Swap component instance + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/GIMP.GIMP.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/GIMP.GIMP.en-US.yml new file mode 100644 index 0000000000..8b48934762 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/GIMP.GIMP.en-US.yml @@ -0,0 +1,710 @@ +PackageName: GIMP.GIMP +Name: GIMP +WindowFilter: "gimp*.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Help + Properties: + - Name: Help + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F1 + - Name: Context Help + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F1 + - SectionName: Tools + Properties: + - Name: Rectangle Select + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - R + - Name: Ellipse Select + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - E + - Name: Free Select + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F + - Name: Fuzzy Select + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - U + - Name: Select By Color + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - O + - Name: Scissors + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - I + - Name: Paths + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - B + - Name: Color Picker + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - O + - Name: Move + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - M + - Name: Crop and Resize + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - C + - Name: Rotate + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - R + - Name: Scale + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - T + - Name: Shear + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - S + - Name: Perspective + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - P + - Name: Flip + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F + - Name: Text + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - T + - Name: Bucket Fill + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - B + - Name: Blend (Gradient) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - G + - Name: Pencil + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - N + - Name: Paintbrush + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - P + - Name: Eraser + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - E + - Name: Airbrush + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - A + - Name: Ink + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - K + - Name: Clone + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - C + - Name: Blur/Sharpen + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - U + - Name: Smudge + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - S + - Name: Dodge/Burn + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - D + - SectionName: Color context + Properties: + - Name: Swap foreground / background colors + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - X + - Name: Reset to default colors + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - D + - SectionName: File + Properties: + - Name: New image + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Open image + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - Name: Open image as new layer + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - O + - Name: Duplicate image + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Save image + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - S + - Name: Save under a new name + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - S + - Name: Export to + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - Name: Export As + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - E + - Name: Quit + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Q + - SectionName: Dialogs + Properties: + - Name: Layers + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - L + - Name: Brushes + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - B + - Name: Patterns + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - P + - Name: Gradients + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Tool Options + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - Name: Palettes + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: Pointer (Info) window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - I + - Name: Navigation window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - SectionName: Window and view + Properties: + - Name: Main menu + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F10 + - Name: Toggle fullscreen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - Name: Toggle quickmask + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Q + - Name: Close document window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Name: Toggle rulers + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - R + - Name: Toggle guides + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - Name: Shrink-wrap window to image + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - Name: Fit image in window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - E + - Name: Zoom in + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Plus + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Minus + - Name: "Zoom 1:1" + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - 1 + - SectionName: Edit + Properties: + - Name: Undo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Y + - Name: Copy selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Cut selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Paste clipboard + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Clear selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Name: Named copy selection + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - C + - Name: Named cut selection + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - X + - Name: Named paste clipboard + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - V + - SectionName: Fill + Properties: + - Name: Fill with foreground color + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Comma + - Name: Fill with background color + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Period + - Name: Fill with pattern + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Semicolon + - SectionName: Layers + Properties: + - Name: Select layer above + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageUp + - Name: Select layer below + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageDown + - Name: Select first layer + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Home + - Name: Select last layer + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - End + - Name: Merge visible layers + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - M + - Name: Anchor layer + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - H + - SectionName: Selections + Properties: + - Name: Toggle selection visibility + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: Select all + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - Name: Select none + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - A + - Name: Invert selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Float selection + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - L + - Name: Path to selection + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - V + - SectionName: Filters + Properties: + - Name: Repeat last filter + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Reshow last filter + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Google.Chrome.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Google.Chrome.en-US.yml new file mode 100644 index 0000000000..4496a2c641 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Google.Chrome.en-US.yml @@ -0,0 +1,483 @@ +PackageName: Google.Chrome +Name: Google Chrome +WindowFilter: "chrome.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Tabs and windows + Properties: + - Name: New window + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: New incognito window + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: New tab + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: Reopen previously closed tab + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - Name: Jump to next tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tab + - Name: Jump to previous tab + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Tab + - Name: Jump to specific tab (1–8) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 1 + - Name: Jump to rightmost tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 9 + - Name: Open home page in current tab + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Home + - Name: Open previous page in history + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Open next page in history + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Close current tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Name: Close current window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - W + - Name: Move tab right + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - PageDown + - Name: Move tab left + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - PageUp + - Name: Turn full-screen mode on/off + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - Name: Open split view in active tab + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - N + - SectionName: Chrome features + Properties: + - Name: Open the Chrome menu + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F + - Name: Show or hide bookmarks bar + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - B + - Name: Open Bookmarks Manager + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - O + - Name: Open History page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - H + - Name: Open Downloads page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Name: Open Chrome Task Manager + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Open Find Bar + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Find next match + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Find previous match + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - G + - Name: Open Developer Tools + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - I + - Name: Open Developer Tools (alt) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F12 + - Name: Clear Browsing Data + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Open Help Center + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F1 + - Name: Switch user / browse as guest + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - Name: Open feedback form + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - I + - Name: Toggle caret browsing + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F7 + - SectionName: Address bar + Properties: + - Name: Jump to address bar + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - L + - Name: Jump to address bar (alt) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - D + - Name: Add www. and .com and open in current tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Add www. and .com and open in new window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Open new tab and search + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Search from anywhere on the page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - SectionName: Web page + Properties: + - Name: Print current page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: Save current page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - S + - Name: Reload current page + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F5 + - Name: "Reload, ignoring cache" + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - R + - Name: Stop loading + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Open file in Chrome + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - Name: View page source + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Bookmark current page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Bookmark all open tabs + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - D + - Name: Zoom in + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Plus + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Minus + - Name: Reset zoom + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 0 + - Name: Scroll down a screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Scroll up a screen + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Go to top of page + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Home + - Name: Go to bottom of page + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - End + - Name: Move cursor to start of previous word + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move cursor to next word + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Delete previous word in text field + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Inkscape.Inkscape.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Inkscape.Inkscape.en-US.yml new file mode 100644 index 0000000000..3e5283beca --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Inkscape.Inkscape.en-US.yml @@ -0,0 +1,718 @@ +PackageName: Inkscape.Inkscape +Name: Inkscape +WindowFilter: "inkscape.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Tools + Properties: + - Name: Selector tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - S + - Name: Node tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - N + - Name: Rectangle tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - R + - Name: Ellipse / arc tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - E + - Name: Spiral tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - I + - Name: Pencil (Freehand) tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - P + - Name: Calligraphy 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: Dropper tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - D + - Name: Paint Bucket tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - U + - Name: Tweak tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - W + - Name: Spray tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - A + - Name: Eraser tool + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - E + - Name: Measure tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - M + - Name: Zoom tool + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Z + - SectionName: Dialogs + Properties: + - Name: Fill and Stroke + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F + - Name: Swatches + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - W + - Name: Text and Font + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - Name: Transform + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - Name: Layers and Objects + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - L + - Name: Symbols + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Y + - Name: Align and Distribute + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - A + - Name: Object Properties + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - O + - Name: Undo History + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - H + - Name: XML Editor + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - X + - Name: Selectors and CSS + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Q + - Name: Document Properties + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - D + - Name: Inkscape Preferences + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - P + - Name: Export + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - E + - Name: Find and Replace + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Toggle dialog visibility + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F12 + - SectionName: File + Properties: + - Name: New document + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Open from template + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - N + - Name: Open document + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - 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: Save a copy + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - S + - Name: Import + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Export + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - E + - Name: Print + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: Quit Inkscape + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Q + - SectionName: Window + Properties: + - Name: Toggle rulers + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - R + - Name: Toggle scrollbars + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Toggle palette + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - P + - Name: Toggle full-screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - Name: Toggle toolbars + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F11 + - Name: Main menu + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F10 + - Name: Context menu + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F10 + - Name: Close document window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F4 + - Name: Next document window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tab + - Name: Previous document window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Tab + - SectionName: Edit + Properties: + - Name: Undo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Y + - Name: Copy selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Cut selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Paste clipboard + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Paste in place + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - V + - Name: Paste style + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - V + - Name: Duplicate selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Duplicate and transform + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - D + - Name: Reapply transform + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - T + - Name: Clone object + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - D + - Name: Unlink clone + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - D + - Name: Select original + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - D + - SectionName: Layers + Properties: + - Name: Create new layer + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: Move to layer above + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - PageUp + - Name: Move to layer below + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - PageDown + - Name: Raise layer + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - PageUp + - Name: Lower layer + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - PageDown + - Name: Raise layer to top + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Home + - Name: Lower layer to bottom + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - End + - SectionName: Object + Properties: + - Name: Group selected objects + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Ungroup selected groups + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - G + - Name: Set clip + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - M + - Name: Release clip + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - M + - Name: Raise selection to top + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Home + - Name: Lower selection to bottom + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - End + - Name: Raise selection one step + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageUp + - Name: Lower selection one step + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageDown + - SectionName: Path + Properties: + - Name: Convert object to path + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - C + - Name: Convert stroke to path + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - C + - Name: Combine paths + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Name: Break paths apart + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - K + - Name: Simplify + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - L + - Name: Create dynamic offset + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Name: Create linked offset + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - J diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/JetBrains.IntelliJIDEA.Community.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/JetBrains.IntelliJIDEA.Community.en-US.yml new file mode 100644 index 0000000000..3b6861bea6 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/JetBrains.IntelliJIDEA.Community.en-US.yml @@ -0,0 +1,861 @@ +PackageName: JetBrains.IntelliJIDEA.Community +Name: IntelliJ IDEA +WindowFilter: "idea*.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Top shortcuts + Properties: + - Name: Find Action + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - A + - Name: Show Project window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 1 + - Name: Show Intention Actions + Recommended: true + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Recent Files + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - Name: Find Usages + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F7 + - Name: Settings + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - S + - Name: Generate + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Refactor This + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - T + - Name: Reformat Code + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - L + - Name: Build Project + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F9 + - Name: Rebuild + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F9 + - SectionName: Basic editing + Properties: + - Name: Cut + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Paste + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Paste from history + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - V + - Name: Save All + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - S + - Name: Undo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Z + - Name: Duplicate Line or Selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Delete Line + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Y + - Name: Join Lines + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - J + - Name: Toggle Case + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - U + - Name: Auto-Indent Lines + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - I + - Name: Start New Line + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Start New Line Before Current + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "" + - SectionName: Caret navigation and selection + Properties: + - Name: Move caret to previous word + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move caret to next word + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move caret to line start + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Home + - Name: Move caret to line end + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - End + - Name: Move caret to text start + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Home + - Name: Move caret to text end + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - End + - Name: Select all + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - Name: Extend selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Name: Shrink selection + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - W + - SectionName: Code completion and assistance + Properties: + - Name: Basic completion + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Type-matching completion + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Complete current statement + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Parameter info + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: Quick documentation + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Q + - Name: Move statement up + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Move statement down + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Move line up + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Move line down + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Comment with line comment + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Slash + - Name: Comment with block comment + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Slash + - Name: Surround with + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - T + - SectionName: Find everything + Properties: + - Name: Find + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Find Next + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F3 + - Name: Find Previous + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F3 + - Name: Replace + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - R + - Name: Find in Files + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F + - Name: Replace in Files + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - R + - Name: Go to File + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: File Structure + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F12 + - Name: Go to Symbol + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - N + - Name: Find Action + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - A + - SectionName: Navigate from symbols + Properties: + - Name: Find Usages + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F7 + - Name: Go to Declaration or Usages + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Go to Type Declaration + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - B + - Name: Go to Super Method + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Go to Implementation + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - B + - Name: Go to Test + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - Name: Highlight Usages in File + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F7 + - SectionName: Run and debug + Properties: + - Name: Run context configuration + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F10 + - Name: Run + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - F10 + - Name: Debug context configuration + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F9 + - Name: Debug + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - F9 + - Name: Stop + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F2 + - Name: Resume Program + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F9 + - Name: Step Over + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F8 + - Name: Step Into + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F7 + - Name: Step Out + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F8 + - Name: Run To Cursor + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F9 + - Name: Evaluate Expression + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F8 + - Name: Toggle Line Breakpoint + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F8 + - Name: View Breakpoints + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F8 + - SectionName: Refactorings + Properties: + - Name: Rename + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F6 + - Name: Change Signature + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F6 + - Name: Inline + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - N + - Name: Move + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F6 + - Name: Extract Method + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - M + - Name: Introduce Field + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - F + - Name: Introduce Parameter + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - P + - Name: Introduce Variable + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - V + - Name: Safe Delete + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - SectionName: Version control + Properties: + - Name: VCS Operations Popup + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Tilde + - Name: Commit + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Name: Update Project + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: Push + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - K + - Name: Rollback + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Z + - SectionName: Tool windows + Properties: + - Name: Hide Active Tool Window + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Hide All Tool Windows + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F12 + - Name: Jump to Last Tool Window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F12 + - Name: Show Project window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 1 + - Name: Show Bookmarks window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 2 + - Name: Show Find window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 3 + - Name: Show Run window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 4 + - Name: Show Debug window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 5 + - Name: Show Problems window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 6 + - Name: Show Structure window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 7 + - Name: Show Services window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 8 + - Name: Show Version Control window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 9 + - Name: Show Commit window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - 0 + - Name: Show Terminal window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F12 diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Access.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Access.en-US.yml new file mode 100644 index 0000000000..5382603a00 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Access.en-US.yml @@ -0,0 +1,272 @@ +PackageName: Microsoft.Access +Name: Access +WindowFilter: "msaccess.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Frequently used + Properties: + - Name: Open an existing database + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - Name: Create a new database + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Save a database object + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - S + - Name: Print the current or selected object + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: Show or hide the Navigation Pane + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - Name: Show or hide a property sheet + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F4 + - Name: Move focus to a different pane of the window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F6 + - Name: Switch between Edit and Navigation mode + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F2 + - Name: Open Find tab + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Open Help + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F1 + - Name: Exit Access + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F4 + - Name: Display shortcut menu for selected item + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F10 + - Name: Switch to Form View from Design View + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F5 + - Name: Open the Save As dialog + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F12 + - SectionName: Edit text and data + Properties: + - Name: Copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Cut + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Paste + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Undo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Select all + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - SectionName: Navigate databases + Properties: + - Name: Switch to next database window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F6 + - Name: Switch to previous database window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F6 + - Name: Close the active database window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Name: Switch to Visual Basic Editor + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F11 + - Name: Display the Immediate window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - SectionName: Datasheet navigation + Properties: + - Name: Move to next field + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Tab + - Name: Move to previous field + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Tab + - Name: Move to first field in current record + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Home + - Name: Move to last field in current record + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - End + - Name: Move to first record + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Home + - Name: Move to last record + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - End + - Name: Move to same field in next record + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move to same field in previous record + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Edge.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Edge.en-US.yml new file mode 100644 index 0000000000..d8e3124c81 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Edge.en-US.yml @@ -0,0 +1,616 @@ +PackageName: Microsoft.Edge +Name: Microsoft Edge +WindowFilter: "msedge.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Tabs and windows + Properties: + - Name: New tab + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: Reopen the last closed tab + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - Name: Switch to the next tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tab + - Name: Switch to the previous tab + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Tab + - Name: Switch to a specific tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 1 + - Name: Switch to the last tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 9 + - Name: Close the current tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Name: Close the current tab (alt) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F4 + - Name: Close the current window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - W + - Name: Close the current window (alt) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F4 + - Name: New window + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: New InPrivate window + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: Duplicate the current tab + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - K + - Name: Mute the current tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - M + - Name: Switch to the next tab (alt) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageDown + - Name: Switch to the previous tab (alt) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageUp + - Name: Enter full screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - SectionName: Address bar + Properties: + - Name: Select the URL in the address bar + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - L + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - D + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F4 + - Name: Open a search query in the address bar + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Name: Add www. and .com to text in the address bar + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Paste and search or paste and go + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - L + - SectionName: Browser features + Properties: + - Name: Open Settings and more menu + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - E + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F + - Name: Open History + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - H + - Name: Open Downloads + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Name: Open Favorites + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - O + - Name: Open Collections + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Y + - Name: Open search in sidebar + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - E + - Name: Show or hide the favorites bar + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - B + - Name: Save the current tab as a favorite + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Save all open tabs as favorites in a new folder + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - D + - Name: Open Developer Tools + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - I + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F12 + - Name: Open Send feedback dialog + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - I + - Name: Sign in as different user / browse as guest + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - Name: Open clear browsing data options + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Open Help + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F1 + - Name: Turn caret browsing on or off + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F7 + - Name: Enter or exit Immersive Reader + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F9 + - SectionName: Web page + Properties: + - Name: Open find on page + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F3 + - Name: Find next result + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Find previous result + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - G + - Name: Reload the current page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - R + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F5 + - Name: "Reload, ignoring cached content" + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - R + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F5 + - Name: Save the current page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - S + - Name: Print the current page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: Print using the system dialog + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - P + - Name: Open a file in Edge + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - Name: View source + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Start or stop Read Aloud + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - U + - Name: Paste without formatting + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - V + - Name: Zoom in + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Plus + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Minus + - Name: Reset page zoom level + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 0 + - Name: Stop loading page; close dialog or pop-up + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Scroll down a screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageDown + - Name: Scroll up a screen + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageUp + - Name: Go to top of page + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Home + - Name: Go to bottom of page + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - End + - Name: Go back + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Go forward + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Open home page in current tab + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Home + - SectionName: Focus + Properties: + - Name: Move focus to next pane + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F6 + - Name: Move focus to previous pane + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F6 + - Name: Move focus to web content pane + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F6 + - Name: Set focus on the favorites bar (first item) + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - B + - Name: Set focus on the app bar toolbar (first item) + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - T + - Name: Set focus on Settings and more button + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F10 + - Name: Open context menu + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F10 diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Excel.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Excel.en-US.yml new file mode 100644 index 0000000000..fd37da7c89 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Excel.en-US.yml @@ -0,0 +1,592 @@ +PackageName: Microsoft.Excel +Name: Excel +WindowFilter: "excel.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Frequently used + Properties: + - Name: Open workbook + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - Name: Save workbook + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - S + - Name: Close workbook + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Name: Cut + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Paste + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Paste Special + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - V + - Name: Undo + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo or repeat last action + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Y + - Name: Remove cell contents + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Delete + - Name: Find + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Find and replace + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - H + - Name: Print + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - SectionName: Navigation + Properties: + - Name: Move to edge of data region + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move to beginning of worksheet + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Home + - Name: Move to last used cell + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - End + - Name: Next worksheet + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageDown + - Name: Previous worksheet + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageUp + - Name: One screen to the right + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - PageDown + - Name: One screen to the left + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - PageUp + - Name: Open Go To dialog + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Zoom in + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Plus + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Minus + - SectionName: Selection + Properties: + - Name: Select entire worksheet + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - Name: Extend selection by one cell + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Extend selection to last nonblank cell + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Extend selection to start of worksheet + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Home + - Name: Extend selection to last used cell + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - End + - Name: Select entire column + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Space + - Name: Select entire row + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Space + - Name: Turn extend mode on + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F8 + - Name: Start a new line in the same cell + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Fill selected range with current entry + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - SectionName: Cell formatting + Properties: + - Name: Open Format Cells dialog + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "1" + - Name: Bold + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Italic + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Underline + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Strikethrough + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "5" + - Name: Apply General number format + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "~" + - Name: Apply Currency format + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "$" + - Name: Apply Percentage format + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "%" + - Name: Apply Date format + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "#" + - Name: Apply Time format + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "@" + - Name: Apply Number format + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "!" + - Name: Apply outline border + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "&" + - Name: Remove outline border + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "_" + - SectionName: Data entry and editing + Properties: + - Name: Edit active cell + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F2 + - Name: Fill down + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Enter current date + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - ";" + - Name: Enter current time + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - ":" + - Name: Toggle formula display + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "`" + - Name: Copy formula from cell above + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "'" + - Name: Insert blank cells + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Plus + - Name: Delete selected cells + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Minus + - Name: Insert hyperlink + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Name: Flash Fill + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - Name: Quick Analysis + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Q + - Name: Create Table + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: Hide selected rows + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "9" + - Name: Hide selected columns + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "0" + - SectionName: Formulas and functions + Properties: + - Name: AutoSum + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "=" + - Name: Insert function + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F3 + - Name: Calculate all worksheets + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F9 + - Name: Calculate active worksheet + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F9 + - Name: Cycle absolute and relative references + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F4 + - Name: Create embedded chart + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F1 + - Name: Create chart on new sheet + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - Name: Open macro dialog + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F8 + - Name: Open Visual Basic Editor + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F11 + - Name: Refresh data in current worksheet + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F5 + - Name: Refresh all data in workbook + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - F5 diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.OneNote.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.OneNote.en-US.yml new file mode 100644 index 0000000000..623f919552 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.OneNote.en-US.yml @@ -0,0 +1,463 @@ +PackageName: Microsoft.OneNote +Name: OneNote +WindowFilter: "onenote.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Frequently used + Properties: + - Name: Open notebook + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - Name: Open a new OneNote window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - M + - Name: Create a Quick Note + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - Name: Dock the OneNote window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - D + - Name: Undo + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Y + - Name: Select all on page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - Name: Cut + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Paste + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Paste text only + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - V + - Name: Check spelling + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F7 + - Name: Print current page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - SectionName: Format + Properties: + - Name: Bold + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Italic + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Underline + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Strikethrough + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Minus + - Name: Superscript + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Plus + - Name: Subscript + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Minus + - Name: Highlight selected text + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - H + - Name: Insert hyperlink + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Name: Bulleted list + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "." + - Name: Numbered list + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "/" + - Name: Apply Heading 1 + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "1" + - Name: Apply Heading 2 + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "2" + - Name: Apply Heading 3 + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "3" + - Name: Clear all formatting + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: Align left + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - L + - Name: Align right + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - R + - Name: Copy formatting + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - C + - Name: Paste formatting + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - V + - SectionName: Insert + Properties: + - Name: Insert current date + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - D + - Name: Insert current time + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - T + - Name: Insert current date and time + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - F + - Name: Start math equation + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "=" + - Name: Insert line break + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - SectionName: Tags + Properties: + - Name: To Do tag + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "1" + - Name: Important tag + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "2" + - Name: Question tag + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "3" + - Name: Remember for later tag + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "4" + - Name: Definition tag + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "5" + - Name: Remove all note tags + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "0" + - SectionName: Pages and sections + Properties: + - Name: Add a new page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Create a new section + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: Go to next section + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tab + - Name: Go to previous section + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Tab + - Name: Next page in section + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageDown + - Name: Previous page in section + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageUp + - Name: First page in section + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Home + - Name: Last page in section + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - End + - Name: Enable or disable full page view + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - Name: Zoom in + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Plus + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Minus + - SectionName: Search + Properties: + - Name: Search all notebooks + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - Name: Search current page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Outlook.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Outlook.en-US.yml new file mode 100644 index 0000000000..1b875ef425 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Outlook.en-US.yml @@ -0,0 +1,360 @@ +PackageName: Microsoft.Outlook +Name: Outlook +WindowFilter: "outlook.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Frequently used + Properties: + - Name: Create new message or calendar event + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Send email + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Reply to email + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - R + - Name: Reply all + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - R + - Name: Forward message + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Open selected message in new window + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Delete message or item + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Delete + - Name: Permanently delete message + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Delete + - Name: Mark as read + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Q + - Name: Mark as unread + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Flag message + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Insert + - Name: Send and receive all folders + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F9 + - SectionName: Navigate Outlook + Properties: + - Name: Go to Mail + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "1" + - Name: Go to Calendar + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "2" + - Name: Go to Contacts or Copilot + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "3" + - Name: Go to People + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "4" + - Name: Go to next message + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - ">" + - Name: Go to previous message + Description: Press Ctrl+Shift+Comma (rendered as Ctrl+<) to go back. + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "," + - Name: Go to Folder pane + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Y + - SectionName: Text editing + Properties: + - Name: Cut + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Paste + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Undo + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Y + - Name: Insert hyperlink + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Name: Delete word to the left + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - SectionName: Format text + Properties: + - Name: Bold + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Italic + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Underline + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - SectionName: Calendar + Properties: + - Name: Create new calendar item + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Switch to Day view + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "1" + - Name: Switch to Work week view + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "2" + - Name: Switch to full Week view + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "3" + - Name: Switch to Month view + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "4" + - Name: Go to previous time period + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "" + - Name: Go to next time period + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "" + - Name: Go to today + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Y + - SectionName: People + Properties: + - Name: Create a contact + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Search for a contact + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - Name: Save contact + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - S + - Name: Select all contacts + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - Name: Create a contact list + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - L diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Paint.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Paint.en-US.yml new file mode 100644 index 0000000000..f66dd4b5da --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Paint.en-US.yml @@ -0,0 +1,247 @@ +PackageName: Microsoft.Paint +Name: Paint +WindowFilter: "mspaint.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: File + Properties: + - Name: New picture + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Open + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - 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: Print + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - SectionName: Edit + Properties: + - Name: Undo + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Y + - Name: Cut + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Paste + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Select all + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - Name: Delete selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Delete + - Name: Move selection + Description: Use the arrow keys to nudge the current selection one pixel. + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - SectionName: View + Properties: + - Name: Zoom in + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageUp + - Name: Zoom out + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageDown + - Name: Show or hide gridlines + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Show or hide rulers + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - R + - Name: Full screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - SectionName: Image + Properties: + - Name: Image properties + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - Name: Resize and skew + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Name: Crop to selection + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - X + - Name: Invert colors + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - I + - SectionName: Tools + Properties: + - Name: Increase brush or tool width + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Plus + - Name: Decrease brush or tool width + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Minus + - Name: Text tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - SectionName: Text tool + Properties: + - Name: Bold + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Italic + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Underline + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.PowerPoint.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.PowerPoint.en-US.yml new file mode 100644 index 0000000000..200fbd6a40 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.PowerPoint.en-US.yml @@ -0,0 +1,668 @@ +PackageName: Microsoft.PowerPoint +Name: PowerPoint +WindowFilter: "powerpnt.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Frequently used + Properties: + - Name: New presentation + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Open presentation + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - 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: Print + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: Cut + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Paste + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Paste Special + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - V + - Name: Undo + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Y + - Name: Insert hyperlink + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Name: Insert new comment + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - M + - Name: Close PowerPoint + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Q + - SectionName: Slides + Properties: + - Name: Insert new slide + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - M + - Name: Duplicate selected slide + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - D + - Name: Next slide + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageDown + - Name: Previous slide + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageUp + - Name: Move slide up in order + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move slide down in order + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move slide to beginning + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Move slide to end + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - SectionName: Slide show and view + Properties: + - Name: Start slide show + Recommended: true + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F5 + - Name: Start Presenter view + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F5 + - Name: End slide show + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Zoom in + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Plus + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Minus + - Name: Zoom to fit + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - O + - Name: Full screen + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F1 + - Name: Show or hide guides + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F9 + - Name: Show or hide grid + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F9 + - Name: Toggle Outline and Thumbnail views + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Tab + - Name: Cycle through panes + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F6 + - SectionName: Objects + Properties: + - Name: Select all objects + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - Name: Duplicate selected object + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Group selected objects + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Ungroup selected group + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - G + - Name: Regroup objects + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - J + - Name: Send object back one position + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "[" + - Name: Send object forward one position + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "]" + - Name: Rotate object clockwise 15 degrees + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Rotate object counterclockwise 15 degrees + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Copy object formatting + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - C + - Name: Paste object formatting + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - V + - Name: Copy animation painter + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - C + - Name: Paste animation painter + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - V + - Name: Play or pause media + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Space + - SectionName: Text editing + Properties: + - Name: Find + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Replace + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - H + - Name: Delete word to the left + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Delete word to the right + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Delete + - Name: Move one word left + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move one word right + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move up one paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move down one paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Beginning of text box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Home + - Name: End of text box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - End + - Name: Select to end of word + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Select to beginning of word + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Select to end of paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Select to beginning of paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - SectionName: Text formatting + Properties: + - Name: Bold + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Italic + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Underline + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Open Font dialog + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: Change case + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F3 + - Name: Subscript + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "=" + - Name: Superscript + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Plus + - Name: Remove manual character formatting + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Space + - Name: Center paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - Name: Justify paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Name: Left align paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - L + - Name: Right align paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - R + - Name: Promote paragraph + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Demote paragraph + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Move paragraph up + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Move paragraph down + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - SectionName: Tables + Properties: + - Name: Move to next cell + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Tab + - Name: Move to preceding cell + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Tab + - Name: Insert tab in a cell + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tab diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.PowerToys.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.PowerToys.en-US.yml new file mode 100644 index 0000000000..c768b4bb5e --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.PowerToys.en-US.yml @@ -0,0 +1,9 @@ +PackageName: Microsoft.PowerToys +Name: PowerToys +BackgroundProcess: True +WindowFilter: "powertoys.exe" +Shortcuts: + - SectionName: General + Properties: +# +# \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Project.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Project.en-US.yml new file mode 100644 index 0000000000..fb5a38b205 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Project.en-US.yml @@ -0,0 +1,379 @@ +PackageName: Microsoft.Project +Name: Project +WindowFilter: "winproj.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Frequently used + Properties: + - Name: Create a new project + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Open a project file + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - Name: Save a project file + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - S + - Name: Open dialog box (direct) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F12 + - Name: Activate the entry bar + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F2 + - Name: Activate the menu bar + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F10 + - Name: Close the program window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F4 + - Name: Display all filtered tasks or resources + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F3 + - Name: Reset sort order and turn off grouping + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F3 + - Name: Open a new window + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F11 + - Name: Display task or resource information + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F2 + - Name: Turn Auto Calculate on or off + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F9 + - Name: Turn Extend Selection mode on or off + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F8 + - SectionName: Edit in a view + Properties: + - Name: Copy selected data + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Cut selected data + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Paste data + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Undo + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Fill down a column + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Find + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Go To + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F5 + - Name: Link tasks + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F2 + - Name: Unlink tasks + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F2 + - Name: Clear or reset selected field + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Delete + - Name: Set task to manually schedule + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - Name: Set task to auto schedule + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - A + - Name: Cancel an entry + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - SectionName: Outline a project + Properties: + - Name: Indent the selected task + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Remove a task indent + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Move selected task up + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Move selected task down + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Hide subtasks + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Minus + - Name: Show subtasks + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "=" + - SectionName: Timescale navigation + Properties: + - Name: Move timescale to beginning of project + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Home + - Name: Move timescale to end of project + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - End + - Name: Scroll timescale left + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Scroll timescale right + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Move timescale left one page + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - PageUp + - Name: Move timescale right one page + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - PageDown + - SectionName: Select in a sheet view + Properties: + - Name: Move to first field in row + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Home + - Name: Move to last field in row + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - End + - Name: Move to first field of first row + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Home + - Name: Move to last field of last row + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - End + - Name: Select a column + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Space + - Name: Select a row + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Space + - Name: Select all rows and columns + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Space diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Publisher.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Publisher.en-US.yml new file mode 100644 index 0000000000..45b7ee2e04 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Publisher.en-US.yml @@ -0,0 +1,419 @@ +PackageName: Microsoft.Publisher +Name: Publisher +WindowFilter: "mspub.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Frequently used + Properties: + - Name: Open a new instance of Publisher + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Open a publication + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - Name: Close the current publication + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Name: Save (Save As) + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - S + - Name: Print + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: Find text + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Replace text + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - H + - Name: Check spelling + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F7 + - Name: Select all + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - SectionName: Edit text + Properties: + - Name: Copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Cut + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Paste + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Undo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Y + - Name: Copy formatting + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - C + - Name: Paste formatting + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - V + - SectionName: Format text + Properties: + - Name: Bold + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Italic + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Underline + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Small capitals + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - K + - Name: Open Font dialog + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F + - Name: Subscript + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "=" + - Name: Superscript + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "=" + - Name: Increase kerning + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "]" + - Name: Decrease kerning + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "[" + - Name: Increase font size by 1 point + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "]" + - Name: Decrease font size by 1 point + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "[" + - Name: Center paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - Name: Align paragraph left + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - L + - Name: Align paragraph right + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - R + - Name: Justify paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Name: Distribute paragraph evenly + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - D + - Name: Insert current date + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - D + - Name: Insert current time + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - T + - Name: Insert current page number + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - P + - SectionName: Objects and layers + Properties: + - Name: Group or ungroup selected objects + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - G + - Name: Bring object to front + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F6 + - Name: Send object to back + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - F6 + - Name: Nudge selected object + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Nudge object in small increments + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Insert hyperlink + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - SectionName: Pages and view + Properties: + - Name: Go to page + Recommended: true + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F5 + - Name: Next page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageDown + - Name: Previous page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageUp + - Name: Insert new page or two-page spread + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: Insert duplicate page + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - U + - Name: Switch between current page and master page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - M + - Name: Toggle boundaries + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - O + - Name: Switch between current view and actual size + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F9 + - Name: Zoom to full page view + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - L diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Teams.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Teams.en-US.yml new file mode 100644 index 0000000000..1533b91163 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Teams.en-US.yml @@ -0,0 +1,452 @@ +PackageName: Microsoft.Teams +Name: Teams +WindowFilter: "ms-teams.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: General + Properties: + - Name: Show keyboard shortcuts + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "." + - Name: Go to Search + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - Name: Open filter + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F + - Name: Start a new chat + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Start a chat in a new window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: Open Settings + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "," + - Name: Open Help + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F1 + - Name: Close + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Zoom in + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "=" + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Minus + - Name: Reset zoom level + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "0" + - Name: Go to a specific chat or channel + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Pin a window on top + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - SectionName: Navigation + Properties: + - Name: Open 1st app on app bar + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "1" + - Name: Open 2nd app on app bar + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "2" + - Name: Open 3rd app on app bar + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "3" + - Name: Move focus to chat or channel list + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - L + - Name: Move focus to message pane + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - M + - Name: Go to compose box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - R + - Name: Go to previous section + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F6 + - Name: Go to next section + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F6 + - Name: Go back + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Go forward + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - SectionName: Messaging + Properties: + - Name: Mark all as read + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Jump to last read or newest message + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Name: Find in current chat or channel + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Reply to the last message + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - R + - Name: React to the last message + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - R + - SectionName: Compose + Properties: + - Name: Expand compose box + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - X + - Name: Send message + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Start new line + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Bold + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Italic + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Underline + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Strikethrough + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - X + - Name: Insert link + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Name: Insert inline code + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - C + - Name: Insert code block + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - B + - Name: Mark message as important + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - I + - Name: Apply Heading 1 + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "1" + - Name: Apply Heading 2 + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "2" + - Name: Apply Heading 3 + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "3" + - Name: Attach file + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - O + - SectionName: Meetings and calls + Properties: + - Name: Toggle mute + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - Name: Temporarily unmute + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Space + - Name: Raise or lower your hand + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - K + - Name: Toggle video + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - O + - Name: Accept video call + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - A + - Name: Accept audio call + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - S + - Name: Decline call + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - D + - Name: Start audio call + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - A + - Name: Start video call + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - V + - Name: End call + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - H + - Name: Schedule a meeting + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - N diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Visio.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Visio.en-US.yml new file mode 100644 index 0000000000..424aa59e87 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Visio.en-US.yml @@ -0,0 +1,427 @@ +PackageName: Microsoft.Visio +Name: Visio +WindowFilter: "visio.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Frequently used + Properties: + - Name: Enter full-screen view + Recommended: true + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F5 + - Name: Exit full-screen view + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Open the Home tab on the ribbon + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - H + - Name: Open the Text dialog box + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - Name: Open the Format Shape task pane + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F3 + - Name: Select Pointer Tool + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "1" + - Name: Select Text tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "2" + - Name: Select Connector tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "3" + - Name: Select text block tool + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "4" + - SectionName: Navigate + Properties: + - Name: Next page in the drawing + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageDown + - Name: Previous page in the drawing + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageUp + - Name: Cycle through open drawings + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tab + - Name: Cycle through open drawings in reverse + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Tab + - Name: Cycle focus through pages + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageDown + - Name: Cycle focus through pages in reverse + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageUp + - SectionName: Format text + Properties: + - Name: Bold + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Italic + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Underline + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Double underline + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - D + - Name: All caps + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - A + - Name: Small caps + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - K + - Name: Subscript + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "=" + - Name: Superscript + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "=" + - Name: Align text left + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - L + - Name: Center text horizontally + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - C + - Name: Align text right + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - R + - Name: Justify text + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - J + - Name: Top-align text vertically + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - Name: Center text vertically + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - Name: Bottom-align text vertically + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - V + - Name: Select all text in a text block + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - SectionName: Shapes + Properties: + - Name: Group selected shapes + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Ungroup shapes + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - U + - Name: Bring shape to front + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F + - Name: Send shape to back + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - B + - Name: Rotate shape left + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - L + - Name: Rotate shape right + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - R + - Name: Flip shape horizontally + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - H + - Name: Flip shape vertically + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Name: Open Align Shapes dialog + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F8 + - Name: Nudge one pixel + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - SectionName: Tools and zoom + Properties: + - Name: Toggle Format Painter + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - P + - Name: Select rectangle tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "8" + - Name: Select ellipse tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "9" + - Name: Select line tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "6" + - Name: Select arc tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "7" + - Name: Select freeform tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "5" + - Name: Select pencil tool + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "4" + - Name: Zoom in + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F6 + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - F6 + - Name: Fit view to window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - W diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.VisualStudioCode.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.VisualStudioCode.en-US.yml new file mode 100644 index 0000000000..5f695e6abe --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.VisualStudioCode.en-US.yml @@ -0,0 +1,803 @@ +PackageName: Microsoft.VisualStudioCode +Name: Visual Studio Code +WindowFilter: "code.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: General + Properties: + - Name: Show All Commands (Command Palette) + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - P + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F1 + - Name: Quick Open / Go to File + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: New Window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: Close Window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F4 + - Name: Open Settings + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Comma + - Name: Open Keyboard Shortcuts + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - S + - Name: Toggle Full Screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - Name: Toggle Zen Mode + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Z + - Name: Zoom in + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Plus + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Minus + - SectionName: Basic editing + Properties: + - Name: Cut line (empty selection) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Copy line (empty selection) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Paste + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Delete Line + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - K + - Name: Insert Line Below + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Insert Line Above + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Move Line Down + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Move Line Up + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Copy Line Down + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Copy Line Up + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Undo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Y + - Name: Add Selection To Next Find Match + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Select all occurrences of current selection + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - L + - Name: Insert Cursor Below + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "" + - Name: Insert Cursor Above + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "" + - Name: Toggle Line Comment + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Slash + - Name: Toggle Block Comment + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - A + - Name: Indent Line + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - RightBracket + - Name: Outdent Line + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - LeftBracket + - Name: Find + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Replace + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - H + - Name: Find Next + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F3 + - Name: Find Previous + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F3 + - Name: Toggle Word Wrap + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Z + - SectionName: Rich languages editing + Properties: + - Name: Trigger Suggest + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Trigger Parameter Hints + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Format Document + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - F + - Name: Format Selection + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Go to Definition + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F12 + - Name: Show Hover + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Peek Definition + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F12 + - Name: Quick Fix + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Period + - Name: Go to References + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F12 + - Name: Rename Symbol + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F2 + - SectionName: Navigation + Properties: + - Name: Show All Symbols + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: Go to Line + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Go to Symbol + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - O + - Name: Show Problems + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - Name: Go to Next Error or Warning + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F8 + - Name: Go to Previous Error or Warning + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F8 + - Name: Go Back + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Go Forward + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - SectionName: Editor and window management + Properties: + - Name: Close Editor + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F4 + - Name: Split Editor + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Backslash + - Name: Focus into First Editor Group + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 1 + - Name: Focus into Second Editor Group + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 2 + - Name: Focus into Third Editor Group + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 3 + - Name: Move Editor Left + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - PageUp + - Name: Move Editor Right + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - PageDown + - SectionName: File management + Properties: + - Name: New File + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Open File + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - 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: Close + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Name: Close All + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Name: Reopen Closed Editor + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - SectionName: Display + Properties: + - Name: Toggle Sidebar Visibility + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Show Explorer / Toggle Focus + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - E + - Name: Show Search + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F + - Name: Show Source Control + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - G + - Name: Show Run + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - D + - Name: Show Extensions + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - X + - Name: Show Output + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - U + - Name: Toggle Markdown Preview + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - V + - Name: Toggle Integrated Terminal + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tilde + - SectionName: Search + Properties: + - Name: Replace in Files + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - H + - Name: Toggle Search Details + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - J + - Name: Focus Next Search Result + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F4 + - Name: Focus Previous Search Result + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F4 + - SectionName: Chat and AI + Properties: + - Name: Open Chat view + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - I + - Name: Open chat in agent mode + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - I + - Name: Open editor inline chat + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Open quick chat + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - L + - Name: New chat session + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Accept inline suggestion + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Tab + - SectionName: Debug + Properties: + - Name: Toggle Breakpoint + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F9 + - Name: Start / Continue + Recommended: true + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F5 + - Name: Start without debugging + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F5 + - Name: Pause + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F6 + - Name: Step Into + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - SectionName: Tasks + Properties: + - Name: Run Build Task + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - B diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.WindowsTerminal.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.WindowsTerminal.en-US.yml new file mode 100644 index 0000000000..bb760c974d --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.WindowsTerminal.en-US.yml @@ -0,0 +1,449 @@ +PackageName: Microsoft.WindowsTerminal +Name: Windows Terminal +WindowFilter: "WindowsTerminal.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Application + Properties: + - Name: Close window + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F4 + - Name: Toggle full-screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - Name: Open new tab dropdown + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Space + - Name: Open settings UI + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "," + - Name: Open settings JSON file + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "," + - Name: Open default settings file + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "," + - Name: Find text + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F + - Name: Toggle command palette + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - P + - Name: Quake mode (drop-down window) + Shortcut: + - Win: true + Ctrl: false + Shift: false + Alt: false + Keys: + - "`" + - Name: Open system menu + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Space + - Name: Show command suggestions + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "." + - SectionName: Tab management + Properties: + - Name: Open new tab + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - Name: Open new window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: Duplicate current tab + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - D + - Name: Next tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tab + - Name: Previous tab + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Tab + - Name: Open new tab with profile 1 + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "1" + - Name: Open new tab with profile 2 + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "2" + - Name: Open new tab with profile 3 + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "3" + - Name: Open new tab with profile 4 + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "4" + - Name: Open new tab with profile 5 + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "5" + - Name: Switch to tab 1 + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "1" + - Name: Switch to tab 2 + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "2" + - Name: Switch to tab 3 + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "3" + - Name: Switch to last tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "9" + - SectionName: Pane management + Properties: + - Name: Close current pane + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - W + - Name: Duplicate pane (horizontal split) + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Minus + - Name: Duplicate pane (vertical split) + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - Plus + - Name: Resize pane down + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Resize pane up + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Resize pane left + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Resize pane right + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Move focus down + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Move focus up + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Move focus left + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Move focus right + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Move focus to previous pane + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "" + - SectionName: Clipboard and selection + Properties: + - Name: Copy to clipboard + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - C + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Insert + - Name: Paste from clipboard + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - V + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Insert + - Name: Select all + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - A + - Name: Toggle mark mode (keyboard selection) + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - SectionName: Scrollback + Properties: + - Name: Scroll down one line + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Scroll up one line + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Scroll down one page + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - PageDown + - Name: Scroll up one page + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - PageUp + - Name: Scroll to top + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Home + - Name: Scroll to bottom + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - End + - Name: Clear buffer + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - K + - SectionName: Font size + Properties: + - Name: Increase font size + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Plus + - Name: Decrease font size + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Minus + - Name: Reset font size + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "0" diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Word.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Word.en-US.yml new file mode 100644 index 0000000000..e399073c13 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Microsoft.Word.en-US.yml @@ -0,0 +1,738 @@ +PackageName: Microsoft.Word +Name: Word +WindowFilter: "winword.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Frequently used + Properties: + - Name: New document + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Open + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - Name: Save + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - S + - Name: Close document + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Name: Print + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: Cut + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Paste + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Paste text only + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - V + - Name: Select all + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - Name: Undo + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Y + - Name: Cancel a command + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - SectionName: Editing + Properties: + - Name: Delete one word to the left + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Delete one word to the right + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Delete + - Name: Find + Recommended: true + Description: Display the Navigation task pane to search the document. + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Find and replace + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - H + - Name: Go to + Description: Navigate to a specific page, bookmark, footnote, table, comment, graphic, or other location. + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Copy formatting + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - C + - Name: Paste formatting + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - V + - SectionName: Navigation + Properties: + - Name: Move one word to the left + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move one word to the right + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move up one paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move down one paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Beginning of document + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Home + - Name: End of document + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - End + - Name: Top of next page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageDown + - Name: Top of previous page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageUp + - Name: Previous revision + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F5 + - SectionName: Selection + Properties: + - Name: Select word to the left + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Select word to the right + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Select to beginning of line + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Home + - Name: Select to end of line + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - End + - Name: Select to beginning of paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Select to end of paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Select to beginning of document + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Home + - Name: Select to end of document + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - End + - Name: Start extending the selection + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F8 + - SectionName: Character formatting + Properties: + - Name: Bold + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Italic + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Underline + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Double underline + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - D + - Name: All uppercase + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - A + - Name: Change case + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F3 + - Name: Font dialog box + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Increase font size by 1 point + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "]" + - Name: Decrease font size by 1 point + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "[" + - Name: Subscript + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Minus + - Name: Superscript + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Plus + - Name: Remove manual character formatting + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Space + - SectionName: Paragraph formatting + Properties: + - Name: Center + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - Name: Align left + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - L + - Name: Align right + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - R + - Name: Justify + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Name: Increase indent + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - M + - Name: Decrease indent + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - Name: Hanging indent + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: Remove paragraph formatting + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Q + - Name: Apply Normal style + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: Single line spacing + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "1" + - Name: Double line spacing + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "2" + - Name: 1.5 line spacing + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "5" + - Name: Apply Heading 1 + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "1" + - Name: Apply Heading 2 + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "2" + - Name: Apply Heading 3 + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "3" + - SectionName: View and zoom + Properties: + - Name: Zoom in + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Plus + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Minus + - Name: Reset zoom to 100% + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "0" + - Name: Split the document window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - S + - Name: Print preview + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - I + - Name: Show or hide nonprinting characters + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "8" + - SectionName: Insert + Properties: + - Name: Insert hyperlink + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Name: Insert page break + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Insert line break + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Insert column break + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Insert non-breaking space + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Space + - Name: Insert footnote + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - F + - Name: Insert endnote + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - D + - SectionName: Review + Properties: + - Name: Insert comment + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - M + - Name: Turn Track Changes on or off + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - E + - Name: Close the Reviewing pane + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - C + - SectionName: Tables + Properties: + - Name: Move to next cell + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Tab + - Name: Move to previous cell + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Tab + - Name: First cell in the row + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Home + - Name: Last cell in the row + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - End + - Name: First cell in the column + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - PageUp + - Name: Last cell in the column + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - PageDown + - Name: Insert tab character in a cell + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tab diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Mozilla.Firefox.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Mozilla.Firefox.en-US.yml new file mode 100644 index 0000000000..6742ab4766 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Mozilla.Firefox.en-US.yml @@ -0,0 +1,819 @@ +PackageName: Mozilla.Firefox +Name: Firefox +WindowFilter: "firefox.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Navigation + Properties: + - Name: Back + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - LeftBracket + - Name: Forward + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - RightBracket + - Name: Home + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - Home + - Name: Open file + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - Name: Reload + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F5 + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - R + - Name: Reload (override cache) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F5 + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - R + - Name: Stop + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - SectionName: Current page + Properties: + - Name: Focus next link or input field + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Tab + - Name: Focus previous link or input field + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - Tab + - Name: Go down a screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageDown + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Go up a screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - PageUp + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Go to bottom of page + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - End + - Name: Go to top of page + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Home + - Name: Move to next frame or pop-up + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F6 + - Name: Move to previous frame or pop-up + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F6 + - Name: Print + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - P + - Name: Save page as + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - S + - Name: Zoom in + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Plus + - Name: Zoom out + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Minus + - Name: Reset zoom + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 0 + - SectionName: Editing + Properties: + - Name: Copy + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - C + - Name: Cut + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - X + - Name: Delete + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Delete word to the left + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Delete word to the right + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move one word left + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Move one word right + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Name: Paste + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - V + - Name: Paste as plain text + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - V + - Name: Redo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Y + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Z + - Name: Select all + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - A + - Name: Undo + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - SectionName: Search + Properties: + - Name: Find in this page + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Find again + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F3 + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Find previous + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F3 + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - G + - Name: Quick find within link text + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Quote + - Name: Quick find + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - Slash + - Name: Close find bar + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Focus address bar + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - L + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - D + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F6 + - Name: Focus search bar + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - E + - SectionName: Windows and tabs + Properties: + - Name: Close tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F4 + - Name: Close window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - W + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - F4 + - Name: Cycle through tabs in recently used order + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tab + - Name: Quit + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Q + - Name: Go one tab to the left + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageUp + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Tab + - Name: Go one tab to the right + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageDown + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tab + - Name: Go to tab 1–8 + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 1 + - Name: Go to last tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - 9 + - Name: Move tab left + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - PageUp + - Name: Move tab right + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - PageDown + - Name: Move tab to start + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Home + - Name: Move tab to end + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - End + - Name: Mute or unmute audio + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - M + - Name: New tab + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: New window + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: New private window + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - P + - Name: Reopen last closed tab + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - Name: Reopen last closed window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - SectionName: History and bookmarks + Properties: + - Name: History sidebar + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - H + - Name: Library window (History) + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - H + - Name: Clear recent history + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Bookmark this page + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - D + - Name: Bookmark all tabs + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - D + - Name: Bookmarks sidebar + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Show or hide the bookmarks toolbar + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - B + - Name: Show all bookmarks (Library window) + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - O + - SectionName: Tools + Properties: + - Name: Downloads + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Y + - Name: Add-ons + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - A + - Name: Toggle developer tools + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F12 + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - I + - Name: Web Console + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - K + - Name: Inspector + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - C + - Name: Take a screenshot + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - S + - Name: Style Editor + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F7 + - Name: Task Manager + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Profiler + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F5 + - Name: Network + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - E + - Name: Responsive Design View + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - Name: Page source + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Browser Console + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - J + - Name: Page info + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - SectionName: Miscellaneous + Properties: + - Name: Toggle full screen + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - Name: Toggle reader mode + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - R + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F9 + - Name: Caret browsing + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F7 + - Name: Toggle context menu + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F10 + - Name: Expand or collapse vertical tabs + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Z diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/SlackTechnologies.Slack.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/SlackTechnologies.Slack.en-US.yml new file mode 100644 index 0000000000..1cdecbc2d7 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/SlackTechnologies.Slack.en-US.yml @@ -0,0 +1,740 @@ +PackageName: SlackTechnologies.Slack +Name: Slack +WindowFilter: "slack.exe" +BackgroundProcess: false +Shortcuts: + - SectionName: Slack basics + Properties: + - Name: Compose a new message + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - K + - Name: Compose a new message (alt) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - N + - Name: Unsend a message + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Set your status + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Y + - Name: Open your preferences + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Comma + - Name: Hide the right sidebar + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Period + - Name: Create a new canvas + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: Upload a file + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - Name: View all downloaded files + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - J + - Name: Create a new snippet + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Start a search + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Search in current conversation + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: "Start, join, leave or end a huddle" + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - H + - Name: Toggle mute on a huddle + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Toggle full-screen view + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F11 + - Name: Close window + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Name: Reopen last closed window + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - W + - Name: Open the People view + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - E + - Name: Quit Slack + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Q + - SectionName: Navigate conversations + Properties: + - Name: Jump to a conversation + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - Name: Jump to a conversation (alt) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - T + - Name: Jump to most recent unread message + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Name: Jump to previous unread channel or DM + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Jump to next unread channel or DM + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: true + Keys: + - "" + - Name: Jump to previous channel or DM in sidebar + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Jump to next channel or DM in sidebar + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Go back in history + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Go forwards in history + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Open the Home view + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - 1 + - Name: Browse DMs + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - 2 + - Name: Open the Activity view + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - Name: Open the More view + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - 0 + - Name: Open the Threads view + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - T + - Name: Browse channels + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - L + - Name: Open conversation details + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - I + - Name: Move focus to next section + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F6 + - Name: Move focus to previous section + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F6 + - SectionName: Mark messages read or unread + Properties: + - Name: Mark all messages in current conversation as read + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Mark all messages as read + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - SectionName: All unread + Properties: + - Name: Open the All unread view + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - A + - Name: Mark a group of messages as read + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - SectionName: Switch workspaces + Properties: + - Name: Expand or collapse the workspace switcher + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - S + - Name: Switch to previous workspace + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Tab + - Name: Switch to next workspace + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tab + - SectionName: Switch tabs + Properties: + - Name: Switch to previous tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageUp + - Name: Switch to next tab + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageDown + - SectionName: Take actions on messages + Properties: + - Name: Edit a message you sent + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - E + - Name: Delete a message you sent + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Open or reply to a thread + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - T + - Name: Forward a message + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - F + - Name: Pin or unpin a message + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - P + - Name: Save a message (or remove from Later) + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - A + - Name: Mark all messages above as unread + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - U + - Name: Create a reminder about a message + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - M + - Name: Add an emoji reaction + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - R + - SectionName: Format messages + Properties: + - Name: Select text to beginning of line + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Select text to end of line + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: New line + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Bold selected text + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Italicise selected text + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Strikethrough selected text + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - X + - Name: Hyperlink selected text + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - U + - Name: Quote selected text + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - 9 + - Name: Inline code selected text + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - C + - Name: Codeblock selected text + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: true + Keys: + - C + - Name: Bulleted list + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - 8 + - Name: Numbered list + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - 7 + - Name: Apply markdown formatting + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - F + - Name: Undo formatting + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - SectionName: Format text in a canvas + Properties: + - Name: Paragraph + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 0 + - Name: Big heading + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 1 + - Name: Medium heading + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 2 + - Name: Small heading + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - 3 + - Name: Checklist + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - 0 + - Name: Bulleted list + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - 8 + - Name: Numbered list + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - 7 + - Name: Toggle heading and list styles + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tilde + - SectionName: Navigate a canvas + Properties: + - Name: View comment thread + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - T + - Name: Show reader or edit view + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - R + - Name: Open context menu + Shortcut: + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - F10 + - Name: Find text in the canvas + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Find next + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - G + - Name: Find previous + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - G + - Name: Find and replace + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - H + - Name: Copy anchor link to section + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - Q + - Name: Undo last action + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Z + - Name: Redo last action + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Z + - Name: Move item in list up + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "" + - Name: Move item in list down + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: true + Keys: + - "" diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Telegram.TelegramDesktop.en-US.yml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Telegram.TelegramDesktop.en-US.yml new file mode 100644 index 0000000000..3f6f62a6c8 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/Manifests/Telegram.TelegramDesktop.en-US.yml @@ -0,0 +1,228 @@ +PackageName: Telegram.TelegramDesktop +Name: Telegram Desktop +WindowFilter: "telegram.exe" +BackgroundProcess: true +Shortcuts: + - SectionName: Chat navigation + Properties: + - Name: Move to next chat + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Tab + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageDown + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Move to previous chat + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - Tab + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - PageUp + - Win: false + Ctrl: false + Shift: false + Alt: true + Keys: + - "" + - Name: Go to previous folder + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Go to next folder + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - "" + - Name: Search in selected chat + Recommended: true + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - F + - Name: Exit selected chat / global search + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - SectionName: Messages + Properties: + - Name: Edit previous message + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Delete currently selected message + Shortcut: + - Win: false + Ctrl: false + Shift: false + Alt: false + Keys: + - "" + - Name: Start new line in input area + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - "" + - Win: false + Ctrl: false + Shift: true + Alt: false + Keys: + - "" + - Name: Move cursor to start of multi-line message + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Home + - SectionName: Text formatting + Properties: + - Name: Italic + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - I + - Name: Bold + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - B + - Name: Underline + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - U + - Name: Strikethrough + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - X + - Name: Monospace + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - M + - Name: Remove formatting + Shortcut: + - Win: false + Ctrl: true + Shift: true + Alt: false + Keys: + - N + - Name: Add URL to selection (link) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - K + - SectionName: Application + Properties: + - Name: Send file + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - O + - Name: Open contacts + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - J + - Name: Lock Telegram (if local password set) + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - L + - Name: Minimize Telegram + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - M + - Name: Minimize to system tray + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - W + - Name: Quit Telegram + Shortcut: + - Win: false + Ctrl: true + Shift: false + Alt: false + Keys: + - Q diff --git a/src/modules/ShortcutGuide/ShortcutGuide/Shortcut-Guide.ico b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/ShortcutGuide.ico similarity index 100% rename from src/modules/ShortcutGuide/ShortcutGuide/Shortcut-Guide.ico rename to src/modules/ShortcutGuide/ShortcutGuide.Ui/Assets/ShortcutGuide/ShortcutGuide.ico diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Converters/ShortcutDescriptionToKeysConverter.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Converters/ShortcutDescriptionToKeysConverter.cs new file mode 100644 index 0000000000..21509d942b --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Converters/ShortcutDescriptionToKeysConverter.cs @@ -0,0 +1,99 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using ManagedCommon; +using Microsoft.UI.Xaml.Data; +using ShortcutGuide.Models; +using Windows.System; + +namespace ShortcutGuide.Converters +{ + public sealed partial class ShortcutDescriptionToKeysConverter : IValueConverter + { + public object Convert(object value, Type targetType, object parameter, string language) + { + if (value is ShortcutDescription description) + { + // Populate keysList with the keys from the ShortcutDescription + return this.GetKeysList(description); + } + else + { + List keysList = [string.Empty]; + return keysList; + } + } + + public object ConvertBack(object value, Type targetType, object parameter, string language) + { + return value; + } + + public List GetKeysList(ShortcutDescription description) + { + List shortcutList = []; + + if (description.Win) + { + shortcutList.Add(92); // The Windows key or button. + } + + if (description.Ctrl) + { + shortcutList.Add("Ctrl"); + } + + if (description.Alt) + { + shortcutList.Add("Alt"); + } + + if (description.Shift) + { + shortcutList.Add(16); // The Shift key or button. + } + + foreach (var key in description.Keys) + { + // Try to parse a string key number to a VirtualKey + if (int.TryParse(key, out int keyCode)) + { + shortcutList.Add(keyCode); + } + else + { + switch (key) + { + // https://learn.microsoft.com/uwp/api/windows.system.virtualkey?view=winrt-20348 + case "Up": + shortcutList.Add(38); // The Up Arrow key or button. + break; + case "Down": + shortcutList.Add(40); // The Down Arrow key or button. + break; + case "Left": + shortcutList.Add(37); // The Left Arrow key or button. + break; + case "Right": + shortcutList.Add(39); // The Right Arrow key or button. + break; + case "Back": + shortcutList.Add(8); // The Back key or button. + break; + case "": + shortcutList.Add("Num"); + break; + default: + shortcutList.Add(key); // Add other keys as strings. + break; + } + } + } + + return shortcutList; + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/DisplayHelper.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/DisplayHelper.cs new file mode 100644 index 0000000000..d21a7cfd22 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/DisplayHelper.cs @@ -0,0 +1,49 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Windows.Foundation; +using WinUIEx; + +namespace ShortcutGuide.Helpers +{ + public static class DisplayHelper + { + /// + /// Returns the display work area for the monitor that contains the specified window. + /// + /// The window handle + /// A element containing the display area + public static Rect GetWorkAreaForDisplayWithWindow(nint hwnd) + { + var monitor = NativeMethods.MonitorFromWindow(hwnd, (int)NativeMethods.MonitorFromWindowDwFlags.MONITOR_DEFAULTTONEAREST); + + int foundIndex = -1; + int currentIndex = 0; + + NativeMethods.EnumDisplayMonitors( + nint.Zero, + nint.Zero, + (nint hMonitor, nint hdcMonitor, ref NativeMethods.RECT lprcMonitor, nint dwData) => + { + if (hMonitor == dwData) + { + foundIndex = currentIndex; + return false; + } + + currentIndex++; + return true; + }, + monitor); + + var monitors = MonitorInfo.GetDisplayMonitors(); + if (foundIndex < 0 || foundIndex >= monitors.Count) + { + foundIndex = 0; + } + + return monitors[foundIndex].RectWork; + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/DpiHelper.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/DpiHelper.cs new file mode 100644 index 0000000000..f74b32f72f --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/DpiHelper.cs @@ -0,0 +1,43 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace ShortcutGuide.Helpers +{ + // This class is rewritten from C++ to C# from the measure tool project + internal static class DpiHelper + { +#pragma warning disable SA1310 // Field names should not contain underscore + private const int DEFAULT_DPI = 96; + private const int MONITOR_DEFAULTTONEAREST = 2; + private const int MDT_EFFECTIVE_DPI = 0; +#pragma warning restore SA1310 // Field names should not contain underscore + + public static float GetDPIScaleForWindow(nint hwnd) + { + int dpi = DEFAULT_DPI; + GetScreenDPIForWindow(hwnd, ref dpi); + return (float)dpi / DEFAULT_DPI; + } + + private static long GetScreenDPIForWindow(nint hwnd, ref int dpi) + { + var targetMonitor = NativeMethods.MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST); + return GetScreenDPIForMonitor(targetMonitor, ref dpi); + } + + private static long GetScreenDPIForMonitor(nint targetMonitor, ref int dpi) + { + if (targetMonitor != 0) + { + int dummy = 0; + return NativeMethods.GetDpiForMonitor(targetMonitor, MDT_EFFECTIVE_DPI, ref dpi, ref dummy); + } + else + { + dpi = DEFAULT_DPI; + return 0x80004005L; + } + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/IconHelper.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/IconHelper.cs new file mode 100644 index 0000000000..b093ef86b5 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/IconHelper.cs @@ -0,0 +1,62 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.ComponentModel; +using System.Drawing; +using System.Drawing.Imaging; +using System.IO; +using Microsoft.UI.Xaml.Media.Imaging; + +namespace ShortcutGuide.Helpers +{ + /// + /// Helpers for loading executable icons as XAML image sources. + /// + internal static class IconHelper + { + /// + /// Extracts the associated icon of an executable file and returns it as a + /// suitable for use with ImageIcon. + /// + /// Full path to the executable, or null/empty. + /// + /// A when extraction succeeds; otherwise null. + /// Callers should fall back to a glyph icon when this returns null. + /// + public static BitmapImage? TryGetExecutableIcon(string? path) + { + if (string.IsNullOrEmpty(path) || !File.Exists(path)) + { + return null; + } + + try + { + using Icon? icon = Icon.ExtractAssociatedIcon(path); + if (icon is null) + { + return null; + } + + using Bitmap bitmap = icon.ToBitmap(); + using MemoryStream stream = new(); + bitmap.Save(stream, ImageFormat.Png); + stream.Position = 0; + + BitmapImage bitmapImage = new(); + bitmapImage.SetSource(stream.AsRandomAccessStream()); + return bitmapImage; + } + catch (Exception ex) when (ex is FileNotFoundException + or UnauthorizedAccessException + or Win32Exception + or ArgumentException + or IOException) + { + return null; + } + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/ManifestInterpreter.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/ManifestInterpreter.cs new file mode 100644 index 0000000000..9d324793c2 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/ManifestInterpreter.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Diagnostics; +using System.Globalization; +using System.IO; +using System.Linq; +using System.Text.RegularExpressions; +using ShortcutGuide.Models; +using YamlDotNet.Serialization; + +namespace ShortcutGuide.Helpers +{ + /// + /// Helps to interpret the manifest files for the Shortcut Guide. + /// + public class ManifestInterpreter + { + // Todo: Get language from settings or environment variable, default to "en-US" + + /// + /// Gets the language used for the manifest files. + /// + public static string Language => "en-US"; + + /// + /// Returns the shortcuts for a specific application. + /// + /// + /// The method should only be called if the application is known to have a shortcuts file. + /// + /// The manifest id. + /// The deserialized shortcuts file. + /// The requested file was not found. + public static ShortcutFile GetShortcutsOfApplication(string applicationName) + { + string path = PathOfManifestFiles; + IEnumerable files = Directory.EnumerateFiles(path, applicationName + ".*.yml") ?? + throw new FileNotFoundException($"The file for the application '{applicationName}' was not found in '{path}'."); + + IEnumerable filesEnumerable = files as string[] ?? [.. files]; + return filesEnumerable.Any(f => f.EndsWith($".{Language}.yml", StringComparison.InvariantCulture)) + ? YamlToShortcutList(File.ReadAllText(Path.Combine(path, applicationName + $".{Language}.yml"))) + : filesEnumerable.Any(f => f.EndsWith(".en-US.yml", StringComparison.InvariantCulture)) + ? YamlToShortcutList(File.ReadAllText(filesEnumerable.First(f => f.EndsWith(".en-US.yml", StringComparison.InvariantCulture)))) + : throw new FileNotFoundException($"The file for the application '{applicationName}' was not found in '{path}' with the language '{Language}' or 'en-US'."); + } + + /// + /// Deserializes the content of a YAML file to a . + /// + /// The content of the YAML file. + /// A deserialized object. + private static ShortcutFile YamlToShortcutList(string content) + { + Deserializer deserializer = new(); + return deserializer.Deserialize(content); + } + + /// + /// Gets the path to the directory where the manifest files are stored. + /// + public static string PathOfManifestFiles => Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData), "Microsoft", "WinGet", "KeyboardShortcuts"); + + /// + /// Retrieves the index YAML file that contains the list of all applications and their shortcuts. + /// + /// A deserialized object. + public static IndexFile GetIndexYamlFile() + { + string path = PathOfManifestFiles; + string content = File.ReadAllText(Path.Combine(path, "index.yml")); + Deserializer deserializer = new(); + return deserializer.Deserialize(content); + } + + /// + /// Retrieves all application IDs that should be displayed, based on the foreground window and background processes. + /// + /// + /// A dictionary mapping each application ID to the full path of the executable + /// that caused the match (used for icon extraction), or null when no + /// specific executable is associated (for example, wildcard filters like the + /// default shell). + /// + public static Dictionary GetAllCurrentApplicationIds() + { + nint handle = NativeMethods.GetForegroundWindow(); + + Dictionary applicationIds = new(StringComparer.Ordinal); + + Process[] processes = Process.GetProcesses(); + + if (NativeMethods.GetWindowThreadProcessId(handle, out uint processId) > 0) + { + string? name = null; + string? executablePath = null; + + try + { + ProcessModule? mainModule = Process.GetProcessById((int)processId).MainModule; + name = mainModule?.ModuleName; + executablePath = mainModule?.FileName; + } + catch (Win32Exception) + { + // Access denied for elevated processes; we cannot read the module. + } + catch (InvalidOperationException) + { + // Process exited between enumeration and access. + } + + if (name is not null) + { + try + { + IndexFile.IndexItem match = GetIndexYamlFile().Index.First((s) => !s.BackgroundProcess && IsMatch(name, s.WindowFilter)); + string? pathForApp = match.WindowFilter == "*" ? null : executablePath; + foreach (var item in match.Apps) + { + applicationIds[item] = pathForApp; + } + } + catch (InvalidOperationException) + { + } + } + } + + foreach (var item in GetIndexYamlFile().Index.Where((s) => s.BackgroundProcess)) + { + try + { + string? matchedExecutablePath = null; + bool matched = false; + foreach (var p in processes) + { + try + { + if (IsMatch(p.MainModule!.ModuleName, item.WindowFilter)) + { + matched = true; + if (item.WindowFilter != "*") + { + matchedExecutablePath = p.MainModule!.FileName; + } + + break; + } + } + catch (Win32Exception) + { + // Access denied for elevated processes; skip. + } + } + + if (matched) + { + foreach (var app in item.Apps) + { + // Preserve an existing (foreground) path if one was already set; + // only fill in a path when the slot is currently null. + if (!applicationIds.TryGetValue(app, out string? existing) || existing is null) + { + applicationIds[app] = matchedExecutablePath; + } + } + } + } + catch (InvalidOperationException) + { + } + } + + return applicationIds; + + static bool IsMatch(string input, string filter) + { + input = input.ToLower(CultureInfo.InvariantCulture); + filter = filter.ToLower(CultureInfo.InvariantCulture); + string regexPattern = "^" + Regex.Escape(filter).Replace("\\*", ".*") + "$"; + return Regex.IsMatch(input, regexPattern); + } + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/NavItemIconHelper.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/NavItemIconHelper.cs new file mode 100644 index 0000000000..7f54365e8c --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/NavItemIconHelper.cs @@ -0,0 +1,85 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.UI.Xaml; + +namespace ShortcutGuide.Helpers; + +internal static class NavItemIconHelper +{ + public static object GetSelectedIcon(DependencyObject obj) + { + return obj.GetValue(SelectedIconProperty); + } + + public static void SetSelectedIcon(DependencyObject obj, object value) + { + obj.SetValue(SelectedIconProperty, value); + } + + public static readonly DependencyProperty SelectedIconProperty = + DependencyProperty.RegisterAttached("SelectedIcon", typeof(object), typeof(NavItemIconHelper), new PropertyMetadata(null)); + + /// + /// Gets the value of for a + /// + /// Returns a boolean indicating whether the notification dot should be shown. + public static bool GetShowNotificationDot(DependencyObject obj) + { + return (bool)obj.GetValue(ShowNotificationDotProperty); + } + + /// + /// Sets on a + /// + public static void SetShowNotificationDot(DependencyObject obj, bool value) + { + obj.SetValue(ShowNotificationDotProperty, value); + } + + /// + /// An attached property that sets whether or not a notification dot should be shown on an associated + /// + public static readonly DependencyProperty ShowNotificationDotProperty = + DependencyProperty.RegisterAttached("ShowNotificationDot", typeof(bool), typeof(NavItemIconHelper), new PropertyMetadata(false)); + + /// + /// Gets the value of for a + /// + /// Returns the unselected icon as an object. + public static object GetUnselectedIcon(DependencyObject obj) + { + return (object)obj.GetValue(UnselectedIconProperty); + } + + /// + /// Sets the value of for a + /// + public static void SetUnselectedIcon(DependencyObject obj, object value) + { + obj.SetValue(UnselectedIconProperty, value); + } + + /// + /// An attached property that sets the unselected icon on an associated + /// + public static readonly DependencyProperty UnselectedIconProperty = + DependencyProperty.RegisterAttached("UnselectedIcon", typeof(object), typeof(NavItemIconHelper), new PropertyMetadata(null)); + + public static Visibility GetStaticIconVisibility(DependencyObject obj) + { + return (Visibility)obj.GetValue(StaticIconVisibilityProperty); + } + + public static void SetStaticIconVisibility(DependencyObject obj, Visibility value) + { + obj.SetValue(StaticIconVisibilityProperty, value); + } + + /// + /// An attached property that sets the visibility of the static icon in the associated . + /// + public static readonly DependencyProperty StaticIconVisibilityProperty = + DependencyProperty.RegisterAttached("StaticIconVisibility", typeof(Visibility), typeof(NavItemIconHelper), new PropertyMetadata(Visibility.Collapsed)); +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/PinnedShortcutsHelper.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/PinnedShortcutsHelper.cs new file mode 100644 index 0000000000..eb2f2186e0 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/PinnedShortcutsHelper.cs @@ -0,0 +1,50 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Text.Json; +using System.Threading.Tasks; +using Microsoft.PowerToys.Settings.UI.Library; +using ShortcutGuide.Models; + +namespace ShortcutGuide.Helpers +{ + public static class PinnedShortcutsHelper + { + /// + /// Raised after the pinned-shortcut list for an application has been updated and persisted. + /// The string argument is the affected application name. + /// + public static event EventHandler? PinnedShortcutsChanged; + + public static void UpdatePinnedShortcuts(string appName, ShortcutEntry shortcutEntry) + { + if (!App.PinnedShortcuts.TryGetValue(appName, out var list)) + { + list = new List(); + App.PinnedShortcuts[appName] = list; + } + + if (!list.Remove(shortcutEntry)) + { + list.Add(shortcutEntry); + } + + Save(); + PinnedShortcutsChanged?.Invoke(null, appName); + } + + public static void Save() + { + string serialized = JsonSerializer.Serialize(App.PinnedShortcuts); + + string pinnedPath = SettingsUtils.Default.GetSettingsFilePath(ShortcutGuideSettings.ModuleName, "Pinned.json"); + File.WriteAllText(pinnedPath, serialized); + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/PowerToysShortcutsPopulator.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/PowerToysShortcutsPopulator.cs new file mode 100644 index 0000000000..22e88db819 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/PowerToysShortcutsPopulator.cs @@ -0,0 +1,197 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Globalization; +using System.IO; +using System.Text; +using System.Text.RegularExpressions; +using Microsoft.PowerToys.Settings.UI.Library; +using static ShortcutGuide.Helpers.ResourceLoaderInstance; + +namespace ShortcutGuide.Helpers +{ + /// + /// Populates the PowerToys shortcuts in the manifest files. + /// + internal sealed partial class PowerToysShortcutsPopulator + { + /// + /// Populates the PowerToys shortcuts in the manifest files. + /// + public static void Populate() + { + string path = Path.Combine(ManifestInterpreter.PathOfManifestFiles, $"Microsoft.PowerToys.{ManifestInterpreter.Language}.yml"); + + StringBuilder content = new(File.ReadAllText(path)); + + const string populateStartString = "# "; + const string populateEndString = "# "; + + content = new(PopulateRegex().Replace(content.ToString(), populateStartString + Environment.NewLine)); + + SettingsUtils settingsUtils = SettingsUtils.Default; + EnabledModules enabledModules = SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Enabled; + if (enabledModules.AdvancedPaste) + { + AdvancedPasteProperties advancedPasteProperties = SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties; + content.Append(HotkeySettingsToYaml(advancedPasteProperties.AdvancedPasteUIShortcut, SettingsResourceLoader.GetString("AdvancedPaste/ModuleTitle"), SettingsResourceLoader.GetString("AdvancedPasteUI_Shortcut/Header"))); + content.Append(HotkeySettingsToYaml(advancedPasteProperties.PasteAsPlainTextShortcut, SettingsResourceLoader.GetString("AdvancedPaste/ModuleTitle"), SettingsResourceLoader.GetString("PasteAsPlainText_Shortcut/Header"))); + content.Append(HotkeySettingsToYaml(advancedPasteProperties.PasteAsMarkdownShortcut, SettingsResourceLoader.GetString("AdvancedPaste/ModuleTitle"), SettingsResourceLoader.GetString("PasteAsMarkdown_Shortcut/Header"))); + content.Append(HotkeySettingsToYaml(advancedPasteProperties.PasteAsJsonShortcut, SettingsResourceLoader.GetString("AdvancedPaste/ModuleTitle"), SettingsResourceLoader.GetString("PasteAsJson_Shortcut/Header"))); + if (advancedPasteProperties.AdditionalActions.ImageToText.IsShown) + { + content.Append(HotkeySettingsToYaml(advancedPasteProperties.AdditionalActions.ImageToText.Shortcut, SettingsResourceLoader.GetString("AdvancedPaste/ModuleTitle"), SettingsResourceLoader.GetString("ImageToText/Header"))); + } + + if (advancedPasteProperties.AdditionalActions.PasteAsFile.IsShown) + { + content.Append(HotkeySettingsToYaml(advancedPasteProperties.AdditionalActions.PasteAsFile.PasteAsTxtFile.Shortcut, SettingsResourceLoader.GetString("AdvancedPaste/ModuleTitle"), SettingsResourceLoader.GetString("PasteAsTxtFile/Header"))); + content.Append(HotkeySettingsToYaml(advancedPasteProperties.AdditionalActions.PasteAsFile.PasteAsPngFile.Shortcut, SettingsResourceLoader.GetString("AdvancedPaste/ModuleTitle"), SettingsResourceLoader.GetString("PasteAsPngFile/Header"))); + content.Append(HotkeySettingsToYaml(advancedPasteProperties.AdditionalActions.PasteAsFile.PasteAsHtmlFile.Shortcut, SettingsResourceLoader.GetString("AdvancedPaste/ModuleTitle"), SettingsResourceLoader.GetString("PasteAsHtmlFile/Header"))); + } + + if (advancedPasteProperties.AdditionalActions.Transcode.IsShown) + { + content.Append(HotkeySettingsToYaml(advancedPasteProperties.AdditionalActions.Transcode.TranscodeToMp3.Shortcut, SettingsResourceLoader.GetString("AdvancedPaste/ModuleTitle"), SettingsResourceLoader.GetString("TranscodeToMp3/Header"))); + content.Append(HotkeySettingsToYaml(advancedPasteProperties.AdditionalActions.Transcode.TranscodeToMp4.Shortcut, SettingsResourceLoader.GetString("AdvancedPaste/ModuleTitle"), SettingsResourceLoader.GetString("TranscodeToMp4/Header"))); + } + } + + if (enabledModules.AlwaysOnTop) + { + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.Hotkey, SettingsResourceLoader.GetString("AlwaysOnTop/ModuleTitle"), SettingsResourceLoader.GetString("AlwaysOnTop_ShortDescription"))); + } + + if (enabledModules.ColorPicker) + { + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.ActivationShortcut, SettingsResourceLoader.GetString("ColorPicker/ModuleTitle"), SettingsResourceLoader.GetString("ColorPicker_ShortDescription"))); + } + + if (enabledModules.CmdPal) + { + content.Append(HotkeySettingsToYaml(new CmdPalProperties().Hotkey, SettingsResourceLoader.GetString("CmdPal/ModuleTitle"))); + } + + if (enabledModules.CropAndLock) + { + CropAndLockProperties cropAndLockProperties = SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties; + content.Append(HotkeySettingsToYaml(cropAndLockProperties.ThumbnailHotkey, SettingsResourceLoader.GetString("CropAndLock/ModuleTitle"), SettingsResourceLoader.GetString("CropAndLock_Thumbnail"))); + content.Append(HotkeySettingsToYaml(cropAndLockProperties.ReparentHotkey, SettingsResourceLoader.GetString("CropAndLock/ModuleTitle"), SettingsResourceLoader.GetString("CropAndLock_Reparent"))); + } + + if (enabledModules.CursorWrap) + { + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.ActivationShortcut, SettingsResourceLoader.GetString("MouseUtils_CursorWrap/Header"), SettingsResourceLoader.GetString("MouseUtils_CursorWrap/Description"))); + } + + if (enabledModules.FancyZones) + { + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.FancyzonesEditorHotkey, SettingsResourceLoader.GetString("FancyZones/ModuleTitle"), SettingsResourceLoader.GetString("FancyZones_OpenEditor"))); + } + + if (enabledModules.LightSwitch) + { + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.ToggleThemeHotkey, SettingsResourceLoader.GetString("LightSwitch/ModuleTitle"), SettingsResourceLoader.GetString("LightSwitch_ForceDarkMode"))); + } + + if (enabledModules.MouseHighlighter) + { + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.ActivationShortcut, SettingsResourceLoader.GetString("MouseUtils_MouseHighlighter/Header"), SettingsResourceLoader.GetString("MouseHighlighter_ShortDescription"))); + } + + if (enabledModules.MouseJump) + { + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.ActivationShortcut, SettingsResourceLoader.GetString("MouseUtils_MouseJump/Header"), SettingsResourceLoader.GetString("MouseJump_ShortDescription"))); + } + + if (enabledModules.MousePointerCrosshairs) + { + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.ActivationShortcut, SettingsResourceLoader.GetString("MouseUtils_MousePointerCrosshairs/Header"), SettingsResourceLoader.GetString("MouseCrosshairs_ShortDescription"))); + } + + if (enabledModules.Peek) + { + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.ActivationShortcut, SettingsResourceLoader.GetString("Peek/ModuleTitle"))); + } + + if (enabledModules.PowerLauncher) + { + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.OpenPowerLauncher, SettingsResourceLoader.GetString("PowerLauncher/ModuleTitle"))); + } + + if (enabledModules.MeasureTool) + { + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.ActivationShortcut, SettingsResourceLoader.GetString("MeasureTool/ModuleTitle"), SettingsResourceLoader.GetString("ScreenRuler_ShortDescription"))); + } + + if (enabledModules.ShortcutGuide) + { + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.DefaultOpenShortcutGuide, SettingsResourceLoader.GetString("ShortcutGuide/ModuleTitle"), SettingsResourceLoader.GetString("ShortcutGuide_ShortDescription"))); + } + + if (enabledModules.PowerOcr) + { + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.ActivationShortcut, SettingsResourceLoader.GetString("TextExtractor/ModuleTitle"), SettingsResourceLoader.GetString("PowerOcr_ShortDescription"))); + } + + if (enabledModules.Workspaces) + { + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.Hotkey, SettingsResourceLoader.GetString("Workspaces/ModuleTitle"), SettingsResourceLoader.GetString("Workspaces_ShortDescription"))); + } + + // Todo: ZoomIt hotkeys currently not supported, because ZoomIt does save their settings in the view model instead of the settings properties, which is weird. + /* + if (enabledModules.ZoomIt) + { + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.ToggleKey, SettingsResourceLoader.GetString("ZoomIt/ModuleTitle"), SettingsResourceLoader.GetString("ZoomIt_ZoomGroup/Header"))); + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.LiveZoomToggleKey, SettingsResourceLoader.GetString("ZoomIt/ModuleTitle"), SettingsResourceLoader.GetString("ZoomIt_LiveZoomGroup/Header"))); + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.DrawToggleKey, SettingsResourceLoader.GetString("ZoomIt/ModuleTitle"), SettingsResourceLoader.GetString("ZoomIt_DrawGroup/Header"))); + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.DemoTypeToggleKey, SettingsResourceLoader.GetString("ZoomIt/ModuleTitle"), SettingsResourceLoader.GetString("ZoomIt_DemoTypeGroup/Header"))); + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.BreakTimerKey, SettingsResourceLoader.GetString("ZoomIt/ModuleTitle"), SettingsResourceLoader.GetString("ZoomIt_BreakGroup/Header"))); + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.RecordToggleKey, SettingsResourceLoader.GetString("ZoomIt/ModuleTitle"), SettingsResourceLoader.GetString("ZoomIt_RecordGroup/Header"))); + content.Append(HotkeySettingsToYaml(SettingsRepository.GetInstance(settingsUtils).SettingsConfig.Properties.SnipToggleKey, SettingsResourceLoader.GetString("ZoomIt/ModuleTitle"), SettingsResourceLoader.GetString("ZoomIt_SnipGroup/Header"))); + }*/ + + content.Append(populateEndString); + + File.WriteAllText(path, content.ToString()); + } + + /// + /// Converts the hotkey settings to a YAML format string for the manifest file. + /// + /// Object containing a hotkey from the settings. + /// The name of the PowerToys module. + /// Description of the action. + /// Yaml code for the manifest file. + private static string HotkeySettingsToYaml(HotkeySettings hotkeySettings, string moduleName, string? description = null) + { + string content = string.Empty; + content += " - Name: " + moduleName + Environment.NewLine; + content += " Shortcut: " + Environment.NewLine; + content += " - Win: " + hotkeySettings.Win.ToString() + Environment.NewLine; + content += " Ctrl: " + hotkeySettings.Ctrl.ToString() + Environment.NewLine; + content += " Alt: " + hotkeySettings.Alt.ToString() + Environment.NewLine; + content += " Shift: " + hotkeySettings.Shift.ToString() + Environment.NewLine; + content += " Keys:" + Environment.NewLine; + content += " - " + hotkeySettings.Code.ToString(CultureInfo.InvariantCulture) + Environment.NewLine; + if (description != null) + { + content += " Description: " + description + Environment.NewLine; + } + + return content; + } + + /// + private static string HotkeySettingsToYaml(KeyboardKeysProperty hotkeySettings, string moduleName, string? description = null) + { + return HotkeySettingsToYaml(hotkeySettings.Value, moduleName, description); + } + + [GeneratedRegex(@"# [\s\S\n\r]*# ")] + private static partial Regex PopulateRegex(); + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/ResourceLoaderInstance.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/ResourceLoaderInstance.cs new file mode 100644 index 0000000000..f4e18161e9 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/ResourceLoaderInstance.cs @@ -0,0 +1,27 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.Windows.ApplicationModel.Resources; + +namespace ShortcutGuide.Helpers +{ + internal static class ResourceLoaderInstance + { + /// + /// Gets the resource loader for the Shortcut Guide module. + /// + internal static ResourceLoader ResourceLoader { get; private set; } + + /// + /// Gets the resource loader for the Settings module. + /// + internal static ResourceLoader SettingsResourceLoader { get; private set; } + + static ResourceLoaderInstance() + { + ResourceLoader = new ResourceLoader("PowerToys.ShortcutGuide.pri"); + SettingsResourceLoader = new ResourceLoader("PowerToys.Settings.pri"); + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/StringResourceExtension.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/StringResourceExtension.cs new file mode 100644 index 0000000000..f647aef414 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/StringResourceExtension.cs @@ -0,0 +1,30 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.UI.Xaml.Markup; + +namespace ShortcutGuide.Helpers +{ + [MarkupExtensionReturnType(ReturnType = typeof(string))] + public partial class StringResourceExtension : MarkupExtension + { + public enum SpecialTreatment + { + None, + FirstCharOnly, + EverythingExceptFirstChar, + } + + public string Key { get; set; } = string.Empty; + + public SpecialTreatment Treatment { get; set; } = SpecialTreatment.None; + + protected override object ProvideValue() => this.Treatment switch + { + SpecialTreatment.FirstCharOnly => ResourceLoaderInstance.ResourceLoader.GetString(this.Key)[0].ToString(), + SpecialTreatment.EverythingExceptFirstChar => ResourceLoaderInstance.ResourceLoader.GetString(this.Key)[1..], + _ => ResourceLoaderInstance.ResourceLoader.GetString(this.Key), + }; + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/TasklistPositions.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/TasklistPositions.cs new file mode 100644 index 0000000000..ba5427f35b --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Helpers/TasklistPositions.cs @@ -0,0 +1,45 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Runtime.InteropServices; +using WinRT.Interop; +using TasklistButton = ShortcutGuide.NativeMethods.TasklistButton; + +namespace ShortcutGuide.Helpers +{ + /// + /// Provides methods to retrieve the positions of taskbar buttons on the current monitor. + /// + internal static class TasklistPositions + { + /// + /// Retrieves the taskbar buttons for the current monitor. + /// + /// An array of the taskbar buttons. + public static TasklistButton[] GetButtons() + { + var monitor = NativeMethods.MonitorFromWindow(WindowNative.GetWindowHandle(App.MainWindow), 0); + nint ptr = NativeMethods.GetTasklistButtons(monitor, out int size); + if (ptr == nint.Zero) + { + return []; + } + + if (size <= 0) + { + return []; + } + + TasklistButton[] buttons = new TasklistButton[size]; + nint currentPtr = ptr; + for (int i = 0; i < size; i++) + { + buttons[i] = Marshal.PtrToStructure(currentPtr); + currentPtr += Marshal.SizeOf(); + } + + return buttons; + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/IndexFile.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/IndexFile.cs new file mode 100644 index 0000000000..e8c64d813b --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/IndexFile.cs @@ -0,0 +1,22 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace ShortcutGuide.Models +{ + public struct IndexFile + { + public struct IndexItem + { + public string WindowFilter { get; set; } + + public bool BackgroundProcess { get; set; } + + public string[] Apps { get; set; } + } + + public string DefaultShellName { get; set; } + + public IndexItem[] Index { get; set; } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutCategory.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutCategory.cs new file mode 100644 index 0000000000..0dcd3d1323 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutCategory.cs @@ -0,0 +1,13 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace ShortcutGuide.Models +{ + public struct ShortcutCategory + { + public string SectionName { get; set; } + + public ShortcutEntry[] Properties { get; set; } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutDescription.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutDescription.cs new file mode 100644 index 0000000000..463ef19f4f --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutDescription.cs @@ -0,0 +1,66 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Text.Json.Serialization; +using System.Threading.Tasks; + +namespace ShortcutGuide.Models +{ + public class ShortcutDescription(bool ctrl, bool shift, bool alt, bool win, string[] keys) + { + public ShortcutDescription() + : this(false, false, false, false, []) + { + } + + [JsonPropertyName(nameof(Ctrl))] + public bool Ctrl { get; set; } = ctrl; + + [JsonPropertyName(nameof(Shift))] + public bool Shift { get; set; } = shift; + + [JsonPropertyName(nameof(Alt))] + public bool Alt { get; set; } = alt; + + [JsonPropertyName(nameof(Win))] + public bool Win { get; set; } = win; + + [JsonPropertyName(nameof(Keys))] + public string[] Keys { get; set; } = keys; + + public override bool Equals(object? obj) + { + return obj is ShortcutDescription other && this.Ctrl == other.Ctrl && + this.Shift == other.Shift && + this.Alt == other.Alt && + this.Win == other.Win && + this.Keys.SequenceEqual(other.Keys); + } + + public override int GetHashCode() + { + var hash = HashCode.Combine(Ctrl, Shift, Alt, Win); + foreach (var key in Keys) + { + hash = HashCode.Combine(hash, key); + } + + return hash; + } + + public static bool operator ==(ShortcutDescription? left, ShortcutDescription? right) + { + return (left is null && right is null) || (left is not null && right is not null && left.Equals(right)); + } + + public static bool operator !=(ShortcutDescription? left, ShortcutDescription? right) + { + return !(left == right); + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutEntry.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutEntry.cs new file mode 100644 index 0000000000..4c9000cfa3 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutEntry.cs @@ -0,0 +1,69 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text.Json.Serialization; +using System.Threading; +using System.Threading.Tasks; +using Microsoft.PowerToys.Settings.UI.Library.Utilities; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Markup; +using Windows.UI.Text; +using static ShortcutGuide.Models.ShortcutEntry; +using Orientation = Microsoft.UI.Xaml.Controls.Orientation; + +namespace ShortcutGuide.Models +{ + public class ShortcutEntry(string name, string? description, bool recommended, ShortcutDescription[] shortcutDescriptions) + { + public override bool Equals(object? obj) + { + return obj is ShortcutEntry other && this.Name == other.Name && + this.Description == other.Description && + this.Shortcut.Length == other.Shortcut.Length && + this.Shortcut.SequenceEqual(other.Shortcut); + } + + public override int GetHashCode() + { + var hash = HashCode.Combine(Name, Description); + foreach (var s in Shortcut) + { + hash = HashCode.Combine(hash, s.GetHashCode()); + } + + return hash; + } + + public static bool operator ==(ShortcutEntry? left, ShortcutEntry? right) + { + return (left is null && right is null) || (left is not null && right is not null && left.Equals(right)); + } + + public static bool operator !=(ShortcutEntry? left, ShortcutEntry? right) + { + return !(left == right); + } + + public ShortcutEntry() + : this(string.Empty, string.Empty, false, []) + { + } + + [JsonPropertyName(nameof(Name))] + public string Name { get; set; } = name; + + [JsonPropertyName(nameof(Description))] + public string? Description { get; set; } = description; + + [JsonPropertyName(nameof(Recommended))] + public bool Recommended { get; set; } = recommended; + + [JsonPropertyName(nameof(Shortcut))] + public ShortcutDescription[] Shortcut { get; set; } = shortcutDescriptions; + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutFile.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutFile.cs new file mode 100644 index 0000000000..46c114d645 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutFile.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace ShortcutGuide.Models +{ + public struct ShortcutFile + { + public string PackageName { get; set; } + + public ShortcutCategory[] Shortcuts { get; set; } + + public string WindowFilter { get; set; } + + public bool BackgroundProcess { get; set; } + + public string Name { get; set; } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutPageNavParam.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutPageNavParam.cs new file mode 100644 index 0000000000..3ceab4853b --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Models/ShortcutPageNavParam.cs @@ -0,0 +1,19 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; + +namespace ShortcutGuide.Models +{ + internal sealed class ShortcutPageNavParam + { + public string AppName { get; set; } = string.Empty; + + public ShortcutFile ShortcutFile { get; set; } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/NativeMethods.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/NativeMethods.cs new file mode 100644 index 0000000000..dd91c70674 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/NativeMethods.cs @@ -0,0 +1,110 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Runtime.InteropServices; +using Windows.Graphics; + +namespace ShortcutGuide; + +internal static partial class NativeMethods +{ + internal const int GWL_STYLE = -16; + internal const int WS_CAPTION = 0x00C00000; + + [LibraryImport("user32.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + internal static partial bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter, int x, int y, int cx, int cy, uint uFlags); + + [LibraryImport("user32.dll", SetLastError = true)] + internal static partial int GetWindowLongW(IntPtr hWnd, int nIndex); + + [LibraryImport("user32.dll")] + internal static partial int SetWindowLongW(IntPtr hWnd, int nIndex, int dwNewLong); + + [LibraryImport("user32.dll", StringMarshalling = StringMarshalling.Utf16)] + internal static partial IntPtr FindWindowW(in string lpClassName, in string? lpWindowName); + + [LibraryImport("User32.dll")] + internal static partial IntPtr MonitorFromWindow(IntPtr hwnd, int dwFlags); + + [LibraryImport("Shcore.dll")] + internal static partial long GetDpiForMonitor(IntPtr hmonitor, int dpiType, ref int dpiX, ref int dpiY); + + [LibraryImport("user32.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + internal static partial bool GetCursorPos(out POINT lpPoint); + + [LibraryImport("user32.dll")] + internal static partial IntPtr GetForegroundWindow(); + + [LibraryImport("user32.dll", SetLastError = true)] + internal static partial uint GetWindowThreadProcessId(IntPtr hWnd, out uint processId); + + [LibraryImport("user32.dll")] + internal static partial short GetAsyncKeyState(int vKey); + + [DllImport("../PowerToys.Interop.dll", EntryPoint = "get_buttons")] + internal static extern IntPtr GetTasklistButtons(IntPtr monitor, out int size); + + [LibraryImport("../PowerToys.Interop.dll", EntryPoint = "IsCurrentWindowExcludedFromShortcutGuide")] + [return: MarshalAs(UnmanagedType.Bool)] + internal static partial bool IsCurrentWindowExcludedFromShortcutGuide(); + + [LibraryImport("User32.dll")] + [return: MarshalAs(UnmanagedType.Bool)] + internal static partial bool EnumDisplayMonitors(IntPtr hdc, IntPtr lprcClip, MonitorEnumDelegate lpfnEnum, IntPtr dwData); + + internal delegate bool MonitorEnumDelegate(IntPtr hMonitor, IntPtr hdcMonitor, ref RECT lprcMonitor, IntPtr dwData); + + internal struct LPARAM(IntPtr value) + { + internal IntPtr Value = value; + + public static implicit operator IntPtr(LPARAM lParam) + { + return lParam.Value; + } + + public static implicit operator LPARAM(IntPtr value) + { + return new LPARAM(value); + } + + public static implicit operator LPARAM(int value) + { + return new LPARAM(new IntPtr(value)); + } + + public static implicit operator int(LPARAM lParam) + { + return lParam.Value.ToInt32(); + } + } + + [StructLayout(LayoutKind.Sequential)] + internal struct RECT + { + public int Left; + public int Top; + public int Right; + public int Bottom; + } + + internal struct POINT + { + internal int X; + internal int Y; + + public static implicit operator PointInt32(POINT point) + { + return new PointInt32(point.X, point.Y); + } + } + + public enum MonitorFromWindowDwFlags + { + MONITOR_DEFAULTTONEAREST = 2, + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/Program.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Program.cs new file mode 100644 index 0000000000..a3d1d2ff45 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Program.cs @@ -0,0 +1,123 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Diagnostics; +using System.IO; +using System.Threading; +using ManagedCommon; +using Microsoft.PowerToys.Settings.UI.Library; +using Microsoft.PowerToys.Telemetry; +using Microsoft.UI.Dispatching; +using Microsoft.Windows.AppLifecycle; +using ShortcutGuide.Helpers; +using ShortcutGuide.Telemetry; +using Application = Microsoft.UI.Xaml.Application; + +namespace ShortcutGuide +{ + public sealed class Program + { + [STAThread] + public static void Main(string[] args) + { + Logger.InitializeLogger("\\ShortcutGuide\\Logs"); + + // The module interface passes: [telemetry] + if (args.Length >= 2 && args[1] == "telemetry") + { + Logger.LogInfo("Telemetry mode requested. Sending settings telemetry."); + SendSettingsTelemetry(); + return; + } + + if (PowerToys.GPOWrapper.GPOWrapper.GetConfiguredShortcutGuideEnabledValue() == PowerToys.GPOWrapper.GpoRuleConfigured.Disabled) + { + Logger.LogWarning("Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator."); + return; + } + + Directory.CreateDirectory(ManifestInterpreter.PathOfManifestFiles); + + if (NativeMethods.IsCurrentWindowExcludedFromShortcutGuide()) + { + return; + } + + // Copy every shipped manifest from the install directory to the per-user manifest folder. + // Enumerating the source folder avoids drift between the deployed assets and a hard-coded list. + // Todo: Only copy files after an update. + string sourceManifestFolder = Path.Combine( + Path.GetDirectoryName(Environment.ProcessPath)!, + "Assets", + "ShortcutGuide", + "Manifests"); + + try + { + foreach (string sourceFile in Directory.EnumerateFiles(sourceManifestFolder, "*.yml")) + { + string destinationFile = Path.Combine(ManifestInterpreter.PathOfManifestFiles, Path.GetFileName(sourceFile)); + File.Copy(sourceFile, destinationFile, true); + } + } + catch (Exception ex) + { + Logger.LogError($"Failed to copy bundled shortcut manifests from '{sourceManifestFolder}'.", ex); + } + + Process indexGeneration = Process.Start(Path.GetDirectoryName(Environment.ProcessPath) + "\\PowerToys.ShortcutGuide.IndexYmlGenerator.exe"); + indexGeneration.WaitForExit(); + if (indexGeneration.ExitCode != 0) + { + Logger.LogError($"Index generation failed with exit code {indexGeneration.ExitCode}. There may be a corrupt shortcuts file in \"{ManifestInterpreter.PathOfManifestFiles}\"."); + return; + } + + PowerToysShortcutsPopulator.Populate(); + + WinRT.ComWrappersSupport.InitializeComWrappers(); + + var instanceKey = AppInstance.FindOrRegisterForKey("PowerToys_ShortcutGuide_Instance"); + + if (instanceKey.IsCurrent) + { + Application.Start((p) => + { + var context = new DispatcherQueueSynchronizationContext(DispatcherQueue.GetForCurrentThread()); + SynchronizationContext.SetSynchronizationContext(context); + _ = new App(); + }); + } + else + { + Logger.LogWarning("Another instance of ShortcutGuide is running. Exiting ShortcutGuide"); + } + + // The WinRT/WinUI dispatcher thread doesn't terminate cleanly; force exit. + Environment.Exit(0); + } + + private static void SendSettingsTelemetry() + { + try + { + var settingsUtils = SettingsUtils.Default; + var settings = settingsUtils.GetSettingsOrDefault(ShortcutGuideSettings.ModuleName); + if (settings?.Properties != null) + { + var props = settings.Properties; + PowerToysTelemetry.Log.WriteEvent(new ShortcutGuideSettingsEvent( + props.OpenShortcutGuide?.ToString() ?? string.Empty, + props.Theme?.Value ?? "system", + props.DisabledApps?.Value ?? string.Empty)); + } + } + catch (Exception ex) + { + Logger.LogError("Failed to send settings telemetry.", ex); + } + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuide.Ui.csproj b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuide.Ui.csproj new file mode 100644 index 0000000000..16ac16f6b2 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuide.Ui.csproj @@ -0,0 +1,139 @@ + + + + + + + WinExe + ShortcutGuide + app.manifest + true + true + None + enable + false + false + true + ..\..\..\..\$(Platform)\$(Configuration)\WinUI3Apps + PowerToys.ShortcutGuide + DISABLE_XAML_GENERATED_MAIN,TRACE + Assets\ShortcutGuide\ShortcutGuide.ico + + PowerToys.ShortcutGuide.pri + + + + + + + + + + + + + + + + PreserveNewest + + + PreserveNewest + + + + + + + + + + + + + + + + + + + + + + + + tlbimp + 0 + 1 + 944de083-8fb8-45cf-bcb7-c477acb2f897 + 0 + false + true + + + + + + PowerToys.GPOWrapper + $(OutDir) + false + + + + + + + + + + + + + + + + + + + + + + + + + + + MSBuild:Compile + + + + + MSBuild:Compile + + + + + MSBuild:Compile + + + + + MSBuild:Compile + + + + + + + + true + + diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/App.xaml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/App.xaml new file mode 100644 index 0000000000..659482c085 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/App.xaml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/App.xaml.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/App.xaml.cs new file mode 100644 index 0000000000..4260621823 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/App.xaml.cs @@ -0,0 +1,80 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Collections.Generic; +using System.IO; +using System.Text.Json; +using Microsoft.PowerToys.Settings.UI.Library; +using Microsoft.PowerToys.Telemetry; +using Microsoft.UI.Xaml; +using ShortcutGuide.Models; +using ShortcutGuide.ShortcutGuideXAML; +using ShortcutGuide.Telemetry; + +namespace ShortcutGuide +{ + public partial class App + { + internal static Dictionary> PinnedShortcuts { get; private set; } = new Dictionary>(); + + internal static ShortcutGuideSettings ShortcutGuideSettings { get; private set; } = null!; + + internal static ShortcutGuideProperties ShortcutGuideProperties { get; private set; } = null!; + + internal static MainWindow MainWindow { get; private set; } = null!; + + internal static TaskbarWindow TaskBarWindow { get; private set; } = null!; + + internal static string CurrentAppName { get; set; } = string.Empty; + + public App() + { + this.InitializeComponent(); + } + + protected override void OnLaunched(LaunchActivatedEventArgs args) + { + this.LoadData(); + MainWindow = new MainWindow(); + TaskBarWindow = new TaskbarWindow(); + MainWindow.Activate(); + MainWindow.Closed += (_, _) => + { + PowerToysTelemetry.Log.WriteEvent(new ShortcutGuideSessionEvent( + MainWindow.SessionDurationMs, + MainWindow.CloseType)); + Current.Exit(); + }; + } + + private void LoadData() + { + SettingsUtils settingsUtils = SettingsUtils.Default; + + if (settingsUtils.SettingsExists(ShortcutGuideSettings.ModuleName, "Pinned.json")) + { + string pinnedPath = settingsUtils.GetSettingsFilePath(ShortcutGuideSettings.ModuleName, "Pinned.json"); + try + { + var loaded = JsonSerializer.Deserialize>>(File.ReadAllText(pinnedPath)); + if (loaded != null) + { + PinnedShortcuts = loaded; + } + } + catch (JsonException) + { + // Fall back to the empty default if the file is corrupt. + } + } + + ShortcutGuideSettings = SettingsRepository.GetInstance(settingsUtils).SettingsConfig; + ShortcutGuideProperties = ShortcutGuideSettings.Properties; + +#pragma warning disable CA1869 // Cache and reuse 'JsonSerializerOptions' instances + settingsUtils.SaveSettings(JsonSerializer.Serialize(App.ShortcutGuideSettings, new JsonSerializerOptions { WriteIndented = true }), "Shortcut Guide"); +#pragma warning restore CA1869 // Cache and reuse 'JsonSerializerOptions' instances + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/KeyCharPresenter.xaml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/KeyCharPresenter.xaml new file mode 100644 index 0000000000..bde2ebd55f --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/KeyCharPresenter.xaml @@ -0,0 +1,131 @@ + + + + + + + + + + diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/KeyCharPresenter.xaml.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/KeyCharPresenter.xaml.cs new file mode 100644 index 0000000000..f6f2be3b6b --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/KeyCharPresenter.xaml.cs @@ -0,0 +1,34 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Runtime.InteropServices.WindowsRuntime; +using System.Windows.Markup; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Data; +using Microsoft.UI.Xaml.Documents; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media; +using ShortcutGuide.Helpers; + +namespace ShortcutGuide.Controls; + +public sealed partial class KeyCharPresenter : Control +{ + public KeyCharPresenter() + { + DefaultStyleKey = typeof(KeyCharPresenter); + } + + public object Content + { + get => (object)GetValue(ContentProperty); + set => SetValue(ContentProperty, value); + } + + public static readonly DependencyProperty ContentProperty = DependencyProperty.Register(nameof(Content), typeof(object), typeof(KeyCharPresenter), new PropertyMetadata(default(string))); +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/KeyVisual.xaml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/KeyVisual.xaml new file mode 100644 index 0000000000..05ba7e1c61 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/KeyVisual.xaml @@ -0,0 +1,191 @@ + + + + + + + + diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/KeyVisual.xaml.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/KeyVisual.xaml.cs new file mode 100644 index 0000000000..2e6f378a80 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/KeyVisual.xaml.cs @@ -0,0 +1,191 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Windows.System; + +namespace ShortcutGuide.Controls +{ + [TemplatePart(Name = KeyPresenter, Type = typeof(KeyCharPresenter))] + [TemplateVisualState(Name = NormalState, GroupName = "CommonStates")] + [TemplateVisualState(Name = DisabledState, GroupName = "CommonStates")] + [TemplateVisualState(Name = InvalidState, GroupName = "CommonStates")] + public sealed partial class KeyVisual : Control + { + private const string KeyPresenter = "KeyPresenter"; + private const string NormalState = "Normal"; + private const string DisabledState = "Disabled"; + private const string InvalidState = "Invalid"; + private KeyCharPresenter _keyPresenter = null!; + + public object Content + { + get => (object)GetValue(ContentProperty); + set => SetValue(ContentProperty, value); + } + + public static readonly DependencyProperty ContentProperty = DependencyProperty.Register(nameof(Content), typeof(object), typeof(KeyVisual), new PropertyMetadata(default(string), OnContentChanged)); + + public bool IsInvalid + { + get => (bool)GetValue(IsInvalidProperty); + set => SetValue(IsInvalidProperty, value); + } + + public static readonly DependencyProperty IsInvalidProperty = DependencyProperty.Register(nameof(IsInvalid), typeof(bool), typeof(KeyVisual), new PropertyMetadata(false, OnIsInvalidChanged)); + + public bool RenderKeyAsGlyph + { + get => (bool)GetValue(RenderKeyAsGlyphProperty); + set => SetValue(RenderKeyAsGlyphProperty, value); + } + + public static readonly DependencyProperty RenderKeyAsGlyphProperty = DependencyProperty.Register(nameof(RenderKeyAsGlyph), typeof(bool), typeof(KeyVisual), new PropertyMetadata(false, OnContentChanged)); + + public KeyVisual() + { + this.DefaultStyleKey = typeof(KeyVisual); + } + + protected override void OnApplyTemplate() + { + IsEnabledChanged -= KeyVisual_IsEnabledChanged; + this._keyPresenter = (KeyCharPresenter)this.GetTemplateChild(KeyPresenter); + this.Update(); + this.SetVisualStates(); + IsEnabledChanged += KeyVisual_IsEnabledChanged; + base.OnApplyTemplate(); + } + + private static void OnContentChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ((KeyVisual)d).SetVisualStates(); + } + + private static void OnIsInvalidChanged(DependencyObject d, DependencyPropertyChangedEventArgs e) + { + ((KeyVisual)d).SetVisualStates(); + } + + private void SetVisualStates() + { + if (this.IsInvalid) + { + VisualStateManager.GoToState(this, InvalidState, true); + } + else if (!IsEnabled) + { + VisualStateManager.GoToState(this, DisabledState, true); + } + else + { + VisualStateManager.GoToState(this, NormalState, true); + } + } + + private void Update() + { + if (this.Content == null) + { + Visibility = Visibility.Collapsed; + return; + } + + if (this.Content is string key) + { + SetGlyphOrText(key switch + { + "" => "Num", + "" => "\uE0E2", + "" => "\uE0E3", + "" => "\uE0E4", + "" => "\uE0E5", + "" => "\uE0E4\uE0E5", + "" => "\uE0E2\uE0E3", + "" => "\uE0E2\uE0E3\uE0E4\uE0E5", + "" => "\uE751", + "" => "\uE750", + "" => "Esc", + string s when s.StartsWith('<') => s.Trim('<', '>'), + _ => key, + }); + + this._keyPresenter.Style = key switch + { + "" => (Style)Application.Current.Resources["CopilotKeyCharPresenterStyle"], + "" => (Style)Application.Current.Resources["OfficeKeyCharPresenterStyle"], + "" => (Style)Application.Current.Resources["UnderlinedLetterKeyCharPresenterStyle"], + _ => this._keyPresenter.Style, + }; + + return; + } + + if (this.Content is int keyCode) + { + VirtualKey virtualKey = (VirtualKey)keyCode; + switch (virtualKey) + { + case VirtualKey.Enter: + this.SetGlyphOrText("\uE751"); + break; + + case VirtualKey.Back: + this.SetGlyphOrText("\uE750"); + break; + + case VirtualKey.Shift: + case (VirtualKey)160: // Left Shift + case (VirtualKey)161: // Right Shift + this.SetGlyphOrText("\uE752"); + break; + + case VirtualKey.Up: + this.SetGlyphOrText("\uE0E4"); + break; + + case VirtualKey.Down: + this.SetGlyphOrText("\uE0E5"); + break; + + case VirtualKey.Left: + this.SetGlyphOrText("\uE0E2"); + break; + + case VirtualKey.Right: + this.SetGlyphOrText("\uE0E3"); + break; + + case VirtualKey.LeftWindows: + case VirtualKey.RightWindows: + this._keyPresenter.Style = (Style)Application.Current.Resources["WindowsKeyCharPresenterStyle"]; + break; + default: // For all other keys, we will use the key name. + SetGlyphOrText(virtualKey.ToString()); + break; + } + + return; + } + + Visibility = Visibility.Collapsed; + } + + private void SetGlyphOrText(string glyphOrText) + { + this.RenderKeyAsGlyph = ((glyphOrText[0] >> 12) & 0xF) is 0xE or 0xF; + this._keyPresenter.Content = glyphOrText; + + this._keyPresenter.Style = this.RenderKeyAsGlyph + ? (Style)Application.Current.Resources["GlyphKeyCharPresenterStyle"] + : (Style)Application.Current.Resources["DefaultKeyCharPresenterStyle"]; + } + + private void KeyVisual_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e) + { + this.SetVisualStates(); + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/ShortcutItemView.xaml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/ShortcutItemView.xaml new file mode 100644 index 0000000000..7bc35726eb --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/ShortcutItemView.xaml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/ShortcutItemView.xaml.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/ShortcutItemView.xaml.cs new file mode 100644 index 0000000000..6ee0b92677 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/ShortcutItemView.xaml.cs @@ -0,0 +1,48 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Linq; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using ShortcutGuide.Helpers; +using ShortcutGuide.Models; + +namespace ShortcutGuide.Controls +{ + public sealed partial class ShortcutItemView : UserControl + { + public static readonly DependencyProperty ShortcutProperty = DependencyProperty.Register( + nameof(Shortcut), + typeof(ShortcutEntry), + typeof(ShortcutItemView), + new PropertyMetadata(default(ShortcutEntry))); + + public ShortcutEntry Shortcut + { + get => (ShortcutEntry)this.GetValue(ShortcutProperty); + set => this.SetValue(ShortcutProperty, value); + } + + public ShortcutItemView() + { + this.InitializeComponent(); + } + + private void PinFlyout_Opening(object sender, object e) + { + string appName = App.CurrentAppName; + bool isPinned = App.PinnedShortcuts.TryGetValue(appName, out var pinned) + && pinned.Any(x => x.Equals(this.Shortcut)); + + this.PinMenuItem.Text = ResourceLoaderInstance.ResourceLoader.GetString( + isPinned ? "UnpinShortcut" : "PinShortcut"); + this.PinMenuItem.Icon = new SymbolIcon(isPinned ? Symbol.UnPin : Symbol.Pin); + } + + private void Pin_Click(object sender, RoutedEventArgs e) + { + PinnedShortcutsHelper.UpdatePinnedShortcuts(App.CurrentAppName, this.Shortcut); + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/TaskbarIndicator.xaml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/TaskbarIndicator.xaml new file mode 100644 index 0000000000..17c8aed1a7 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/TaskbarIndicator.xaml @@ -0,0 +1,29 @@ + + + + + + + + \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/TaskbarIndicator.xaml.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/TaskbarIndicator.xaml.cs new file mode 100644 index 0000000000..3325b18d30 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Controls/TaskbarIndicator.xaml.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System.Globalization; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; + +namespace ShortcutGuide.Controls; + +public sealed partial class TaskbarIndicator : UserControl +{ + public string Label + { + get => (string)GetValue(LabelProperty); + set => SetValue(LabelProperty, value); + } + + public static readonly DependencyProperty LabelProperty = DependencyProperty.Register(nameof(Label), typeof(string), typeof(TaskbarIndicator), new PropertyMetadata(default(string))); + + public TaskbarIndicator() + { + this.InitializeComponent(); + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/MainWindow.xaml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/MainWindow.xaml new file mode 100644 index 0000000000..b97942b306 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/MainWindow.xaml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/MainWindow.xaml.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/MainWindow.xaml.cs new file mode 100644 index 0000000000..910c648f4a --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/MainWindow.xaml.cs @@ -0,0 +1,279 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.IO; +using System.Linq; +using Common.UI; +using ManagedCommon; +using Microsoft.PowerToys.Settings.UI.Library; +using Microsoft.PowerToys.Telemetry; +using Microsoft.UI.Windowing; +using Microsoft.UI.Xaml; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Input; +using Microsoft.UI.Xaml.Media.Imaging; +using ShortcutGuide.Helpers; +using ShortcutGuide.Models; +using ShortcutGuide.Pages; +using ShortcutGuide.Telemetry; +using Windows.Foundation; +using Windows.Graphics; +using Windows.System; +using Windows.UI.WindowManagement; +using WinRT.Interop; +using WinUIEx; +using WinUIEx.Messaging; + +namespace ShortcutGuide +{ + public sealed partial class MainWindow : WindowEx + { + private readonly Dictionary _currentApplicationIds; + private readonly Stopwatch _sessionStopwatch = Stopwatch.StartNew(); + private ShortcutFile? _shortcutFile; + private string _selectedAppName = null!; + private string _closeType = "Unknown"; + + internal long SessionDurationMs => _sessionStopwatch.ElapsedMilliseconds; + + internal string CloseType => _closeType; + + private bool _setPosition; + + public MainWindow() + { + this._currentApplicationIds = ManifestInterpreter.GetAllCurrentApplicationIds(); + + this.InitializeComponent(); + + Title = ResourceLoaderInstance.ResourceLoader.GetString("Title")!; + ExtendsContentIntoTitleBar = true; + +#if !DEBUG + this.SetIsAlwaysOnTop(true); + this.SetIsShownInSwitchers(false); +#endif + WindowMessageMonitor msgMonitor = new(this); + msgMonitor.WindowMessageReceived += (_, e) => + { + const int WM_NCLBUTTONDBLCLK = 0x00A3; + if (e.Message.MessageId == WM_NCLBUTTONDBLCLK) + { + // Disable double click on title bar to maximize window + e.Result = 0; + e.Handled = true; + } + }; + + Activated += Window_Activated; + + Content.KeyUp += (_, e) => + { + if (e.Key == VirtualKey.Escape) + { + _closeType = "Escape"; + Close(); + } + }; + + switch (App.ShortcutGuideProperties.Theme.Value) + { + case "dark": + ((FrameworkElement)Content).RequestedTheme = ElementTheme.Dark; + this.MainPage.RequestedTheme = ElementTheme.Dark; + break; + case "light": + ((FrameworkElement)Content).RequestedTheme = ElementTheme.Light; + this.MainPage.RequestedTheme = ElementTheme.Light; + break; + case "system": + // Ignore, as the theme will be set by the system. + break; + default: + Logger.LogError("Invalid theme value in settings: " + App.ShortcutGuideProperties.Theme.Value); + break; + } + } + + protected override void OnStateChanged(WindowState state) + { + if (state == WindowState.Maximized) + { + this.SetWindowPosition(); + } + } + + protected override void OnPositionChanged(PointInt32 position) + { + this.SetWindowPosition(); + } + + private void Window_Activated(object sender, WindowActivatedEventArgs e) + { + if (e.WindowActivationState == WindowActivationState.Deactivated && !this._taskBarWindowActivated) + { +#if !DEBUG + _closeType = "Deactivated"; + Close(); +#endif + } + + if (this._taskBarWindowActivated) + { + this._taskBarWindowActivated = false; + this.BringToFront(); + } + + // The code below sets the position of the window to the center of the monitor, but only if it hasn't been set before. + if (!this._setPosition) + { + Content.GettingFocus += (_, _) => + { + this.FakeSettingsButton.Height = 10; + this.FakeSettingsButton.Height = 0; + }; + + this.SetWindowPosition(); + this._setPosition = true; + + AppWindow.Changed += (_, a) => + { + if (!a.DidPresenterChange) + { + return; + } + + this.SetWindowPosition(); + }; + } + + this.SetNavItems(); + } + + private void SetNavItems() + { + // Populate the window selector with the current application IDs if it is empty. + // TO DO: Check if Settings button is considered an item too. + if (this.WindowSelector.MenuItems.Count == 0) + { + string defaultShellName = ManifestInterpreter.GetIndexYamlFile().DefaultShellName; + + foreach (var (item, executablePath) in this._currentApplicationIds) + { + if (item == defaultShellName) + { + this.WindowSelector.MenuItems.Add(new NavigationViewItem { Name = item, Content = "Windows", Icon = new FontIcon() { Glyph = "\xE770" } }); + } + else + { + try + { + IconElement icon = BuildNavIcon(executablePath); + this.WindowSelector.MenuItems.Add(new NavigationViewItem { Name = item, Content = ManifestInterpreter.GetShortcutsOfApplication(item).Name, Icon = icon }); + } + catch (IOException ex) + { + Logger.LogError($"Failed to build nav item for application '{item}' (executable '{executablePath}').", ex); + } + } + } + + if (this.WindowSelector.MenuItems.Count > 0) + { + this.WindowSelector.SelectedItem = this.WindowSelector.MenuItems[0]; + } + } + } + + private static IconElement BuildNavIcon(string? executablePath) + { + BitmapImage? bitmap = IconHelper.TryGetExecutableIcon(executablePath); + if (bitmap is not null) + { + return new ImageIcon { Source = bitmap }; + } + + return new FontIcon { Glyph = "\uEB91" }; + } + + private bool _hasMovedToRightMonitor; + + private void SetWindowPosition() + { + if (!this._hasMovedToRightMonitor) + { + NativeMethods.GetCursorPos(out NativeMethods.POINT lpPoint); + AppWindow.Move(new NativeMethods.POINT { Y = lpPoint.Y - ((int)Height / 2), X = lpPoint.X - ((int)Width / 2) }); + this._hasMovedToRightMonitor = true; + } + + var hwnd = WindowNative.GetWindowHandle(this); + float dpi = DpiHelper.GetDPIScaleForWindow(hwnd); + Rect monitorRect = DisplayHelper.GetWorkAreaForDisplayWithWindow(hwnd); + + var windowPosition = (ShortcutGuideWindowPosition)App.ShortcutGuideProperties.WindowPosition.Value; + var taskbarWindow = App.TaskBarWindow.AppWindow; + bool taskbarOnLeft = taskbarWindow.IsVisible && taskbarWindow.Position.X < AppWindow.Position.X + Width && windowPosition == ShortcutGuideWindowPosition.Left; + bool taskbarOnRight = taskbarWindow.IsVisible && taskbarWindow.Position.X + taskbarWindow.Size.Width > AppWindow.Position.X && windowPosition == ShortcutGuideWindowPosition.Right; + + double newHeight = monitorRect.Height / dpi; + if (taskbarOnLeft || taskbarOnRight) + { + newHeight -= taskbarWindow.Size.Height; + } + + MaxHeight = newHeight; + MinHeight = newHeight; + Height = newHeight; + + int xPosition = windowPosition == ShortcutGuideWindowPosition.Right + ? (int)(monitorRect.X + monitorRect.Width) - (int)(Width * dpi) + : (int)monitorRect.X; + + this.MoveAndResize(xPosition, (int)monitorRect.Y, Width, Height); + } + + /// + /// Tracks whether the taskbar window was activated. So that the main window does not close. + /// + private bool _taskBarWindowActivated; + + private void WindowSelector_SelectionChanged(NavigationView sender, NavigationViewSelectionChangedEventArgs args) + { + if (args.SelectedItem is not NavigationViewItem selectedItem) + { + return; + } + + this._selectedAppName = selectedItem.Name; + App.CurrentAppName = this._selectedAppName; + this._shortcutFile = ManifestInterpreter.GetShortcutsOfApplication(this._selectedAppName); + + App.TaskBarWindow.Hide(); + if (this._shortcutFile is ShortcutFile file) + { + // Show the taskbar button window only when the selected app exposes the section. + if (file.Shortcuts is not null && file.Shortcuts.Any(c => c.SectionName?.StartsWith("", StringComparison.Ordinal) == true)) + { + this._taskBarWindowActivated = true; + App.TaskBarWindow.Activate(); + } + + // Reposition before navigating so the taskbar window does not clip into the main window. + this.SetWindowPosition(); + this.ContentFrame.Navigate( + typeof(ShortcutsPage), + new ShortcutPageNavParam { ShortcutFile = file, AppName = this._selectedAppName }); + } + } + + private void Settings_Tapped(object sender, TappedRoutedEventArgs e) + { + SettingsDeepLink.OpenSettings(SettingsDeepLink.SettingsWindow.ShortcutGuide); + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Pages/ShortcutsPage.xaml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Pages/ShortcutsPage.xaml new file mode 100644 index 0000000000..15f1c8c832 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Pages/ShortcutsPage.xaml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Pages/ShortcutsPage.xaml.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Pages/ShortcutsPage.xaml.cs new file mode 100644 index 0000000000..5c08278fae --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Pages/ShortcutsPage.xaml.cs @@ -0,0 +1,158 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Collections.Generic; +using System.Collections.ObjectModel; +using System.Linq; +using Common.UI; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Navigation; +using ShortcutGuide.Helpers; +using ShortcutGuide.Models; +using ShortcutGuide.ViewModels; + +namespace ShortcutGuide.Pages +{ + /// + /// Displays every category of shortcuts for the selected application as a single, + /// flat virtualized list (Pinned, Recommended, each category, Taskbar). + /// The list is flat — header / subtitle / shortcut / empty-placeholder rows share one + /// ItemsRepeater — so virtualization realizes only rows in the viewport instead of + /// every row of every realized section. + /// + public sealed partial class ShortcutsPage : Page + { + private const string TaskbarSectionMarker = ""; + + private ShortcutFile? _shortcutFile; + private string _appName = string.Empty; + + public ObservableCollection Rows { get; } = new(); + + public ShortcutsPage() + { + this.InitializeComponent(); + this.Unloaded += (_, _) => PinnedShortcutsHelper.PinnedShortcutsChanged -= this.OnPinnedShortcutsChanged; + } + + protected override void OnNavigatedTo(NavigationEventArgs e) + { + if (e.Parameter is ShortcutPageNavParam param) + { + this._appName = param.AppName; + this._shortcutFile = param.ShortcutFile; + this.RebuildRows(); + } + + PinnedShortcutsHelper.PinnedShortcutsChanged -= this.OnPinnedShortcutsChanged; + PinnedShortcutsHelper.PinnedShortcutsChanged += this.OnPinnedShortcutsChanged; + } + + protected override void OnNavigatedFrom(NavigationEventArgs e) + { + PinnedShortcutsHelper.PinnedShortcutsChanged -= this.OnPinnedShortcutsChanged; + } + + private void RebuildRows() + { + this.Rows.Clear(); + + if (this._shortcutFile is not { } file) + { + return; + } + + // 1. Pinned (always shown, with empty-state placeholder). + this.Rows.Add(ShortcutListItem.Header( + ResourceLoaderInstance.ResourceLoader.GetString("PinnedHeaderTxt/Text"))); + var pinned = App.PinnedShortcuts.TryGetValue(this._appName, out var pinnedItems) + ? (IReadOnlyList)pinnedItems + : Array.Empty(); + if (pinned.Count == 0) + { + this.Rows.Add(ShortcutListItem.Empty( + ResourceLoaderInstance.ResourceLoader.GetString("PinnedEmptyText/Text"))); + } + else + { + foreach (var s in pinned) + { + this.Rows.Add(ShortcutListItem.ForShortcut(s)); + } + } + + // 2. Recommended (only if non-empty). + var recommended = file.Shortcuts? + .SelectMany(c => c.Properties ?? Array.Empty()) + .Where(s => s.Recommended) + .ToList() ?? new List(); + if (recommended.Count > 0) + { + this.Rows.Add(ShortcutListItem.Header( + ResourceLoaderInstance.ResourceLoader.GetString("RecommendedHeaderText/Text"))); + foreach (var s in recommended) + { + this.Rows.Add(ShortcutListItem.ForShortcut(s)); + } + } + + // 3. One section per real category (skip <...> meta sections). + ShortcutCategory? taskbarCategory = null; + if (file.Shortcuts is not null) + { + foreach (var category in file.Shortcuts) + { + string name = category.SectionName ?? string.Empty; + + // Taskbar marker may carry trailing text in the manifest (e.g. "Taskbar Shortcuts"); + // detect it by prefix and hand it off to the dedicated Taskbar section below. + if (name.StartsWith(TaskbarSectionMarker, StringComparison.Ordinal)) + { + taskbarCategory = category; + continue; + } + + if (name.StartsWith('<') && name.EndsWith('>')) + { + continue; + } + + var items = category.Properties ?? Array.Empty(); + if (items.Length == 0) + { + continue; + } + + this.Rows.Add(ShortcutListItem.Header(name)); + foreach (var s in items) + { + this.Rows.Add(ShortcutListItem.ForShortcut(s)); + } + } + } + + // 4. Taskbar (Windows only). + if (taskbarCategory is { } tb && tb.Properties is { Length: > 0 } taskbarItems) + { + this.Rows.Add(ShortcutListItem.Header( + ResourceLoaderInstance.ResourceLoader.GetString("TaskbarHeaderTxt/Text"))); + this.Rows.Add(ShortcutListItem.Subtitle( + ResourceLoaderInstance.ResourceLoader.GetString("TaskbarDescriptionTxt/Text"))); + foreach (var s in taskbarItems) + { + this.Rows.Add(ShortcutListItem.ForShortcut(s)); + } + } + } + + private void OnPinnedShortcutsChanged(object? sender, string appName) + { + if (appName == this._appName) + { + this.RebuildRows(); + } + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Styles/CustomNavigationViewStyle.xaml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Styles/CustomNavigationViewStyle.xaml new file mode 100644 index 0000000000..e22448a45f --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/Styles/CustomNavigationViewStyle.xaml @@ -0,0 +1,1696 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 72 + 72 + 0 + 58 + 0 + + + + + + + + + + + + + + + + + + + + + --> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/TaskbarWindow.xaml b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/TaskbarWindow.xaml new file mode 100644 index 0000000000..0c8e9eabdc --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/TaskbarWindow.xaml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/TaskbarWindow.xaml.cs b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/TaskbarWindow.xaml.cs new file mode 100644 index 0000000000..fd8f741ea4 --- /dev/null +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/ShortcutGuideXAML/TaskbarWindow.xaml.cs @@ -0,0 +1,86 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Globalization; +using ManagedCommon; +using Microsoft.UI; +using Microsoft.UI.Xaml.Controls; +using Microsoft.UI.Xaml.Media; +using Microsoft.UI.Xaml.Shapes; +using ShortcutGuide.Controls; +using ShortcutGuide.Helpers; +using Windows.Foundation; +using WinRT.Interop; +using WinUIEx; +using static ShortcutGuide.NativeMethods; + +namespace ShortcutGuide.ShortcutGuideXAML +{ + public sealed partial class TaskbarWindow : WindowEx + { + private float DPI => DpiHelper.GetDPIScaleForWindow(WindowNative.GetWindowHandle(this)); + + private Rect WorkArea => DisplayHelper.GetWorkAreaForDisplayWithWindow(WindowNative.GetWindowHandle(this)); + + public TaskbarWindow() + { + this.InitializeComponent(); + this.UpdateTasklistButtons(); + this.Activated += (_, _) => this.UpdateTasklistButtons(); + } + + public void UpdateTasklistButtons() + { + // This move ensures the window spawns on the same monitor as the main window + AppWindow.MoveInZOrderAtBottom(); + AppWindow.Move(App.MainWindow.AppWindow.Position); + TasklistButton[] buttons = []; + try + { + buttons = TasklistPositions.GetButtons(); + } + catch (Exception ex) + { + Logger.LogError("Failed to enumerate taskbar buttons via TasklistPositions.GetButtons.", ex); + } + + if (buttons.Length == 0) + { + AppWindow.Hide(); + return; + } + + float dpi = this.DPI; + double windowsLogoColumnWidth = this.WindowsLogoColumnWidth.Width.Value; + double windowHeight = 58; + double windowMargin = 8 * dpi; + double windowWidth = windowsLogoColumnWidth; + double xPosition = buttons[0].X - (windowsLogoColumnWidth * dpi); + double yPosition = this.WorkArea.Bottom - (windowHeight * dpi); + + this.KeyHolder.Children.Clear(); + + foreach (TasklistButton b in buttons) + { + TaskbarIndicator indicator = new() + { + Label = b.Keynum >= 10 ? "0" : b.Keynum.ToString(CultureInfo.InvariantCulture), + Height = b.Height / dpi, + Width = b.Width / dpi, + }; + + windowWidth += indicator.Width; + + this.KeyHolder.Children.Add(indicator); + + double indicatorPos = (b.X - xPosition) / dpi; + Canvas.SetLeft(indicator, indicatorPos - windowsLogoColumnWidth); + } + + this.MoveAndResize(xPosition - windowMargin, yPosition, windowWidth + (2 * windowMargin), windowHeight); + AppWindow.MoveInZOrderAtTop(); + } + } +} diff --git a/src/modules/ShortcutGuide/ShortcutGuide/Resources.resx b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Strings/en-us/Resources.resw similarity index 61% rename from src/modules/ShortcutGuide/ShortcutGuide/Resources.resx rename to src/modules/ShortcutGuide/ShortcutGuide.Ui/Strings/en-us/Resources.resw index 34942e7a52..b72df023c7 100644 --- a/src/modules/ShortcutGuide/ShortcutGuide/Resources.resx +++ b/src/modules/ShortcutGuide/ShortcutGuide.Ui/Strings/en-us/Resources.resw @@ -1,4 +1,4 @@ - + + true/PM + PerMonitorV2, PerMonitor + + + + + + + + + diff --git a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/0.svg b/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/0.svg deleted file mode 100644 index b797f8b7ef..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/0.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/1.svg b/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/1.svg deleted file mode 100644 index 6e1e3d28f1..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/1.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/2.svg b/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/2.svg deleted file mode 100644 index 5183242c1b..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/2.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/3.svg b/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/3.svg deleted file mode 100644 index 63ad68f061..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/3.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/4.svg b/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/4.svg deleted file mode 100644 index 4f7e36f8bd..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/4.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/5.svg b/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/5.svg deleted file mode 100644 index 0fd52f6585..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/5.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/6.svg b/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/6.svg deleted file mode 100644 index 00303cdb32..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/6.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/7.svg b/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/7.svg deleted file mode 100644 index cce8aedbaa..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/7.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/8.svg b/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/8.svg deleted file mode 100644 index 57f4856b6b..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/8.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/9.svg b/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/9.svg deleted file mode 100644 index 2e0f33c493..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/9.svg +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/no_active_window.svg b/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/no_active_window.svg deleted file mode 100644 index 69d390bd08..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/no_active_window.svg +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/overlay.svg b/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/overlay.svg deleted file mode 100644 index fff83ab395..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/overlay.svg +++ /dev/null @@ -1,205 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/overlay_portrait.svg b/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/overlay_portrait.svg deleted file mode 100644 index 82c0314973..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/Assets/ShortcutGuide/overlay_portrait.svg +++ /dev/null @@ -1,208 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/PropertySheet.props b/src/modules/ShortcutGuide/ShortcutGuide/PropertySheet.props deleted file mode 100644 index b0c622690f..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/PropertySheet.props +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.base.rc b/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.base.rc deleted file mode 100644 index 1f88309dd2..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.base.rc +++ /dev/null @@ -1,54 +0,0 @@ -#include -#include "Generated Files/resource.h" -#include "../../../../common/version/version.h" - -#define APSTUDIO_READONLY_SYMBOLS -#include "winres.h" -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -IDI_ICON1 ICON "Shortcut-Guide.ico" - - ///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION FILE_VERSION - PRODUCTVERSION PRODUCT_VERSION - FILEFLAGSMASK VS_FFI_FILEFLAGSMASK -#ifdef _DEBUG - FILEFLAGS VS_FF_DEBUG -#else - FILEFLAGS 0x0L -#endif - FILEOS VOS_NT_WINDOWS32 - FILETYPE VFT_DLL - FILESUBTYPE VFT2_UNKNOWN -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904b0" - BEGIN - VALUE "CompanyName", COMPANY_NAME - VALUE "FileDescription", FILE_DESCRIPTION - VALUE "FileVersion", FILE_VERSION_STRING - VALUE "InternalName", INTERNAL_NAME - VALUE "LegalCopyright", COPYRIGHT_NOTE - VALUE "OriginalFilename", ORIGINAL_FILENAME - VALUE "ProductName", PRODUCT_NAME - VALUE "ProductVersion", PRODUCT_VERSION_STRING - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.exe.manifest b/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.exe.manifest deleted file mode 100644 index 4747d3bd23..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.exe.manifest +++ /dev/null @@ -1,9 +0,0 @@ - - - - - true/PM - PerMonitorV2 - - - \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.vcxproj b/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.vcxproj deleted file mode 100644 index 374dc951de..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.vcxproj +++ /dev/null @@ -1,193 +0,0 @@ - - - - - - - - - true - true - true - true - 15.0 - {2edb3eb4-fa92-4bff-b2d8-566584837231} - Win32Proj - ShortcutGuide - - - Application - - v141 - v142 - Unicode - - - true - true - - - false - true - false - - - - - - - - - - - - - - - PowerToys.$(MSBuildProjectName) - - - $(RepoRoot)$(Platform)\$(Configuration)\ - - - - ;$(RepoRoot)src\common\inc;$(RepoRoot)src\common\Telemetry;$(RepoRoot)src\;..\;%(AdditionalIncludeDirectories) - - - ole32.lib;Shell32.lib;OleAut32.lib;Dbghelp.lib;Dwmapi.lib;Dcomp.lib;Shlwapi.lib;%(AdditionalDependencies) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Create - - - - - - - - - - - - Document - $(OutDir)\Assets\ShortcutGuide - - - Document - $(OutDir)\Assets\ShortcutGuide - - - Document - $(OutDir)\Assets\ShortcutGuide - - - Document - $(OutDir)\Assets\ShortcutGuide - - - Document - $(OutDir)\Assets\ShortcutGuide - - - Document - $(OutDir)\Assets\ShortcutGuide - - - Document - $(OutDir)\Assets\ShortcutGuide - - - Document - $(OutDir)\Assets\ShortcutGuide - - - Document - $(OutDir)\Assets\ShortcutGuide - - - Document - $(OutDir)\Assets\ShortcutGuide - - - Document - $(OutDir)\Assets\ShortcutGuide - - - Document - $(OutDir)\Assets\ShortcutGuide - - - Document - $(OutDir)\Assets\ShortcutGuide - - - - - {caba8dfb-823b-4bf2-93ac-3f31984150d9} - - - {d9b8fc84-322a-4f9f-bbb9-20915c47ddfd} - - - {6955446d-23f7-4023-9bb3-8657f904af99} - - - {8f021b46-362b-485c-bfba-ccf83e820cbd} - - - {98537082-0fdb-40de-abd8-0dc5a4269bab} - - - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.vcxproj.filters b/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.vcxproj.filters deleted file mode 100644 index 006a6196ef..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuide.vcxproj.filters +++ /dev/null @@ -1,141 +0,0 @@ - - - - - {4FC737F1-C7A5-4376-A066-2A32D752A2FF} - cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx - - - {93995380-89BD-4b04-88EB-625FBE52EBFB} - h;hh;hpp;hxx;hm;inl;inc;xsd - - - {67DA6AB6-F800-4c08-8B7A-83BB121AAD01} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;svg;tiff;tif;png;wav;mfcribbon-ms - - - {cb917ac7-30da-494b-81f1-cbe4415e91f4} - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Resource Files - - - Generated Files - - - Header Files - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - - Resource Files - - - - - - Resource Files - - - - - Resource Files - - - - - Generated Files - - - - - Resource Files - - - - - - \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuideConstants.h b/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuideConstants.h deleted file mode 100644 index 3d0e434abf..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuideConstants.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once -#include - -namespace ShortcutGuideConstants -{ - // Name of the powertoy module. - inline const std::wstring ModuleKey = L"Shortcut Guide"; -} \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuideSettings.h b/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuideSettings.h deleted file mode 100644 index a39f2f2511..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/ShortcutGuideSettings.h +++ /dev/null @@ -1,13 +0,0 @@ -#pragma once -#include - -struct ShortcutGuideSettings -{ - std::wstring hotkey = L"shift+win+/"; - int overlayOpacity = 90; - std::wstring theme = L"system"; - std::wstring disabledApps = L""; - bool shouldReactToPressedWinKey = false; - int windowsKeyPressTimeForGlobalWindowsShortcuts = 900; - int windowsKeyPressTimeForTaskbarIconShortcuts = 900; -}; diff --git a/src/modules/ShortcutGuide/ShortcutGuide/animation.cpp b/src/modules/ShortcutGuide/ShortcutGuide/animation.cpp deleted file mode 100644 index 4bc039a3e2..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/animation.cpp +++ /dev/null @@ -1,51 +0,0 @@ -#include "pch.h" -#include "animation.h" - -Animation::Animation(double duration, double start, double stop) : - duration(duration), start_value(start), end_value(stop), start(std::chrono::high_resolution_clock::now()) {} - -void Animation::reset() -{ - start = std::chrono::high_resolution_clock::now(); -} -void Animation::reset(double animation_duration) -{ - duration = animation_duration; - reset(); -} -void Animation::reset(double animation_duration, double animation_start, double animation_stop) -{ - start_value = animation_start; - end_value = animation_stop; - reset(animation_duration); -} - -static double ease_out_expo(double t) -{ - return 1 - pow(2, -8 * t); -} - -double Animation::apply_animation_function(double t, AnimFunctions apply_function) -{ - switch (apply_function) - { - case EASE_OUT_EXPO: - return ease_out_expo(t); - case LINEAR: - default: - return t; - } -} - -double Animation::value(AnimFunctions apply_function) const -{ - auto anim_duration = std::chrono::high_resolution_clock::now() - start; - double t = std::chrono::duration(anim_duration).count() / duration; - if (t >= 1) - return end_value; - return start_value + (end_value - start_value) * apply_animation_function(t, apply_function); -} -bool Animation::done() const -{ - return std::chrono::high_resolution_clock::now() - start >= std::chrono::duration(duration); -} diff --git a/src/modules/ShortcutGuide/ShortcutGuide/animation.h b/src/modules/ShortcutGuide/ShortcutGuide/animation.h deleted file mode 100644 index 61ae59b661..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/animation.h +++ /dev/null @@ -1,34 +0,0 @@ -#pragma once -#include - -/* - Usage: - When creating animation constructor takes one parameter - how long - should the animation take in seconds. - - Call reset() when starting animation. - - When rendering, call value() to get value from 0 to 1 - depending on animation - progress. -*/ -class Animation -{ -public: - enum AnimFunctions - { - LINEAR = 0, - EASE_OUT_EXPO - }; - - Animation(double duration = 1, double start = 0, double stop = 1); - void reset(); - void reset(double animation_duration); - void reset(double animation_duration, double animation_start, double animation_stop); - double value(AnimFunctions apply_function) const; - bool done() const; - -private: - static double apply_animation_function(double t, AnimFunctions apply_function); - std::chrono::high_resolution_clock::time_point start; - double start_value, end_value, duration; -}; diff --git a/src/modules/ShortcutGuide/ShortcutGuide/d2d_svg.cpp b/src/modules/ShortcutGuide/ShortcutGuide/d2d_svg.cpp deleted file mode 100644 index 0f01aaf403..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/d2d_svg.cpp +++ /dev/null @@ -1,120 +0,0 @@ -#include "pch.h" -#include "d2d_svg.h" - -D2DSVG& D2DSVG::load(const std::wstring& filename, ID2D1DeviceContext5* d2d_dc) -{ - svg = nullptr; - winrt::com_ptr svg_stream; - auto h = SHCreateStreamOnFileEx(filename.c_str(), - STGM_READ, - FILE_ATTRIBUTE_NORMAL, - FALSE, - nullptr, - svg_stream.put()); - winrt::check_hresult(h); - - auto h1 = d2d_dc->CreateSvgDocument( - svg_stream.get(), - D2D1::SizeF(1, 1), - svg.put()); - - winrt::check_hresult(h1); - - winrt::com_ptr root; - svg->GetRoot(root.put()); - float tmp; - winrt::check_hresult(root->GetAttributeValue(L"width", &tmp)); - svg_width = static_cast(tmp); - winrt::check_hresult(root->GetAttributeValue(L"height", &tmp)); - svg_height = static_cast(tmp); - return *this; -} - -D2DSVG& D2DSVG::resize(int x, int y, int width, int height, float fill, float max_scale) -{ - // Center - transform = D2D1::Matrix3x2F::Identity(); - transform = transform * D2D1::Matrix3x2F::Translation((width - svg_width) / 2.0f, (height - svg_height) / 2.0f); - float h_scale = fill * height / svg_height; - float v_scale = fill * width / svg_width; - used_scale = std::min(h_scale, v_scale); - if (max_scale > 0) - { - used_scale = std::min(used_scale, max_scale); - } - transform = transform * D2D1::Matrix3x2F::Scale(used_scale, used_scale, D2D1::Point2F(width / 2.0f, height / 2.0f)); - transform = transform * D2D1::Matrix3x2F::Translation(static_cast(x), static_cast(y)); - return *this; -} - -D2DSVG& D2DSVG::recolor(uint32_t oldcolor, uint32_t newcolor) -{ - auto new_color = D2D1::ColorF(newcolor & 0xFFFFFF, 1); - auto old_color = D2D1::ColorF(oldcolor & 0xFFFFFF, 1); - std::function recurse = [&](ID2D1SvgElement* element) { - if (!element) - return; - if (element->IsAttributeSpecified(L"fill")) - { - D2D1_COLOR_F elem_fill; - winrt::com_ptr paint; - element->GetAttributeValue(L"fill", paint.put()); - paint->GetColor(&elem_fill); - if (elem_fill.r == old_color.r && elem_fill.g == old_color.g && elem_fill.b == old_color.b) - { - winrt::check_hresult(element->SetAttributeValue(L"fill", new_color)); - } - } - winrt::com_ptr sub; - element->GetFirstChild(sub.put()); - while (sub) - { - recurse(sub.get()); - winrt::com_ptr next; - element->GetNextChild(sub.get(), next.put()); - sub = next; - } - }; - winrt::com_ptr root; - svg->GetRoot(root.put()); - recurse(root.get()); - return *this; -} - -D2DSVG& D2DSVG::render(ID2D1DeviceContext5* d2d_dc) -{ - D2D1_MATRIX_3X2_F current; - d2d_dc->GetTransform(¤t); - d2d_dc->SetTransform(transform * current); - d2d_dc->DrawSvgDocument(svg.get()); - d2d_dc->SetTransform(current); - return *this; -} - -D2DSVG& D2DSVG::toggle_element(const wchar_t* id, bool visible) -{ - winrt::com_ptr element; - if (svg->FindElementById(id, element.put()) != S_OK) - return *this; - if (!element) - return *this; - element->SetAttributeValue(L"display", visible ? D2D1_SVG_DISPLAY::D2D1_SVG_DISPLAY_INLINE : D2D1_SVG_DISPLAY::D2D1_SVG_DISPLAY_NONE); - return *this; -} - -winrt::com_ptr D2DSVG::find_element(const std::wstring& id) -{ - winrt::com_ptr element; - winrt::check_hresult(svg->FindElementById(id.c_str(), element.put())); - return element; -} - -D2D1_RECT_F D2DSVG::rescale(D2D1_RECT_F rect) -{ - D2D1_RECT_F result; - auto src = reinterpret_cast(&rect); - auto dst = reinterpret_cast(&result); - dst[0] = src[0] * transform; - dst[1] = src[1] * transform; - return result; -} diff --git a/src/modules/ShortcutGuide/ShortcutGuide/d2d_svg.h b/src/modules/ShortcutGuide/ShortcutGuide/d2d_svg.h deleted file mode 100644 index 08869b2de1..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/d2d_svg.h +++ /dev/null @@ -1,26 +0,0 @@ -#pragma once -#include -#include -#include -#include - -class D2DSVG -{ -public: - D2DSVG& load(const std::wstring& filename, ID2D1DeviceContext5* d2d_dc); - D2DSVG& resize(int x, int y, int width, int height, float fill, float max_scale = -1.0f); - D2DSVG& render(ID2D1DeviceContext5* d2d_dc); - D2DSVG& recolor(uint32_t oldcolor, uint32_t newcolor); - float get_scale() const { return used_scale; } - int width() const { return svg_width; } - int height() const { return svg_height; } - D2DSVG& toggle_element(const wchar_t* id, bool visible); - winrt::com_ptr find_element(const std::wstring& id); - D2D1_RECT_F rescale(D2D1_RECT_F rect); - -protected: - float used_scale = 1.0f; - winrt::com_ptr svg; - int svg_width = -1, svg_height = -1; - D2D1::Matrix3x2F transform; -}; diff --git a/src/modules/ShortcutGuide/ShortcutGuide/d2d_text.cpp b/src/modules/ShortcutGuide/ShortcutGuide/d2d_text.cpp deleted file mode 100644 index 7f25c4e32c..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/d2d_text.cpp +++ /dev/null @@ -1,54 +0,0 @@ -#include "pch.h" -#include "d2d_text.h" - -D2DText::D2DText(float text_size, float scale) -{ - winrt::check_hresult(DWriteCreateFactory(DWRITE_FACTORY_TYPE_SHARED, __uuidof(factory), reinterpret_cast(factory.put_void()))); - resize(text_size, scale); - winrt::check_hresult(format->SetTextAlignment(DWRITE_TEXT_ALIGNMENT_CENTER)); - winrt::check_hresult(format->SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT_CENTER)); -} - -D2DText& D2DText::resize(float text_size, float scale) -{ - format = nullptr; - winrt::check_hresult(factory->CreateTextFormat(L"Segoe UI", - nullptr, - DWRITE_FONT_WEIGHT_NORMAL, - DWRITE_FONT_STYLE_NORMAL, - DWRITE_FONT_STRETCH_NORMAL, - text_size * scale, - L"en-us", - format.put())); - winrt::check_hresult(format->SetParagraphAlignment(DWRITE_PARAGRAPH_ALIGNMENT_CENTER)); - return *this; -} - -D2DText& D2DText::set_alignment_left() -{ - winrt::check_hresult(format->SetTextAlignment(DWRITE_TEXT_ALIGNMENT_LEADING)); - return *this; -} - -D2DText& D2DText::set_alignment_center() -{ - winrt::check_hresult(format->SetTextAlignment(DWRITE_TEXT_ALIGNMENT_CENTER)); - return *this; -} - -D2DText& D2DText::set_alignment_right() -{ - winrt::check_hresult(format->SetTextAlignment(DWRITE_TEXT_ALIGNMENT_TRAILING)); - return *this; -} - -void D2DText::write(ID2D1DeviceContext5* d2d_dc, D2D1_COLOR_F color, D2D1_RECT_F rect, std::wstring text) -{ - winrt::com_ptr brush; - d2d_dc->CreateSolidColorBrush(color, brush.put()); - d2d_dc->DrawText(text.c_str(), - static_cast(text.length()), - format.get(), - rect, - brush.get()); -} diff --git a/src/modules/ShortcutGuide/ShortcutGuide/d2d_text.h b/src/modules/ShortcutGuide/ShortcutGuide/d2d_text.h deleted file mode 100644 index 513dc120e5..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/d2d_text.h +++ /dev/null @@ -1,18 +0,0 @@ -#pragma once -#include -#include - -class D2DText -{ -public: - D2DText(float text_size = 15.0f, float scale = 1.0f); - D2DText& resize(float text_size, float scale); - D2DText& set_alignment_left(); - D2DText& set_alignment_center(); - D2DText& set_alignment_right(); - void write(ID2D1DeviceContext5* d2d_dc, D2D1_COLOR_F color, D2D1_RECT_F rect, std::wstring text); - -private: - winrt::com_ptr factory; - winrt::com_ptr format; -}; diff --git a/src/modules/ShortcutGuide/ShortcutGuide/d2d_window.cpp b/src/modules/ShortcutGuide/ShortcutGuide/d2d_window.cpp deleted file mode 100644 index f4bf7e9cf6..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/d2d_window.cpp +++ /dev/null @@ -1,211 +0,0 @@ -#include "pch.h" -#include "d2d_window.h" - -#include - -D2DWindow::D2DWindow() -{ - static const WCHAR* class_name = L"PToyD2DPopup"; - WNDCLASS wc = {}; - wc.hCursor = LoadCursor(nullptr, IDC_ARROW); - wc.hInstance = reinterpret_cast(&__ImageBase); - wc.lpszClassName = class_name; - wc.style = CS_HREDRAW | CS_VREDRAW; - wc.lpfnWndProc = d2d_window_proc; - RegisterClass(&wc); - hwnd = CreateWindowExW(WS_EX_TOOLWINDOW | WS_EX_TOPMOST | WS_EX_NOREDIRECTIONBITMAP | WS_EX_LAYERED, - wc.lpszClassName, - L"PToyD2DPopup", - WS_POPUP | WS_VISIBLE, - CW_USEDEFAULT, - CW_USEDEFAULT, - CW_USEDEFAULT, - CW_USEDEFAULT, - nullptr, - nullptr, - wc.hInstance, - this); - WINRT_VERIFY(hwnd); -} - -void D2DWindow::show(UINT x, UINT y, UINT width, UINT height) -{ - if (!initialized) - { - base_init(); - } - base_resize(width, height); - render_empty(); - hidden = false; - on_show(); - SetWindowPos(hwnd, HWND_TOPMOST, x, y, width, height, 0); - ShowWindow(hwnd, SW_SHOWNORMAL); - SetForegroundWindow(hwnd); - UpdateWindow(hwnd); -} - -void D2DWindow::hide() -{ - hidden = true; - ShowWindow(hwnd, SW_HIDE); - on_hide(); -} - -void D2DWindow::initialize() -{ - base_init(); -} - -void D2DWindow::base_init() -{ - std::unique_lock lock(mutex); - // D2D1Factory is independent from the device, no need to recreate it if we need to recreate the device. - if (!d2d_factory) - { -#ifdef _DEBUG - D2D1_FACTORY_OPTIONS options = { D2D1_DEBUG_LEVEL_INFORMATION }; -#else - D2D1_FACTORY_OPTIONS options = {}; -#endif - winrt::check_hresult(D2D1CreateFactory(D2D1_FACTORY_TYPE_MULTI_THREADED, - __uuidof(d2d_factory), - &options, - d2d_factory.put_void())); - } - // For all other stuff - assign nullptr first to release the object, to reset the com_ptr. - d2d_dc = nullptr; - d2d_device = nullptr; - dxgi_factory = nullptr; - dxgi_device = nullptr; - d3d_device = nullptr; - winrt::check_hresult(D3D11CreateDevice(nullptr, - D3D_DRIVER_TYPE_HARDWARE, - nullptr, - D3D11_CREATE_DEVICE_BGRA_SUPPORT, - nullptr, - 0, - D3D11_SDK_VERSION, - d3d_device.put(), - nullptr, - nullptr)); - winrt::check_hresult(d3d_device->QueryInterface(__uuidof(dxgi_device), dxgi_device.put_void())); - winrt::check_hresult(CreateDXGIFactory2(0, __uuidof(dxgi_factory), dxgi_factory.put_void())); - winrt::check_hresult(d2d_factory->CreateDevice(dxgi_device.get(), d2d_device.put())); - winrt::check_hresult(d2d_device->CreateDeviceContext(D2D1_DEVICE_CONTEXT_OPTIONS_NONE, d2d_dc.put())); - init(); - initialized = true; -} - -void D2DWindow::base_resize(UINT width, UINT height) -{ - std::unique_lock lock(mutex); - if (!initialized) - { - return; - } - window_width = width; - window_height = height; - if (window_width == 0 || window_height == 0) - { - return; - } - DXGI_SWAP_CHAIN_DESC1 sc_description = {}; - sc_description.Format = DXGI_FORMAT_B8G8R8A8_UNORM; - sc_description.BufferUsage = DXGI_USAGE_RENDER_TARGET_OUTPUT; - sc_description.SwapEffect = DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL; - sc_description.BufferCount = 2; - sc_description.SampleDesc.Count = 1; - sc_description.AlphaMode = DXGI_ALPHA_MODE_PREMULTIPLIED; - sc_description.Width = window_width; - sc_description.Height = window_height; - dxgi_swap_chain = nullptr; - winrt::check_hresult(dxgi_factory->CreateSwapChainForComposition(dxgi_device.get(), - &sc_description, - nullptr, - dxgi_swap_chain.put())); - composition_device = nullptr; - winrt::check_hresult(DCompositionCreateDevice(dxgi_device.get(), - __uuidof(composition_device), - composition_device.put_void())); - - composition_target = nullptr; - winrt::check_hresult(composition_device->CreateTargetForHwnd(hwnd, true, composition_target.put())); - - composition_visual = nullptr; - winrt::check_hresult(composition_device->CreateVisual(composition_visual.put())); - winrt::check_hresult(composition_visual->SetContent(dxgi_swap_chain.get())); - winrt::check_hresult(composition_target->SetRoot(composition_visual.get())); - - dxgi_surface = nullptr; - winrt::check_hresult(dxgi_swap_chain->GetBuffer(0, __uuidof(dxgi_surface), dxgi_surface.put_void())); - D2D1_BITMAP_PROPERTIES1 properties = {}; - properties.pixelFormat.alphaMode = D2D1_ALPHA_MODE_PREMULTIPLIED; - properties.pixelFormat.format = DXGI_FORMAT_B8G8R8A8_UNORM; - properties.bitmapOptions = D2D1_BITMAP_OPTIONS_TARGET | D2D1_BITMAP_OPTIONS_CANNOT_DRAW; - - d2d_bitmap = nullptr; - winrt::check_hresult(d2d_dc->CreateBitmapFromDxgiSurface(dxgi_surface.get(), - properties, - d2d_bitmap.put())); - d2d_dc->SetTarget(d2d_bitmap.get()); - resize(); -} - -void D2DWindow::base_render() -{ - std::unique_lock lock(mutex); - if (!initialized || !d2d_dc || !d2d_bitmap) - return; - d2d_dc->BeginDraw(); - render(d2d_dc.get()); - winrt::check_hresult(d2d_dc->EndDraw()); - winrt::check_hresult(dxgi_swap_chain->Present(1, 0)); - winrt::check_hresult(composition_device->Commit()); -} - -void D2DWindow::render_empty() -{ - std::unique_lock lock(mutex); - if (!initialized || !d2d_dc || !d2d_bitmap) - return; - d2d_dc->BeginDraw(); - d2d_dc->Clear(); - winrt::check_hresult(d2d_dc->EndDraw()); - winrt::check_hresult(dxgi_swap_chain->Present(1, 0)); - winrt::check_hresult(composition_device->Commit()); -} - -D2DWindow::~D2DWindow() -{ - ShowWindow(hwnd, SW_HIDE); - DestroyWindow(hwnd); -} - -D2DWindow* D2DWindow::this_from_hwnd(HWND window) -{ - return reinterpret_cast(GetWindowLongPtr(window, GWLP_USERDATA)); -} - -LRESULT __stdcall D2DWindow::d2d_window_proc(HWND window, UINT message, WPARAM wparam, LPARAM lparam) -{ - auto self = this_from_hwnd(window); - switch (message) - { - case WM_NCCREATE: - { - auto create_struct = reinterpret_cast(lparam); - SetWindowLongPtr(window, GWLP_USERDATA, reinterpret_cast(create_struct->lpCreateParams)); - return TRUE; - } - case WM_MOVE: - case WM_SIZE: - self->base_resize(static_cast(lparam) & 0xFFFF, static_cast(lparam) >> 16); - [[fallthrough]]; - case WM_PAINT: - self->base_render(); - return 0; - - default: - return DefWindowProc(window, message, wparam, lparam); - } -} diff --git a/src/modules/ShortcutGuide/ShortcutGuide/d2d_window.h b/src/modules/ShortcutGuide/ShortcutGuide/d2d_window.h deleted file mode 100644 index b062962d28..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/d2d_window.h +++ /dev/null @@ -1,66 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include "d2d_svg.h" - -#include -#include - -class D2DWindow -{ -public: - D2DWindow(); - void show(UINT x, UINT y, UINT width, UINT height); - void hide(); - void initialize(); - virtual ~D2DWindow(); - -protected: - // Implement this: - - // Initialization - called when D2D device needs to be created. - // When called all D2DWindow members will be initialized, including d2d_dc - virtual void init() = 0; - // resize - when called, window_width and window_height will have current window size - virtual void resize() = 0; - // render - called on WM_PAINT, BeginPaint/EndPaint is handled by D2DWindow - virtual void render(ID2D1DeviceContext5* d2d_dc) = 0; - // on_show, on_hide - called when the window is about to be shown or about to be hidden - virtual void on_show() = 0; - virtual void on_hide() = 0; - - static LRESULT __stdcall d2d_window_proc(HWND window, UINT message, WPARAM wparam, LPARAM lparam); - static D2DWindow* this_from_hwnd(HWND window); - - void base_init(); - void base_resize(UINT width, UINT height); - void base_render(); - void render_empty(); - - std::recursive_mutex mutex; - bool hidden = true; - bool initialized = false; - HWND hwnd; - UINT window_width{}; - UINT window_height{}; - winrt::com_ptr d3d_device; - winrt::com_ptr dxgi_device; - winrt::com_ptr dxgi_factory; - winrt::com_ptr dxgi_swap_chain; - winrt::com_ptr composition_device; - winrt::com_ptr composition_target; - winrt::com_ptr composition_visual; - winrt::com_ptr dxgi_surface; - winrt::com_ptr d2d_bitmap; - winrt::com_ptr d2d_factory; - winrt::com_ptr d2d_device; - winrt::com_ptr d2d_dc; -}; diff --git a/src/modules/ShortcutGuide/ShortcutGuide/main.cpp b/src/modules/ShortcutGuide/ShortcutGuide/main.cpp deleted file mode 100644 index 57a4491d41..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/main.cpp +++ /dev/null @@ -1,144 +0,0 @@ -#include "pch.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "shortcut_guide.h" -#include "target_state.h" -#include "ShortcutGuideConstants.h" -#include "trace.h" - -const std::wstring instanceMutexName = L"Local\\PowerToys_ShortcutGuide_InstanceMutex"; - -// set current path to the executable path -bool SetCurrentPath() -{ - TCHAR buffer[MAX_PATH] = { 0 }; - if (!GetModuleFileName(NULL, buffer, MAX_PATH)) - { - Logger::error(L"Failed to get module path. {}", get_last_error_or_default(GetLastError())); - return false; - } - - if (!PathRemoveFileSpec(buffer)) - { - Logger::error(L"Failed to remove file from module path. {}", get_last_error_or_default(GetLastError())); - return false; - } - - std::error_code err; - std::filesystem::current_path(buffer, err); - if (err.value()) - { - Logger::error("Failed to set current path. {}", err.message()); - return false; - } - - return true; -} - -int WINAPI wWinMain(_In_ HINSTANCE /*hInstance*/, _In_opt_ HINSTANCE /*hPrevInstance*/, _In_ PWSTR lpCmdLine, _In_ int /*nCmdShow*/) -{ - winrt::init_apartment(); - LoggerHelpers::init_logger(ShortcutGuideConstants::ModuleKey, L"ShortcutGuide", LogSettings::shortcutGuideLoggerName); - - Shared::Trace::ETWTrace trace; - trace.UpdateState(true); - - if (powertoys_gpo::getConfiguredShortcutGuideEnabledValue() == powertoys_gpo::gpo_rule_configured_disabled) - { - Logger::warn(L"Tried to start with a GPO policy setting the utility to always be disabled. Please contact your systems administrator."); - return 0; - } - - InitUnhandledExceptionHandler(); - Logger::trace("Starting Shortcut Guide"); - - if (!SetCurrentPath()) - { - return false; - } - - Trace::RegisterProvider(); - if (std::wstring(lpCmdLine).find(L' ') != std::wstring::npos) - { - Logger::trace("Sending settings telemetry"); - auto settings = OverlayWindow::GetSettings(); - Trace::SendSettings(settings); - Trace::UnregisterProvider(); - return 0; - } - - auto mutex = CreateMutex(nullptr, true, instanceMutexName.c_str()); - if (mutex == nullptr) - { - Logger::error(L"Failed to create mutex. {}", get_last_error_or_default(GetLastError())); - } - - if (GetLastError() == ERROR_ALREADY_EXISTS) - { - Logger::warn(L"Shortcut Guide instance is already running"); - Trace::UnregisterProvider(); - return 0; - } - - std::wstring pid = std::wstring(lpCmdLine); - if (!pid.empty()) - { - auto mainThreadId = GetCurrentThreadId(); - ProcessWaiter::OnProcessTerminate(pid, [mainThreadId](int err) { - if (err != ERROR_SUCCESS) - { - Logger::error(L"Failed to wait for parent process exit. {}", get_last_error_or_default(err)); - } - else - { - Logger::trace(L"PowerToys runner exited."); - } - - Logger::trace(L"Exiting Shortcut Guide"); - PostThreadMessage(mainThreadId, WM_QUIT, 0, 0); - }); - } - - auto hwnd = GetForegroundWindow(); - auto window = OverlayWindow(hwnd); - EventWaiter exitEventWaiter; - if (window.IsDisabled()) - { - Logger::trace("SG is disabled for the current foreground app. Exiting SG"); - Trace::UnregisterProvider(); - return 0; - } - else - { - auto mainThreadId = GetCurrentThreadId(); - exitEventWaiter.start(CommonSharedConstants::SHORTCUT_GUIDE_EXIT_EVENT, [mainThreadId, &window](DWORD err) { - if (err != ERROR_SUCCESS) - { - Logger::error(L"Failed to wait for {} event. {}", CommonSharedConstants::SHORTCUT_GUIDE_EXIT_EVENT, get_last_error_or_default(err)); - } - else - { - Logger::trace(L"{} event was signaled", CommonSharedConstants::SHORTCUT_GUIDE_EXIT_EVENT); - } - - window.CloseWindow(HideWindowType::THE_SHORTCUT_PRESSED, mainThreadId); - }); - } - - window.ShowWindow(); - run_message_loop(); - - trace.Flush(); - Trace::UnregisterProvider(); - return 0; -} diff --git a/src/modules/ShortcutGuide/ShortcutGuide/native_event_waiter.cpp b/src/modules/ShortcutGuide/ShortcutGuide/native_event_waiter.cpp deleted file mode 100644 index b038ea4ffd..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/native_event_waiter.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include "pch.h" -#include "native_event_waiter.h" - -void NativeEventWaiter::run() -{ - while (!aborting) - { - auto result = WaitForSingleObject(event_handle, timeout); - if (!aborting && result == WAIT_OBJECT_0) - { - action(); - } - } -} - -NativeEventWaiter::NativeEventWaiter(const std::wstring& event_name, std::function action) -{ - event_handle = CreateEventW(NULL, FALSE, FALSE, event_name.c_str()); - this->action = action; - running_thread = std::thread([&]() { run(); }); -} - -NativeEventWaiter::~NativeEventWaiter() -{ - aborting = true; - SetEvent(event_handle); - running_thread.join(); - CloseHandle(event_handle); -} diff --git a/src/modules/ShortcutGuide/ShortcutGuide/native_event_waiter.h b/src/modules/ShortcutGuide/ShortcutGuide/native_event_waiter.h deleted file mode 100644 index d7dcaa603e..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/native_event_waiter.h +++ /dev/null @@ -1,19 +0,0 @@ -#pragma once -#include "pch.h" -#include "common/interop/shared_constants.h" - -class NativeEventWaiter -{ - static const int timeout = 1000; - - HANDLE event_handle = nullptr; - std::function action = nullptr; - std::atomic aborting = false; - - void run(); - std::thread running_thread; - -public: - NativeEventWaiter(const std::wstring& event_name, std::function action); - ~NativeEventWaiter(); -}; diff --git a/src/modules/ShortcutGuide/ShortcutGuide/overlay_window.cpp b/src/modules/ShortcutGuide/ShortcutGuide/overlay_window.cpp deleted file mode 100644 index 825bd10a1f..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/overlay_window.cpp +++ /dev/null @@ -1,947 +0,0 @@ -#include "pch.h" -#include "overlay_window.h" -#include -#include "tasklist_positions.h" -#include "start_visible.h" -#include -#include -#include - -#include "shortcut_guide.h" -#include "trace.h" -#include "Generated Files/resource.h" - -namespace -{ - // Gets position of given window. - std::optional get_window_pos(HWND hwnd) - { - RECT window; - if (DwmGetWindowAttribute(hwnd, DWMWA_EXTENDED_FRAME_BOUNDS, &window, sizeof(window)) == S_OK) - { - return window; - } - else - { - return {}; - } - } - - enum WindowState - { - UNKNOWN, - MINIMIZED, - MAXIMIZED, - SNAPPED_TOP_LEFT, - SNAPPED_LEFT, - SNAPPED_BOTTOM_LEFT, - SNAPPED_TOP_RIGHT, - SNAPPED_RIGHT, - SNAPPED_BOTTOM_RIGHT, - RESTORED - }; - - inline WindowState get_window_state(HWND hwnd) - { - WINDOWPLACEMENT placement; - placement.length = sizeof(WINDOWPLACEMENT); - - if (GetWindowPlacement(hwnd, &placement) == 0) - { - return UNKNOWN; - } - - if (placement.showCmd == SW_MINIMIZE || placement.showCmd == SW_SHOWMINIMIZED || IsIconic(hwnd)) - { - return MINIMIZED; - } - - if (placement.showCmd == SW_MAXIMIZE || placement.showCmd == SW_SHOWMAXIMIZED) - { - return MAXIMIZED; - } - - auto rectp = get_window_pos(hwnd); - if (!rectp) - { - return UNKNOWN; - } - - auto rect = *rectp; - MONITORINFO monitor; - monitor.cbSize = sizeof(MONITORINFO); - auto h_monitor = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONEAREST); - GetMonitorInfo(h_monitor, &monitor); - bool top_left = monitor.rcWork.top == rect.top && monitor.rcWork.left == rect.left; - bool bottom_left = monitor.rcWork.bottom == rect.bottom && monitor.rcWork.left == rect.left; - bool top_right = monitor.rcWork.top == rect.top && monitor.rcWork.right == rect.right; - bool bottom_right = monitor.rcWork.bottom == rect.bottom && monitor.rcWork.right == rect.right; - - if (top_left && bottom_left) - return SNAPPED_LEFT; - if (top_left) - return SNAPPED_TOP_LEFT; - if (bottom_left) - return SNAPPED_BOTTOM_LEFT; - if (top_right && bottom_right) - return SNAPPED_RIGHT; - if (top_right) - return SNAPPED_TOP_RIGHT; - if (bottom_right) - return SNAPPED_BOTTOM_RIGHT; - - return RESTORED; - } - -} - -D2DOverlaySVG& D2DOverlaySVG::load(const std::wstring& filename, ID2D1DeviceContext5* d2d_dc) -{ - D2DSVG::load(filename, d2d_dc); - window_group = nullptr; - thumbnail_top_left = {}; - thumbnail_bottom_right = {}; - thumbnail_scaled_rect = {}; - return *this; -} - -D2DOverlaySVG& D2DOverlaySVG::resize(int x, int y, int width, int height, float fill, float max_scale) -{ - D2DSVG::resize(x, y, width, height, fill, max_scale); - if (thumbnail_bottom_right.x != 0 && thumbnail_bottom_right.y != 0) - { - auto scaled_top_left = transform.TransformPoint(thumbnail_top_left); - auto scanled_bottom_right = transform.TransformPoint(thumbnail_bottom_right); - thumbnail_scaled_rect.left = static_cast(scaled_top_left.x); - thumbnail_scaled_rect.top = static_cast(scaled_top_left.y); - thumbnail_scaled_rect.right = static_cast(scanled_bottom_right.x); - thumbnail_scaled_rect.bottom = static_cast(scanled_bottom_right.y); - } - return *this; -} - -D2DOverlaySVG& D2DOverlaySVG::find_thumbnail(const std::wstring& id) -{ - winrt::com_ptr thumbnail_box; - winrt::check_hresult(svg->FindElementById(id.c_str(), thumbnail_box.put())); - winrt::check_hresult(thumbnail_box->GetAttributeValue(L"x", &thumbnail_top_left.x)); - winrt::check_hresult(thumbnail_box->GetAttributeValue(L"y", &thumbnail_top_left.y)); - winrt::check_hresult(thumbnail_box->GetAttributeValue(L"width", &thumbnail_bottom_right.x)); - thumbnail_bottom_right.x += thumbnail_top_left.x; - winrt::check_hresult(thumbnail_box->GetAttributeValue(L"height", &thumbnail_bottom_right.y)); - thumbnail_bottom_right.y += thumbnail_top_left.y; - return *this; -} - -D2DOverlaySVG& D2DOverlaySVG::find_window_group(const std::wstring& id) -{ - window_group = nullptr; - winrt::check_hresult(svg->FindElementById(id.c_str(), window_group.put())); - return *this; -} - -ScaleResult D2DOverlaySVG::get_thumbnail_rect_and_scale(int x_offset, int y_offset, int window_cx, int window_cy, float fill) -{ - if (thumbnail_bottom_right.x == 0 && thumbnail_bottom_right.y == 0) - { - return {}; - } - int thumbnail_scaled_rect_width = thumbnail_scaled_rect.right - thumbnail_scaled_rect.left; - int thumbnail_scaled_rect_heigh = thumbnail_scaled_rect.bottom - thumbnail_scaled_rect.top; - if (thumbnail_scaled_rect_heigh == 0 || thumbnail_scaled_rect_width == 0 || - window_cx == 0 || window_cy == 0) - { - return {}; - } - float scale_h = fill * thumbnail_scaled_rect_width / window_cx; - float scale_v = fill * thumbnail_scaled_rect_heigh / window_cy; - float use_scale = std::min(scale_h, scale_v); - RECT thumb_rect; - thumb_rect.left = thumbnail_scaled_rect.left + static_cast(thumbnail_scaled_rect_width - use_scale * window_cx) / 2 + x_offset; - thumb_rect.right = thumbnail_scaled_rect.right - static_cast(thumbnail_scaled_rect_width - use_scale * window_cx) / 2 + x_offset; - thumb_rect.top = thumbnail_scaled_rect.top + static_cast(thumbnail_scaled_rect_heigh - use_scale * window_cy) / 2 + y_offset; - thumb_rect.bottom = thumbnail_scaled_rect.bottom - static_cast(thumbnail_scaled_rect_heigh - use_scale * window_cy) / 2 + y_offset; - ScaleResult result; - result.scale = use_scale; - result.rect = thumb_rect; - return result; -} - -winrt::com_ptr D2DOverlaySVG::find_element(const std::wstring& id) -{ - winrt::com_ptr element; - winrt::check_hresult(svg->FindElementById(id.c_str(), element.put())); - return element; -} - -D2DOverlaySVG& D2DOverlaySVG::toggle_window_group(bool active) -{ - if (window_group) - { - window_group->SetAttributeValue(L"fill-opacity", active ? 1.0f : 0.3f); - } - return *this; -} - -D2D1_RECT_F D2DOverlaySVG::get_maximize_label() const -{ - D2D1_RECT_F result; - auto height = thumbnail_scaled_rect.bottom - thumbnail_scaled_rect.top; - auto width = thumbnail_scaled_rect.right - thumbnail_scaled_rect.left; - if (width >= height) - { - result.top = thumbnail_scaled_rect.bottom + height * 0.210f; - result.bottom = thumbnail_scaled_rect.bottom + height * 0.310f; - result.left = thumbnail_scaled_rect.left + width * 0.009f; - result.right = thumbnail_scaled_rect.right + width * 0.009f; - } - else - { - result.top = thumbnail_scaled_rect.top + height * 0.323f; - result.bottom = thumbnail_scaled_rect.top + height * 0.398f; - result.left = static_cast(thumbnail_scaled_rect.right); - result.right = thumbnail_scaled_rect.right + width * 1.45f; - } - return result; -} -D2D1_RECT_F D2DOverlaySVG::get_minimize_label() const -{ - D2D1_RECT_F result; - auto height = thumbnail_scaled_rect.bottom - thumbnail_scaled_rect.top; - auto width = thumbnail_scaled_rect.right - thumbnail_scaled_rect.left; - if (width >= height) - { - result.top = thumbnail_scaled_rect.bottom + height * 0.8f; - result.bottom = thumbnail_scaled_rect.bottom + height * 0.9f; - result.left = thumbnail_scaled_rect.left + width * 0.009f; - result.right = thumbnail_scaled_rect.right + width * 0.009f; - } - else - { - result.top = thumbnail_scaled_rect.top + height * 0.725f; - result.bottom = thumbnail_scaled_rect.top + height * 0.800f; - result.left =static_cast(thumbnail_scaled_rect.right); - result.right = thumbnail_scaled_rect.right + width * 1.45f; - } - return result; -} -D2D1_RECT_F D2DOverlaySVG::get_snap_left() const -{ - D2D1_RECT_F result; - auto height = thumbnail_scaled_rect.bottom - thumbnail_scaled_rect.top; - auto width = thumbnail_scaled_rect.right - thumbnail_scaled_rect.left; - if (width >= height) - { - result.top = thumbnail_scaled_rect.bottom + height * 0.5f; - result.bottom = thumbnail_scaled_rect.bottom + height * 0.6f; - result.left = thumbnail_scaled_rect.left + width * 0.009f; - result.right = thumbnail_scaled_rect.left + width * 0.339f; - } - else - { - result.top = thumbnail_scaled_rect.top + height * 0.523f; - result.bottom = thumbnail_scaled_rect.top + height * 0.598f; - result.left = static_cast(thumbnail_scaled_rect.right); - result.right = thumbnail_scaled_rect.right + width * 0.450f; - } - return result; -} -D2D1_RECT_F D2DOverlaySVG::get_snap_right() const -{ - D2D1_RECT_F result; - auto height = thumbnail_scaled_rect.bottom - thumbnail_scaled_rect.top; - auto width = thumbnail_scaled_rect.right - thumbnail_scaled_rect.left; - if (width >= height) - { - result.top = thumbnail_scaled_rect.bottom + height * 0.5f; - result.bottom = thumbnail_scaled_rect.bottom + height * 0.6f; - result.left = thumbnail_scaled_rect.left + width * 0.679f; - result.right = thumbnail_scaled_rect.right + width * 1.009f; - } - else - { - result.top = thumbnail_scaled_rect.top + height * 0.523f; - result.bottom = thumbnail_scaled_rect.top + height * 0.598f; - result.left = static_cast(thumbnail_scaled_rect.right + width); - result.right = thumbnail_scaled_rect.right + width * 1.45f; - } - return result; -} - -D2DOverlayWindow::D2DOverlayWindow() : - total_screen({}), - D2DWindow() -{ - BOOL isEnabledAnimations = GetAnimationsEnabled(); - background_animation = isEnabledAnimations? 0.3f : 0.f; - global_windows_shortcuts_animation = isEnabledAnimations ? 0.3f : 0.f; - taskbar_icon_shortcuts_animation = isEnabledAnimations ? 0.3f : 0.f; - tasklist_thread = std::thread([&] { - while (running) - { - // Removing causes C3538 on std::unique_lock lock(mutex); in show(..) - std::unique_lock task_list_lock(tasklist_cv_mutex); - tasklist_cv.wait(task_list_lock, [&] { return !running || tasklist_update; }); - if (!running) - return; - task_list_lock.unlock(); - while (running && tasklist_update) - { - std::vector buttons; - if (tasklist.update_buttons(buttons)) - { - std::unique_lock lock(mutex); - tasklist_buttons.swap(buttons); - } - std::this_thread::sleep_for(std::chrono::milliseconds(500)); - } - } - }); -} - -void D2DOverlayWindow::show(HWND window, bool snappable) -{ - std::unique_lock lock(mutex); - hidden = false; - tasklist_buttons.clear(); - active_window = window; - active_window_snappable = snappable; - auto old_bck = colors.start_color_menu; - auto colors_updated = colors.update(); - auto new_light_mode = (theme_setting == Light) || (theme_setting == System && colors.light_mode); - if (initialized && (colors_updated || light_mode != new_light_mode)) - { - // update background colors - landscape.recolor(old_bck, colors.start_color_menu); - portrait.recolor(old_bck, colors.start_color_menu); - for (auto& arrow : arrows) - { - arrow.recolor(old_bck, colors.start_color_menu); - } - light_mode = new_light_mode; - if (light_mode) - { - landscape.recolor(0xDDDDDD, 0x222222); - portrait.recolor(0xDDDDDD, 0x222222); - for (auto& arrow : arrows) - { - arrow.recolor(0xDDDDDD, 0x222222); - } - } - else - { - landscape.recolor(0x222222, 0xDDDDDD); - portrait.recolor(0x222222, 0xDDDDDD); - for (auto& arrow : arrows) - { - arrow.recolor(0x222222, 0xDDDDDD); - } - } - } - monitors = MonitorInfo::GetMonitors(true); - // calculate the rect covering all the screens - total_screen = monitors[0].GetScreenSize(true); - for (auto& monitor : monitors) - { - const auto monitorSize = monitor.GetScreenSize(true); - total_screen.rect.left = std::min(total_screen.left(), monitorSize.left()); - total_screen.rect.top = std::min(total_screen.top(), monitorSize.top()); - total_screen.rect.right = std::max(total_screen.right(), monitorSize.right()); - total_screen.rect.bottom = std::max(total_screen.bottom(), monitorSize.bottom()); - } - // make sure top-right corner of all the monitor rects is (0,0) - monitor_dx = -total_screen.left(); - monitor_dy = -total_screen.top(); - total_screen.rect.left += monitor_dx; - total_screen.rect.right += monitor_dx; - total_screen.rect.top += monitor_dy; - total_screen.rect.bottom += monitor_dy; - tasklist.update(); - if (window) - { - // Ignore errors, if this fails we will just not show the thumbnail - DwmRegisterThumbnail(hwnd, window, &thumbnail); - } - - background_animation.reset(); - - if (milliseconds_press_time_for_global_windows_shortcuts < milliseconds_press_time_for_taskbar_icon_shortcuts) - { - global_windows_shortcuts_shown = true; - taskbar_icon_shortcuts_shown = false; - global_windows_shortcuts_animation.reset(); - } - else if (milliseconds_press_time_for_global_windows_shortcuts > milliseconds_press_time_for_taskbar_icon_shortcuts) - { - global_windows_shortcuts_shown = false; - taskbar_icon_shortcuts_shown = true; - taskbar_icon_shortcuts_animation.reset(); - } - else - { - global_windows_shortcuts_shown = true; - taskbar_icon_shortcuts_shown = true; - global_windows_shortcuts_animation.reset(); - taskbar_icon_shortcuts_animation.reset(); - } - - auto primary_size = MonitorInfo::GetPrimaryMonitor().GetScreenSize(false); - shown_start_time = std::chrono::steady_clock::now(); - lock.unlock(); - D2DWindow::show(primary_size.left(), primary_size.top(), primary_size.width(), primary_size.height()); - // Check if taskbar is auto-hidden. If so, don't display the number arrows - APPBARDATA param = {}; - param.cbSize = sizeof(APPBARDATA); - if (static_cast(SHAppBarMessage(ABM_GETSTATE, ¶m)) != ABS_AUTOHIDE) - { - tasklist_cv_mutex.lock(); - tasklist_update = true; - tasklist_cv_mutex.unlock(); - tasklist_cv.notify_one(); - } -} - -void D2DOverlayWindow::on_show() -{ - // show override does everything -} - -void D2DOverlayWindow::on_hide() -{ - Logger::trace("D2DOverlayWindow::on_hide()"); - tasklist_cv_mutex.lock(); - tasklist_update = false; - tasklist_cv_mutex.unlock(); - tasklist_cv.notify_one(); - if (thumbnail) - { - DwmUnregisterThumbnail(thumbnail); - } - std::chrono::steady_clock::time_point shown_end_time = std::chrono::steady_clock::now(); - // Trace the event only if the overlay window was visible. - if (shown_start_time.time_since_epoch().count() > 0) - { - auto duration = std::chrono::duration_cast(shown_end_time - shown_start_time).count(); - Logger::trace(L"Duration: {}. Close Type: {}", duration, windowCloseType); - Trace::SendGuideSession(duration, windowCloseType.c_str()); - shown_start_time = {}; - } -} - -D2DOverlayWindow::~D2DOverlayWindow() -{ - tasklist_cv_mutex.lock(); - running = false; - tasklist_cv_mutex.unlock(); - tasklist_cv.notify_one(); - tasklist_thread.join(); -} - -void D2DOverlayWindow::apply_overlay_opacity(float opacity) -{ - if (opacity <= 0.0f) - { - opacity = 0.0f; - } - if (opacity >= 1.0f) - { - opacity = 1.0f; - } - overlay_opacity = opacity; -} - -void D2DOverlayWindow::apply_press_time_for_global_windows_shortcuts(int press_time) -{ - milliseconds_press_time_for_global_windows_shortcuts = std::max(press_time, 0); -} - -void D2DOverlayWindow::apply_press_time_for_taskbar_icon_shortcuts(int press_time) -{ - milliseconds_press_time_for_taskbar_icon_shortcuts = std::max(press_time, 0); -} - -void D2DOverlayWindow::set_theme(const std::wstring& theme) -{ - if (theme == L"light") - { - theme_setting = Light; - } - else if (theme == L"dark") - { - theme_setting = Dark; - } - else - { - theme_setting = System; - } -} - -/* Hide the window but do not call on_hide(). Use this to quickly hide the window when needed. - Note, that a proper hide should be made after this before showing the window again. -*/ -void D2DOverlayWindow::quick_hide() -{ - ShowWindow(hwnd, SW_HIDE); - if (thumbnail) - { - DwmUnregisterThumbnail(thumbnail); - } -} - -HWND D2DOverlayWindow::get_window_handle() -{ - return hwnd; -} - -float D2DOverlayWindow::get_overlay_opacity() -{ - return overlay_opacity; -} - -void D2DOverlayWindow::init() -{ - colors.update(); - landscape.load(L"Assets\\ShortcutGuide\\overlay.svg", d2d_dc.get()) - .find_thumbnail(L"monitorRect") - .find_window_group(L"WindowControlsGroup") - .recolor(0x2582FB, colors.start_color_menu); - portrait.load(L"Assets\\ShortcutGuide\\overlay_portrait.svg", d2d_dc.get()) - .find_thumbnail(L"monitorRect") - .find_window_group(L"WindowControlsGroup") - .recolor(0x2582FB, colors.start_color_menu); - no_active.load(L"Assets\\ShortcutGuide\\no_active_window.svg", d2d_dc.get()); - arrows.resize(10); - for (unsigned i = 0; i < arrows.size(); ++i) - { - arrows[i].load(L"Assets\\ShortcutGuide\\" + std::to_wstring((i + 1) % 10) + L".svg", d2d_dc.get()).recolor(0x2582FB, colors.start_color_menu); - } - light_mode = (theme_setting == Light) || (theme_setting == System && colors.light_mode); - if (light_mode) - { - landscape.recolor(0x2E17FC, 0x000000); - portrait.recolor(0x2E17FC, 0x000000); - for (auto& arrow : arrows) - { - arrow.recolor(0x222222, 0x000000); - } - } - else - { - landscape.recolor(0x2E17FC, 0xFFFFFF); - portrait.recolor(0x2E17FC, 0xFFFFFF); - for (auto& arrow : arrows) - { - arrow.recolor(0x222222, 0xFFFFFF); - } - } -} - -void D2DOverlayWindow::resize() -{ - window_rect = *get_window_pos(hwnd); - float no_active_scale, font; - if (window_width >= window_height) - { // portrait is broke right now - use_overlay = &landscape; - no_active_scale = 0.3f; - font = 12.0f; - } - else - { - use_overlay = &portrait; - no_active_scale = 0.5f; - font = 13.0f; - } - use_overlay->resize(0, 0, window_width, window_height, 0.8f); - auto thumb_no_active_rect = use_overlay->get_thumbnail_rect_and_scale(0, 0, no_active.width(), no_active.height(), no_active_scale).rect; - no_active.resize(thumb_no_active_rect.left, - thumb_no_active_rect.top, - thumb_no_active_rect.right - thumb_no_active_rect.left, - thumb_no_active_rect.bottom - thumb_no_active_rect.top, - 1.0f); - text.resize(font, use_overlay->get_scale()); -} - -void render_arrow(D2DSVG& arrow, TasklistButton& button, RECT window, float max_scale, ID2D1DeviceContext5* d2d_dc, int x_offset, int y_offset) -{ - int dx = 0, dy = 0; - // Calculate taskbar orientation - arrow.toggle_element(L"left", false); - arrow.toggle_element(L"right", false); - arrow.toggle_element(L"top", false); - arrow.toggle_element(L"bottom", false); - if (button.x <= window.left) - { // taskbar on left - dx = 1; - arrow.toggle_element(L"left", true); - } - if (button.x >= window.right) - { // taskbar on right - dx = -1; - arrow.toggle_element(L"right", true); - } - if (button.y <= window.top) - { // taskbar on top - dy = 1; - arrow.toggle_element(L"top", true); - } - if (button.y >= window.bottom) - { // taskbar on bottom - dy = -1; - arrow.toggle_element(L"bottom", true); - } - double arrow_ratio = static_cast(arrow.height()) / arrow.width(); - if (dy != 0) - { - // assume button is 25% wider than taller, +10% to make room for each of the arrows that are hidden - auto render_arrow_width = static_cast(button.height * 1.25f * 1.2f); - auto render_arrow_height = static_cast(render_arrow_width * arrow_ratio); - arrow.resize((button.x + (button.width - render_arrow_width) / 2) + x_offset, - (dy == -1 ? button.y - render_arrow_height : 0) + y_offset, - render_arrow_width, - render_arrow_height, - 0.95f, - max_scale) - .render(d2d_dc); - } - else - { - // same as above - make room for the hidden arrow - auto render_arrow_height = static_cast(button.height * 1.2f); - auto render_arrow_width = static_cast(render_arrow_height / arrow_ratio); - arrow.resize((dx == -1 ? button.x - render_arrow_width : 0) + x_offset, - (button.y + (button.height - render_arrow_height) / 2) + y_offset, - render_arrow_width, - render_arrow_height, - 0.95f, - max_scale) - .render(d2d_dc); - } -} - -bool D2DOverlayWindow::show_thumbnail(const RECT& rect, double alpha) -{ - if (!thumbnail) - { - return false; - } - DWM_THUMBNAIL_PROPERTIES thumb_properties; - thumb_properties.dwFlags = DWM_TNP_SOURCECLIENTAREAONLY | DWM_TNP_VISIBLE | DWM_TNP_RECTDESTINATION | DWM_TNP_OPACITY; - thumb_properties.fSourceClientAreaOnly = FALSE; - thumb_properties.fVisible = TRUE; - thumb_properties.opacity = static_cast(255 * alpha); - thumb_properties.rcDestination = rect; - if (DwmUpdateThumbnailProperties(thumbnail, &thumb_properties) != S_OK) - { - return false; - } - return true; -} - -void D2DOverlayWindow::hide_thumbnail() -{ - DWM_THUMBNAIL_PROPERTIES thumb_properties; - thumb_properties.dwFlags = DWM_TNP_VISIBLE; - thumb_properties.fVisible = FALSE; - DwmUpdateThumbnailProperties(thumbnail, &thumb_properties); -} - -void D2DOverlayWindow::render(ID2D1DeviceContext5* d2d_device_context) -{ - if (!hidden && !overlay_window_instance->overlay_visible()) - { - hide(); - return; - } - - d2d_device_context->Clear(); - int taskbar_icon_shortcuts_x_offset = 0, taskbar_icon_shortcuts_y_offset = 0; - - double current_background_anim_value = background_animation.value(Animation::AnimFunctions::LINEAR); - double current_global_windows_shortcuts_anim_value = global_windows_shortcuts_animation.value(Animation::AnimFunctions::LINEAR); - double pos_global_windows_shortcuts_anim_value = 1 - global_windows_shortcuts_animation.value(Animation::AnimFunctions::EASE_OUT_EXPO); - double pos_taskbar_icon_shortcuts_anim_value = 1 - taskbar_icon_shortcuts_animation.value(Animation::AnimFunctions::EASE_OUT_EXPO); - - // Draw background - SetLayeredWindowAttributes(hwnd, 0, static_cast(255 * current_background_anim_value), LWA_ALPHA); - winrt::com_ptr brush; - float brush_opacity = get_overlay_opacity(); - D2D1_COLOR_F brushColor = light_mode ? D2D1::ColorF(1.0f, 1.0f, 1.0f, brush_opacity) : D2D1::ColorF(0, 0, 0, brush_opacity); - winrt::check_hresult(d2d_device_context->CreateSolidColorBrush(brushColor, brush.put())); - D2D1_RECT_F background_rect = {}; - background_rect.bottom = static_cast(window_height); - background_rect.right = static_cast(window_width); - d2d_device_context->SetTransform(D2D1::Matrix3x2F::Identity()); - d2d_device_context->FillRectangle(background_rect, brush.get()); - - // Draw the taskbar shortcuts (the arrows with numbers) - if (taskbar_icon_shortcuts_shown) - { - if (!tasklist_buttons.empty()) - { - if (tasklist_buttons[0].x <= window_rect.left) - { - // taskbar on left - taskbar_icon_shortcuts_x_offset = static_cast(-pos_taskbar_icon_shortcuts_anim_value * use_overlay->width() * use_overlay->get_scale()); - } - if (tasklist_buttons[0].x >= window_rect.right) - { - // taskbar on right - taskbar_icon_shortcuts_x_offset = static_cast(pos_taskbar_icon_shortcuts_anim_value * use_overlay->width() * use_overlay->get_scale()); - } - if (tasklist_buttons[0].y <= window_rect.top) - { - // taskbar on top - taskbar_icon_shortcuts_y_offset = static_cast(-pos_taskbar_icon_shortcuts_anim_value * use_overlay->height() * use_overlay->get_scale()); - } - if (tasklist_buttons[0].y >= window_rect.bottom) - { - // taskbar on bottom - taskbar_icon_shortcuts_y_offset = static_cast(pos_taskbar_icon_shortcuts_anim_value * use_overlay->height() * use_overlay->get_scale()); - } - for (auto&& button : tasklist_buttons) - { - if (static_cast(button.keynum) - 1 >= arrows.size()) - { - continue; - } - render_arrow(arrows[static_cast(button.keynum) - 1], button, window_rect, use_overlay->get_scale(), d2d_device_context, taskbar_icon_shortcuts_x_offset, taskbar_icon_shortcuts_y_offset); - } - } - } - else - { - auto time_since_start = std::chrono::high_resolution_clock::now() - shown_start_time; - if (time_since_start.count() / 1000000 > milliseconds_press_time_for_taskbar_icon_shortcuts - milliseconds_press_time_for_global_windows_shortcuts) - { - taskbar_icon_shortcuts_shown = true; - taskbar_icon_shortcuts_animation.reset(); - } - } - - if (global_windows_shortcuts_shown) - { - // Thumbnail logic: - auto window_state = get_window_state(active_window); - auto thumb_window = get_window_pos(active_window); - if (!thumb_window.has_value()) - { - thumb_window = RECT(); - } - - bool miniature_shown = active_window != nullptr && thumbnail != nullptr && thumb_window && window_state != MINIMIZED; - RECT client_rect; - if (thumb_window && GetClientRect(active_window, &client_rect)) - { - int dx = ((thumb_window->right - thumb_window->left) - (client_rect.right - client_rect.left)) / 2; - int dy = ((thumb_window->bottom - thumb_window->top) - (client_rect.bottom - client_rect.top)) / 2; - thumb_window->left += dx; - thumb_window->right -= dx; - thumb_window->top += dy; - thumb_window->bottom -= dy; - } - if (miniature_shown && thumb_window->right - thumb_window->left <= 0 || thumb_window->bottom - thumb_window->top <= 0) - { - miniature_shown = false; - } - bool render_monitors = true; - auto total_monitor_with_screen = total_screen; - if (thumb_window) - { - total_monitor_with_screen.rect.left = std::min(total_monitor_with_screen.rect.left, thumb_window->left + monitor_dx); - total_monitor_with_screen.rect.top = std::min(total_monitor_with_screen.rect.top, thumb_window->top + monitor_dy); - total_monitor_with_screen.rect.right = std::max(total_monitor_with_screen.rect.right, thumb_window->right + monitor_dx); - total_monitor_with_screen.rect.bottom = std::max(total_monitor_with_screen.rect.bottom, thumb_window->bottom + monitor_dy); - } - // Only allow the new rect being slight bigger. - if (total_monitor_with_screen.width() - total_screen.width() > (thumb_window->right - thumb_window->left) / 2 || - total_monitor_with_screen.height() - total_screen.height() > (thumb_window->bottom - thumb_window->top) / 2) - { - render_monitors = false; - } - if (window_state == MINIMIZED) - { - total_monitor_with_screen = total_screen; - } - auto rect_and_scale = use_overlay->get_thumbnail_rect_and_scale(0, 0, total_monitor_with_screen.width(), total_monitor_with_screen.height(), 1); - if (miniature_shown) - { - RECT thumbnail_pos; - if (render_monitors) - { - thumbnail_pos.left = static_cast((thumb_window->left + monitor_dx) * rect_and_scale.scale + rect_and_scale.rect.left); - thumbnail_pos.top = static_cast((thumb_window->top + monitor_dy) * rect_and_scale.scale + rect_and_scale.rect.top); - thumbnail_pos.right = static_cast((thumb_window->right + monitor_dx) * rect_and_scale.scale + rect_and_scale.rect.left); - thumbnail_pos.bottom = static_cast((thumb_window->bottom + monitor_dy) * rect_and_scale.scale + rect_and_scale.rect.top); - } - else - { - thumbnail_pos = use_overlay->get_thumbnail_rect_and_scale(0, 0, thumb_window->right - thumb_window->left, thumb_window->bottom - thumb_window->top, 1).rect; - } - // If the animation is done show the thumbnail - // we cannot animate the thumbnail, the animation lags behind - miniature_shown = show_thumbnail(thumbnail_pos, current_global_windows_shortcuts_anim_value); - } - else - { - hide_thumbnail(); - } - if (window_state == MINIMIZED) - { - render_monitors = true; - } - // render the monitors - if (render_monitors) - { - brushColor = D2D1::ColorF(colors.start_color_menu, miniature_shown ? static_cast(current_global_windows_shortcuts_anim_value * 0.9) : static_cast(current_global_windows_shortcuts_anim_value * 0.3)); - brush = nullptr; - winrt::check_hresult(d2d_device_context->CreateSolidColorBrush(brushColor, brush.put())); - for (auto& monitor : monitors) - { - D2D1_RECT_F monitor_rect; - const auto monitor_size = monitor.GetScreenSize(true); - monitor_rect.left = static_cast((monitor_size.left() + monitor_dx) * rect_and_scale.scale + rect_and_scale.rect.left); - monitor_rect.top = static_cast((monitor_size.top() + monitor_dy) * rect_and_scale.scale + rect_and_scale.rect.top); - monitor_rect.right = static_cast((monitor_size.right() + monitor_dx) * rect_and_scale.scale + rect_and_scale.rect.left); - monitor_rect.bottom = static_cast((monitor_size.bottom() + monitor_dy) * rect_and_scale.scale + rect_and_scale.rect.top); - d2d_device_context->SetTransform(D2D1::Matrix3x2F::Identity()); - d2d_device_context->FillRectangle(monitor_rect, brush.get()); - } - } - // Finalize the overlay - dim the buttons if no thumbnail is present and show "No active window" - use_overlay->toggle_window_group(miniature_shown || window_state == MINIMIZED); - if (!miniature_shown && window_state != MINIMIZED) - { - no_active.render(d2d_device_context); - window_state = UNKNOWN; - } - - // Set the animation - move the draw window according to animation step - int global_windows_shortcuts_y_offset = static_cast(pos_global_windows_shortcuts_anim_value * use_overlay->height() * use_overlay->get_scale()); - auto popIn = D2D1::Matrix3x2F::Translation(0, static_cast(global_windows_shortcuts_y_offset)); - d2d_device_context->SetTransform(popIn); - - // Animate keys - for (unsigned id = 0; id < key_animations.size();) - { - auto& animation = key_animations[id]; - D2D1_COLOR_F color; - auto value = static_cast(animation.animation.value(Animation::AnimFunctions::EASE_OUT_EXPO)); - color.a = 1.0f; - color.r = animation.original.r + (1.0f - animation.original.r) * value; - color.g = animation.original.g + (1.0f - animation.original.g) * value; - color.b = animation.original.b + (1.0f - animation.original.b) * value; - animation.button->SetAttributeValue(L"fill", color); - if (animation.animation.done()) - { - if (value == 1) - { - animation.animation.reset(0.05, 1, 0); - animation.animation.value(Animation::AnimFunctions::EASE_OUT_EXPO); - } - else - { - key_animations.erase(key_animations.begin() + id); - continue; - } - } - ++id; - } - // Finally: render the overlay... - use_overlay->render(d2d_device_context); - // ... window arrows texts ... - std::wstring left, right, up, down; - bool left_disabled = false; - bool right_disabled = false; - bool up_disabled = false; - bool down_disabled = false; - switch (window_state) - { - case MINIMIZED: - left = GET_RESOURCE_STRING(IDS_NO_ACTION); - left_disabled = true; - right = GET_RESOURCE_STRING(IDS_NO_ACTION); - right_disabled = true; - up = GET_RESOURCE_STRING(IDS_RESTORE); - down = GET_RESOURCE_STRING(IDS_NO_ACTION); - down_disabled = true; - break; - case MAXIMIZED: - left = GET_RESOURCE_STRING(IDS_SNAP_LEFT); - right = GET_RESOURCE_STRING(IDS_SNAP_RIGHT); - up = GET_RESOURCE_STRING(IDS_NO_ACTION); - up_disabled = true; - down = GET_RESOURCE_STRING(IDS_RESTORE); - break; - case SNAPPED_TOP_LEFT: - left = GET_RESOURCE_STRING(IDS_SNAP_UPPER_RIGHT); - right = GET_RESOURCE_STRING(IDS_SNAP_UPPER_RIGHT); - up = GET_RESOURCE_STRING(IDS_MAXIMIZE); - down = GET_RESOURCE_STRING(IDS_SNAP_LEFT); - break; - case SNAPPED_LEFT: - left = GET_RESOURCE_STRING(IDS_SNAP_RIGHT); - right = GET_RESOURCE_STRING(IDS_RESTORE); - up = GET_RESOURCE_STRING(IDS_SNAP_UPPER_LEFT); - down = GET_RESOURCE_STRING(IDS_SNAP_LOWER_LEFT); - break; - case SNAPPED_BOTTOM_LEFT: - left = GET_RESOURCE_STRING(IDS_SNAP_LOWER_RIGHT); - right = GET_RESOURCE_STRING(IDS_SNAP_LOWER_RIGHT); - up = GET_RESOURCE_STRING(IDS_SNAP_LEFT); - down = GET_RESOURCE_STRING(IDS_MINIMIZE); - break; - case SNAPPED_TOP_RIGHT: - left = GET_RESOURCE_STRING(IDS_SNAP_UPPER_LEFT); - right = GET_RESOURCE_STRING(IDS_SNAP_UPPER_LEFT); - up = GET_RESOURCE_STRING(IDS_MAXIMIZE); - down = GET_RESOURCE_STRING(IDS_SNAP_RIGHT); - break; - case SNAPPED_RIGHT: - left = GET_RESOURCE_STRING(IDS_RESTORE); - right = GET_RESOURCE_STRING(IDS_SNAP_LEFT); - up = GET_RESOURCE_STRING(IDS_SNAP_UPPER_RIGHT); - down = GET_RESOURCE_STRING(IDS_SNAP_LOWER_RIGHT); - break; - case SNAPPED_BOTTOM_RIGHT: - left = GET_RESOURCE_STRING(IDS_SNAP_LOWER_LEFT); - right = GET_RESOURCE_STRING(IDS_SNAP_LOWER_LEFT); - up = GET_RESOURCE_STRING(IDS_SNAP_RIGHT); - down = GET_RESOURCE_STRING(IDS_MINIMIZE); - break; - case RESTORED: - left = GET_RESOURCE_STRING(IDS_SNAP_LEFT); - right = GET_RESOURCE_STRING(IDS_SNAP_RIGHT); - up = GET_RESOURCE_STRING(IDS_MAXIMIZE); - down = GET_RESOURCE_STRING(IDS_MINIMIZE); - break; - default: - left = GET_RESOURCE_STRING(IDS_NO_ACTION); - left_disabled = true; - right = GET_RESOURCE_STRING(IDS_NO_ACTION); - right_disabled = true; - up = GET_RESOURCE_STRING(IDS_NO_ACTION); - up_disabled = true; - down = GET_RESOURCE_STRING(IDS_NO_ACTION); - down_disabled = true; - } - auto text_color = D2D1::ColorF(light_mode ? 0x222222 : 0xDDDDDD, active_window_snappable && (miniature_shown || window_state == MINIMIZED) ? 1.0f : 0.3f); - use_overlay->find_element(L"KeyUpGroup")->SetAttributeValue(L"fill-opacity", up_disabled ? 0.3f : 1.0f); - text.set_alignment_center().write(d2d_device_context, text_color, use_overlay->get_maximize_label(), up); - use_overlay->find_element(L"KeyDownGroup")->SetAttributeValue(L"fill-opacity", down_disabled ? 0.3f : 1.0f); - text.write(d2d_device_context, text_color, use_overlay->get_minimize_label(), down); - use_overlay->find_element(L"KeyLeftGroup")->SetAttributeValue(L"fill-opacity", left_disabled ? 0.3f : 1.0f); - text.set_alignment_right().write(d2d_device_context, text_color, use_overlay->get_snap_left(), left); - use_overlay->find_element(L"KeyRightGroup")->SetAttributeValue(L"fill-opacity", right_disabled ? 0.3f : 1.0f); - text.set_alignment_left().write(d2d_device_context, text_color, use_overlay->get_snap_right(), right); - } - else - { - auto time_since_start = std::chrono::high_resolution_clock::now() - shown_start_time; - if (time_since_start.count() / 1000000 > milliseconds_press_time_for_global_windows_shortcuts - milliseconds_press_time_for_taskbar_icon_shortcuts) - { - global_windows_shortcuts_shown = true; - global_windows_shortcuts_animation.reset(); - } - } -} diff --git a/src/modules/ShortcutGuide/ShortcutGuide/overlay_window.h b/src/modules/ShortcutGuide/ShortcutGuide/overlay_window.h deleted file mode 100644 index 00f05db565..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/overlay_window.h +++ /dev/null @@ -1,114 +0,0 @@ -#pragma once -#include "animation.h" -#include "d2d_svg.h" -#include "d2d_window.h" -#include "d2d_text.h" - -#include -#include -#include "tasklist_positions.h" - -struct ScaleResult -{ - double scale; - RECT rect; -}; - -class D2DOverlaySVG : public D2DSVG -{ -public: - D2DOverlaySVG& load(const std::wstring& filename, ID2D1DeviceContext5* d2d_dc); - D2DOverlaySVG& resize(int x, int y, int width, int height, float fill, float max_scale = -1.0f); - D2DOverlaySVG& find_thumbnail(const std::wstring& id); - D2DOverlaySVG& find_window_group(const std::wstring& id); - ScaleResult get_thumbnail_rect_and_scale(int x_offset, int y_offset, int window_cx, int window_cy, float fill); - D2DOverlaySVG& toggle_window_group(bool active); - winrt::com_ptr find_element(const std::wstring& id); - D2D1_RECT_F get_maximize_label() const; - D2D1_RECT_F get_minimize_label() const; - D2D1_RECT_F get_snap_left() const; - D2D1_RECT_F get_snap_right() const; - -private: - D2D1_POINT_2F thumbnail_top_left = {}; - D2D1_POINT_2F thumbnail_bottom_right = {}; - RECT thumbnail_scaled_rect = {}; - winrt::com_ptr window_group; -}; - -struct AnimateKeys -{ - Animation animation; - D2D1_COLOR_F original; - winrt::com_ptr button; - int vk_code; -}; - -class D2DOverlayWindow : public D2DWindow -{ -public: - D2DOverlayWindow(); - void show(HWND window, bool snappable); - ~D2DOverlayWindow(); - void apply_overlay_opacity(float opacity); - void apply_press_time_for_global_windows_shortcuts(int press_time); - void apply_press_time_for_taskbar_icon_shortcuts(int press_time); - void set_theme(const std::wstring& theme); - void quick_hide(); - - HWND get_window_handle(); - void SetWindowCloseType(std::wstring wCloseType) - { - windowCloseType = wCloseType; - } - -private: - std::wstring windowCloseType; - bool show_thumbnail(const RECT& rect, double alpha); - void hide_thumbnail(); - virtual void init() override; - virtual void resize() override; - virtual void render(ID2D1DeviceContext5* d2dd2d_device_context_dc) override; - virtual void on_show() override; - virtual void on_hide() override; - float get_overlay_opacity(); - - bool running = true; - std::vector key_animations; - std::vector monitors; - Box total_screen; - int monitor_dx = 0, monitor_dy = 0; - D2DText text; - WindowsColors colors; - Animation background_animation; - Animation global_windows_shortcuts_animation; - Animation taskbar_icon_shortcuts_animation; - bool global_windows_shortcuts_shown = false; - bool taskbar_icon_shortcuts_shown = false; - RECT window_rect = {}; - Tasklist tasklist; - std::vector tasklist_buttons; - std::thread tasklist_thread; - bool tasklist_update = false; - std::mutex tasklist_cv_mutex; - std::condition_variable tasklist_cv; - - HTHUMBNAIL thumbnail = nullptr; - HWND active_window = nullptr; - bool active_window_snappable = false; - D2DOverlaySVG landscape, portrait; - D2DOverlaySVG* use_overlay = nullptr; - D2DSVG no_active; - std::vector arrows; - std::chrono::steady_clock::time_point shown_start_time; - float overlay_opacity = 0.9f; - enum - { - Light, - Dark, - System - } theme_setting = System; - bool light_mode = true; - UINT milliseconds_press_time_for_global_windows_shortcuts = 900; - UINT milliseconds_press_time_for_taskbar_icon_shortcuts = 900; -}; diff --git a/src/modules/ShortcutGuide/ShortcutGuide/packages.config b/src/modules/ShortcutGuide/ShortcutGuide/packages.config deleted file mode 100644 index f32f48b009..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/packages.config +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/pch.cpp b/src/modules/ShortcutGuide/ShortcutGuide/pch.cpp deleted file mode 100644 index 1d9f38c57d..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/pch.cpp +++ /dev/null @@ -1 +0,0 @@ -#include "pch.h" diff --git a/src/modules/ShortcutGuide/ShortcutGuide/pch.h b/src/modules/ShortcutGuide/ShortcutGuide/pch.h deleted file mode 100644 index 9ec2bbcb41..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/pch.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once -#define NOMINMAX -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/resource.base.h b/src/modules/ShortcutGuide/ShortcutGuide/resource.base.h deleted file mode 100644 index 75f509067c..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/resource.base.h +++ /dev/null @@ -1,13 +0,0 @@ -//{{NO_DEPENDENCIES}} -// Microsoft Visual C++ generated include file. -// Used by ShortcutGuide.rc - -////////////////////////////// -// Non-localizable - -#define FILE_DESCRIPTION "PowerToys ShortcutGuide" -#define INTERNAL_NAME "ShortcutGuide" -#define ORIGINAL_FILENAME "PowerToys.ShortcutGuide.exe" - -// Non-localizable -////////////////////////////// diff --git a/src/modules/ShortcutGuide/ShortcutGuide/shortcut_guide.cpp b/src/modules/ShortcutGuide/ShortcutGuide/shortcut_guide.cpp deleted file mode 100644 index a67e9176fc..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/shortcut_guide.cpp +++ /dev/null @@ -1,505 +0,0 @@ -#include "pch.h" -#include "shortcut_guide.h" -#include "target_state.h" -#include "trace.h" - -#include -#include -#include -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -// TODO: refactor singleton -OverlayWindow* overlay_window_instance = nullptr; - -namespace -{ - // Window properties relevant to ShortcutGuide - struct ShortcutGuideWindowInfo - { - HWND hwnd = nullptr; // Handle to the top-level foreground window or nullptr if there is no such window - bool snappable = false; // True, if the window can react to Windows Snap keys - bool disabled = false; - }; - - ShortcutGuideWindowInfo GetShortcutGuideWindowInfo(HWND active_window) - { - ShortcutGuideWindowInfo result; - active_window = GetAncestor(active_window, GA_ROOT); - if (!IsWindowVisible(active_window)) - { - return result; - } - - auto style = GetWindowLong(active_window, GWL_STYLE); - auto exStyle = GetWindowLong(active_window, GWL_EXSTYLE); - if ((style & WS_CHILD) == WS_CHILD || - (style & WS_DISABLED) == WS_DISABLED || - (exStyle & WS_EX_TOOLWINDOW) == WS_EX_TOOLWINDOW || - (exStyle & WS_EX_NOACTIVATE) == WS_EX_NOACTIVATE) - { - return result; - } - std::array class_name; - GetClassNameA(active_window, class_name.data(), static_cast(class_name.size())); - if (is_system_window(active_window, class_name.data())) - { - return result; - } - static HWND cortana_hwnd = nullptr; - if (cortana_hwnd == nullptr) - { - if (strcmp(class_name.data(), "Windows.UI.Core.CoreWindow") == 0 && - get_process_path(active_window).ends_with(L"SearchUI.exe")) - { - cortana_hwnd = active_window; - return result; - } - } - else if (cortana_hwnd == active_window) - { - return result; - } - result.hwnd = active_window; - // In reality, Windows Snap works if even one of those styles is set - // for a window, it is just limited. If there is no WS_MAXIMIZEBOX using - // WinKey + Up just won't maximize the window. Similarly, without - // WS_MINIMIZEBOX the window will not get minimized. A "Save As..." dialog - // is an example of such window - it can be snapped to both sides and to - // all screen corners, but will not get maximized nor minimized. - // For now, since ShortcutGuide can only disable entire "Windows Controls" - // group, we require that the window supports all the options. - result.snappable = ((style & WS_MAXIMIZEBOX) == WS_MAXIMIZEBOX) && - ((style & WS_MINIMIZEBOX) == WS_MINIMIZEBOX) && - ((style & WS_THICKFRAME) == WS_THICKFRAME); - return result; - } - - const LPARAM eventActivateWindow = 1; - - bool wasWinPressed = false; - bool isWinPressed() - { - return (GetAsyncKeyState(VK_LWIN) & 0x8000) || (GetAsyncKeyState(VK_RWIN) & 0x8000); - } - - // all modifiers without win key - std::vector modifierKeys = { VK_SHIFT, VK_LSHIFT, VK_RSHIFT, VK_CONTROL, VK_LCONTROL, VK_RCONTROL, VK_MENU, VK_LMENU, VK_RMENU }; - - // returns false if there are other modifiers pressed or win key isn' pressed - bool onlyWinPressed() - { - if (!isWinPressed()) - { - return false; - } - - for (auto key : modifierKeys) - { - if (GetAsyncKeyState(key) & 0x8000) - { - return false; - } - } - - return true; - } - - constexpr bool isWin(int key) - { - return key == VK_LWIN || key == VK_RWIN; - } - - constexpr bool isKeyDown(LowlevelKeyboardEvent event) - { - return event.wParam == WM_KEYDOWN || event.wParam == WM_SYSKEYDOWN; - } - - LRESULT CALLBACK LowLevelKeyboardProc(int nCode, WPARAM wParam, LPARAM lParam) - { - LowlevelKeyboardEvent event; - if (nCode == HC_ACTION) - { - event.lParam = reinterpret_cast(lParam); - event.wParam = wParam; - - if (event.lParam->vkCode == VK_ESCAPE) - { - Logger::trace(L"ESC key was pressed"); - overlay_window_instance->CloseWindow(HideWindowType::ESC_PRESSED); - } - - if (wasWinPressed && !isKeyDown(event) && isWin(event.lParam->vkCode)) - { - Logger::trace(L"Win key was released"); - overlay_window_instance->CloseWindow(HideWindowType::WIN_RELEASED); - } - - if (isKeyDown(event) && isWin(event.lParam->vkCode)) - { - wasWinPressed = true; - } - - if (onlyWinPressed() && isKeyDown(event) && !isWin(event.lParam->vkCode)) - { - Logger::trace(L"Shortcut with win key was pressed"); - overlay_window_instance->CloseWindow(HideWindowType::WIN_SHORTCUT_PRESSED); - } - } - - return CallNextHookEx(NULL, nCode, wParam, lParam); - } - - LRESULT CALLBACK LowLevelMouseProc(int nCode, WPARAM wParam, LPARAM lParam) - { - if (nCode >= 0) - { - switch (wParam) - { - case WM_LBUTTONUP: - case WM_RBUTTONUP: - case WM_MBUTTONUP: - case WM_XBUTTONUP: - // Don't close with mouse click if activation is windows key and the key is pressed - if (!overlay_window_instance->win_key_activation() || !isWinPressed()) - { - overlay_window_instance->CloseWindow(HideWindowType::MOUSE_BUTTONUP); - } - break; - default: - break; - } - } - - return CallNextHookEx(0, nCode, wParam, lParam); - } - - std::wstring ToWstring(HideWindowType type) - { - switch (type) - { - case HideWindowType::ESC_PRESSED: - return L"ESC_PRESSED"; - case HideWindowType::WIN_RELEASED: - return L"WIN_RELEASED"; - case HideWindowType::WIN_SHORTCUT_PRESSED: - return L"WIN_SHORTCUT_PRESSED"; - case HideWindowType::THE_SHORTCUT_PRESSED: - return L"THE_SHORTCUT_PRESSED"; - case HideWindowType::MOUSE_BUTTONUP: - return L"MOUSE_BUTTONUP"; - } - - return L""; - } -} - -OverlayWindow::OverlayWindow(HWND activeWindow) -{ - overlay_window_instance = this; - this->activeWindow = activeWindow; - app_name = GET_RESOURCE_STRING(IDS_SHORTCUT_GUIDE); - - Logger::info("Overlay Window is creating"); - init_settings(); - keyboardHook = SetWindowsHookEx(WH_KEYBOARD_LL, LowLevelKeyboardProc, GetModuleHandle(NULL), NULL); - if (!keyboardHook) - { - Logger::warn(L"Failed to create low level keyboard hook. {}", get_last_error_or_default(GetLastError())); - } - - mouseHook = SetWindowsHookEx(WH_MOUSE_LL, LowLevelMouseProc, GetModuleHandle(NULL), NULL); - if (!mouseHook) - { - Logger::warn(L"Failed to create low level mouse hook. {}", get_last_error_or_default(GetLastError())); - } -} - -void OverlayWindow::ShowWindow() -{ - winkey_popup = std::make_unique(); - winkey_popup->apply_overlay_opacity(overlayOpacity.value / 100.0f); - winkey_popup->set_theme(theme.value); - - // The press time only takes effect when the shortcut guide is activated by pressing the win key. - if (shouldReactToPressedWinKey.value) - { - winkey_popup->apply_press_time_for_global_windows_shortcuts(windowsKeyPressTimeForGlobalWindowsShortcuts.value); - winkey_popup->apply_press_time_for_taskbar_icon_shortcuts(windowsKeyPressTimeForTaskbarIconShortcuts.value); - } - else - { - winkey_popup->apply_press_time_for_global_windows_shortcuts(0); - winkey_popup->apply_press_time_for_taskbar_icon_shortcuts(0); - } - - target_state = std::make_unique(); - try - { - winkey_popup->initialize(); - } - catch (...) - { - Logger::critical("Winkey popup failed to initialize"); - return; - } - - target_state->toggle_force_shown(); -} - -void OverlayWindow::CloseWindow(HideWindowType type, int mainThreadId) -{ - if (mainThreadId == 0) - { - mainThreadId = GetCurrentThreadId(); - } - - if (this->winkey_popup) - { - if (shouldReactToPressedWinKey.value) - { - // Send a dummy key to prevent Start Menu from activating - INPUT dummyEvent[1] = {}; - dummyEvent[0].type = INPUT_KEYBOARD; - dummyEvent[0].ki.wVk = 0xFF; - dummyEvent[0].ki.dwFlags = KEYEVENTF_KEYUP; - SendInput(1, dummyEvent, sizeof(INPUT)); - } - this->winkey_popup->SetWindowCloseType(ToWstring(type)); - Logger::trace(L"Terminating process"); - PostThreadMessage(mainThreadId, WM_QUIT, 0, 0); - } -} - -bool OverlayWindow::IsDisabled() -{ - WCHAR exePath[MAX_PATH] = L""; - overlay_window_instance->get_exe_path(activeWindow, exePath); - if (wcslen(exePath) > 0) - { - return is_disabled_app(exePath); - } - - return false; -} - -OverlayWindow::~OverlayWindow() -{ - if (event_waiter) - { - event_waiter.reset(); - } - - if (winkey_popup) - { - winkey_popup->hide(); - } - - if (target_state) - { - target_state->exit(); - target_state.reset(); - } - - if (winkey_popup) - { - winkey_popup.reset(); - } - - if (keyboardHook) - { - UnhookWindowsHookEx(keyboardHook); - } -} - -void OverlayWindow::on_held() -{ - auto windowInfo = GetShortcutGuideWindowInfo(activeWindow); - if (windowInfo.disabled) - { - target_state->was_hidden(); - return; - } - winkey_popup->show(windowInfo.hwnd, windowInfo.snappable); -} - -void OverlayWindow::quick_hide() -{ - winkey_popup->quick_hide(); -} - -void OverlayWindow::was_hidden() -{ - target_state->was_hidden(); -} - -bool OverlayWindow::overlay_visible() const -{ - return target_state->active(); -} - -bool OverlayWindow::win_key_activation() const -{ - return shouldReactToPressedWinKey.value; -} - -void OverlayWindow::init_settings() -{ - auto settings = GetSettings(); - overlayOpacity.value = settings.overlayOpacity; - theme.value = settings.theme; - disabledApps.value = settings.disabledApps; - shouldReactToPressedWinKey.value = settings.shouldReactToPressedWinKey; - windowsKeyPressTimeForGlobalWindowsShortcuts.value = settings.windowsKeyPressTimeForGlobalWindowsShortcuts; - windowsKeyPressTimeForTaskbarIconShortcuts.value = settings.windowsKeyPressTimeForTaskbarIconShortcuts; - update_disabled_apps(); -} - -bool OverlayWindow::is_disabled_app(wchar_t* exePath) -{ - if (exePath == nullptr) - { - return false; - } - - auto exePathUpper = std::wstring(exePath); - CharUpperBuffW(exePathUpper.data(), static_cast(exePathUpper.length())); - for (const auto& row : disabled_apps_array) - { - const auto pos = exePathUpper.rfind(row); - const auto last_slash = exePathUpper.rfind('\\'); - // Check that row occurs in disabled_apps_array, and its last occurrence contains in itself the first character after the last backslash. - if (pos != std::wstring::npos && pos <= last_slash + 1 && pos + row.length() > last_slash) - { - return true; - } - } - return false; -} - -void OverlayWindow::update_disabled_apps() -{ - disabled_apps_array.clear(); - auto disabledUppercase = disabledApps.value; - CharUpperBuffW(disabledUppercase.data(), static_cast(disabledUppercase.length())); - std::wstring_view view(disabledUppercase); - view = trim(view); - while (!view.empty()) - { - auto pos = (std::min)(view.find_first_of(L"\r\n"), view.length()); - disabled_apps_array.emplace_back(view.substr(0, pos)); - view.remove_prefix(pos); - view = trim(view); - } -} - -void OverlayWindow::get_exe_path(HWND window, wchar_t* path) -{ - if (disabled_apps_array.empty()) - { - return; - } - - DWORD pid = 0; - GetWindowThreadProcessId(window, &pid); - if (pid != 0) - { - HANDLE processHandle = OpenProcess(PROCESS_QUERY_INFORMATION, FALSE, pid); - if (processHandle && GetProcessImageFileName(processHandle, path, MAX_PATH) > 0) - { - CloseHandle(processHandle); - } - } -} - -ShortcutGuideSettings OverlayWindow::GetSettings() noexcept -{ - ShortcutGuideSettings settings; - json::JsonObject properties; - try - { - PowerToysSettings::PowerToyValues settingsValues = - PowerToysSettings::PowerToyValues::load_from_settings_file(app_key); - - auto settingsObject = settingsValues.get_raw_json(); - if (!settingsObject.GetView().Size()) - { - return settings; - } - - properties = settingsObject.GetNamedObject(L"properties"); - } - catch (...) - { - Logger::warn("Failed to read settings. Use default settings"); - return settings; - } - - try - { - settings.hotkey = PowerToysSettings::HotkeyObject::from_json(properties.GetNamedObject(OpenShortcut::name)).to_string(); - } - catch (...) - { - } - - try - { - settings.overlayOpacity = static_cast(properties.GetNamedObject(OverlayOpacity::name).GetNamedNumber(L"value")); - } - catch (...) - { - } - - try - { - settings.shouldReactToPressedWinKey = properties.GetNamedObject(ShouldReactToPressedWinKey::name).GetNamedBoolean(L"value"); - } - catch (...) - { - } - - try - { - settings.windowsKeyPressTimeForGlobalWindowsShortcuts = static_cast(properties.GetNamedObject(WindowsKeyPressTimeForGlobalWindowsShortcuts::name).GetNamedNumber(L"value")); - } - catch (...) - { - } - - try - { - settings.windowsKeyPressTimeForTaskbarIconShortcuts = static_cast(properties.GetNamedObject(WindowsKeyPressTimeForTaskbarIconShortcuts::name).GetNamedNumber(L"value")); - } - catch (...) - { - } - - try - { - settings.theme = (std::wstring)properties.GetNamedObject(Theme::name).GetNamedString(L"value"); - } - catch (...) - { - } - - try - { - settings.disabledApps = (std::wstring)properties.GetNamedObject(DisabledApps::name).GetNamedString(L"value"); - } - catch (...) - { - } - - return settings; -} diff --git a/src/modules/ShortcutGuide/ShortcutGuide/shortcut_guide.h b/src/modules/ShortcutGuide/ShortcutGuide/shortcut_guide.h deleted file mode 100644 index 57f9bf3267..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/shortcut_guide.h +++ /dev/null @@ -1,106 +0,0 @@ -#pragma once -#include "../interface/powertoy_module_interface.h" -//#include -#include "overlay_window.h" -#include "native_event_waiter.h" -#include "ShortcutGuideSettings.h" -#include "ShortcutGuideConstants.h" - -#include "Generated Files/resource.h" - -// We support only one instance of the overlay -extern class OverlayWindow* overlay_window_instance; - -class TargetState; - -enum class HideWindowType -{ - ESC_PRESSED, - WIN_RELEASED, - WIN_SHORTCUT_PRESSED, - THE_SHORTCUT_PRESSED, - MOUSE_BUTTONUP -}; - -class OverlayWindow -{ -public: - OverlayWindow(HWND activeWindow); - void ShowWindow(); - void CloseWindow(HideWindowType type, int mainThreadId = 0); - bool IsDisabled(); - - void on_held(); - void quick_hide(); - void was_hidden(); - - bool overlay_visible() const; - bool win_key_activation() const; - - bool is_disabled_app(wchar_t* exePath); - - void get_exe_path(HWND window, wchar_t* exePath); - ~OverlayWindow(); - static ShortcutGuideSettings GetSettings() noexcept; -private: - std::wstring app_name; - //contains the non localized key of the powertoy - static inline std::wstring app_key = ShortcutGuideConstants::ModuleKey; - std::unique_ptr target_state; - std::unique_ptr winkey_popup; - std::unique_ptr event_waiter; - std::vector disabled_apps_array; - void init_settings(); - void update_disabled_apps(); - HWND activeWindow; - HHOOK keyboardHook; - HHOOK mouseHook; - - struct OverlayOpacity - { - static inline PCWSTR name = L"overlay_opacity"; - int value; - int resourceId = IDS_SETTING_DESCRIPTION_OVERLAY_OPACITY; - } overlayOpacity{}; - - struct Theme - { - static inline PCWSTR name = L"theme"; - std::wstring value; - int resourceId = IDS_SETTING_DESCRIPTION_THEME; - std::vector> keys_and_texts = { - { L"system", IDS_SETTING_DESCRIPTION_THEME_SYSTEM }, - { L"light", IDS_SETTING_DESCRIPTION_THEME_LIGHT }, - { L"dark", IDS_SETTING_DESCRIPTION_THEME_DARK } - }; - } theme; - - struct DisabledApps - { - static inline PCWSTR name = L"disabled_apps"; - std::wstring value; - } disabledApps; - - struct ShouldReactToPressedWinKey - { - static inline PCWSTR name = L"use_legacy_press_win_key_behavior"; - bool value; - } shouldReactToPressedWinKey; - - struct WindowsKeyPressTimeForGlobalWindowsShortcuts - { - static inline PCWSTR name = L"press_time"; - int value; - } windowsKeyPressTimeForGlobalWindowsShortcuts; - - struct WindowsKeyPressTimeForTaskbarIconShortcuts - { - static inline PCWSTR name = L"press_time_for_taskbar_icon_shortcuts"; - int value; - } windowsKeyPressTimeForTaskbarIconShortcuts; - - struct OpenShortcut - { - static inline PCWSTR name = L"open_shortcutguide"; - } openShortcut; -}; diff --git a/src/modules/ShortcutGuide/ShortcutGuide/start_visible.cpp b/src/modules/ShortcutGuide/ShortcutGuide/start_visible.cpp deleted file mode 100644 index 17efa76b7d..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/start_visible.cpp +++ /dev/null @@ -1,24 +0,0 @@ -#include "pch.h" -#include "start_visible.h" - -bool is_start_visible() -{ - static const auto app_visibility = []() { - winrt::com_ptr result; - CoCreateInstance(CLSID_AppVisibility, - nullptr, - CLSCTX_INPROC_SERVER, - __uuidof(result), - result.put_void()); - return result; - }(); - - if (!app_visibility) - { - return false; - } - - BOOL visible; - auto result = app_visibility->IsLauncherVisible(&visible); - return SUCCEEDED(result) && visible; -} diff --git a/src/modules/ShortcutGuide/ShortcutGuide/start_visible.h b/src/modules/ShortcutGuide/ShortcutGuide/start_visible.h deleted file mode 100644 index a1431086a2..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/start_visible.h +++ /dev/null @@ -1,3 +0,0 @@ -#pragma once - -bool is_start_visible(); diff --git a/src/modules/ShortcutGuide/ShortcutGuide/target_state.cpp b/src/modules/ShortcutGuide/ShortcutGuide/target_state.cpp deleted file mode 100644 index 98fd9bb722..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/target_state.cpp +++ /dev/null @@ -1,47 +0,0 @@ -#include "pch.h" -#include "target_state.h" -#include "start_visible.h" -#include -#include - -constexpr unsigned VK_S = 0x53; - -void TargetState::was_hidden() -{ - std::unique_lock lock(mutex); - // Ignore callbacks from the D2DOverlayWindow - if (state == ForceShown) - { - return; - } - state = Hidden; - lock.unlock(); - cv.notify_one(); -} - -void TargetState::exit() -{ - std::unique_lock lock(mutex); - state = Exiting; - lock.unlock(); - cv.notify_one(); -} - -void TargetState::toggle_force_shown() -{ - std::unique_lock lock(mutex); - if (state != ForceShown) - { - state = ForceShown; - overlay_window_instance->on_held(); - } - else - { - state = Hidden; - } -} - -bool TargetState::active() const -{ - return state == ForceShown || state == Shown; -} diff --git a/src/modules/ShortcutGuide/ShortcutGuide/target_state.h b/src/modules/ShortcutGuide/ShortcutGuide/target_state.h deleted file mode 100644 index c1f51e3f60..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/target_state.h +++ /dev/null @@ -1,33 +0,0 @@ -#pragma once -#include -#include -#include "shortcut_guide.h" - -struct KeyEvent -{ - bool key_down; - unsigned vk_code; -}; - -class TargetState -{ -public: - TargetState() = default; - void was_hidden(); - void exit(); - - void toggle_force_shown(); - bool active() const; - -private: - std::recursive_mutex mutex; - std::condition_variable_any cv; - enum State - { - Hidden, - Shown, - ForceShown, - Exiting - }; - std::atomic state = Hidden; -}; diff --git a/src/modules/ShortcutGuide/ShortcutGuide/tasklist_positions.cpp b/src/modules/ShortcutGuide/ShortcutGuide/tasklist_positions.cpp deleted file mode 100644 index 687fc86566..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/tasklist_positions.cpp +++ /dev/null @@ -1,116 +0,0 @@ -#include "pch.h" -#include "tasklist_positions.h" - -void Tasklist::update() -{ - // Get HWND of the tasklist - auto tasklist_hwnd = FindWindowA("Shell_TrayWnd", nullptr); - if (!tasklist_hwnd) - return; - tasklist_hwnd = FindWindowExA(tasklist_hwnd, 0, "ReBarWindow32", nullptr); - if (!tasklist_hwnd) - return; - tasklist_hwnd = FindWindowExA(tasklist_hwnd, 0, "MSTaskSwWClass", nullptr); - if (!tasklist_hwnd) - return; - tasklist_hwnd = FindWindowExA(tasklist_hwnd, 0, "MSTaskListWClass", nullptr); - if (!tasklist_hwnd) - return; - if (!automation) - { - winrt::check_hresult(CoCreateInstance(CLSID_CUIAutomation, - nullptr, - CLSCTX_INPROC_SERVER, - IID_IUIAutomation, - automation.put_void())); - winrt::check_hresult(automation->CreateTrueCondition(true_condition.put())); - } - element = nullptr; - winrt::check_hresult(automation->ElementFromHandle(tasklist_hwnd, element.put())); -} - -bool Tasklist::update_buttons(std::vector& buttons) -{ - if (!automation || !element) - { - return false; - } - winrt::com_ptr elements; - if (element->FindAll(TreeScope_Children, true_condition.get(), elements.put()) < 0) - return false; - if (!elements) - return false; - int count; - if (elements->get_Length(&count) < 0) - return false; - winrt::com_ptr child; - std::vector found_buttons; - found_buttons.reserve(count); - for (int i = 0; i < count; ++i) - { - child = nullptr; - if (elements->GetElement(i, child.put()) < 0) - return false; - TasklistButton button; - if (VARIANT var_rect; child->GetCurrentPropertyValue(UIA_BoundingRectanglePropertyId, &var_rect) >= 0) - { - if (var_rect.vt == (VT_R8 | VT_ARRAY)) - { - LONG pos; - double value; - pos = 0; - SafeArrayGetElement(var_rect.parray, &pos, &value); - button.x = static_cast(value); - pos = 1; - SafeArrayGetElement(var_rect.parray, &pos, &value); - button.y = static_cast(value); - pos = 2; - SafeArrayGetElement(var_rect.parray, &pos, &value); - button.width = static_cast(value); - pos = 3; - SafeArrayGetElement(var_rect.parray, &pos, &value); - button.height = static_cast(value); - } - VariantClear(&var_rect); - } - else - { - return false; - } - if (BSTR automation_id; child->get_CurrentAutomationId(&automation_id) >= 0) - { - button.name = automation_id; - SysFreeString(automation_id); - } - found_buttons.push_back(button); - } - // assign keynums - buttons.clear(); - for (auto& button : found_buttons) - { - if (buttons.empty()) - { - button.keynum = 1; - buttons.push_back(std::move(button)); - } - else - { - if (button.x < buttons.back().x || button.y < buttons.back().y) // skip 2nd row - break; - if (button.name == buttons.back().name) - continue; // skip buttons from the same app - button.keynum = buttons.back().keynum + 1; - buttons.push_back(std::move(button)); - if (buttons.back().keynum == 10) - break; // no more than 10 buttons - } - } - return true; -} - -std::vector Tasklist::get_buttons() -{ - std::vector buttons; - update_buttons(buttons); - return buttons; -} \ No newline at end of file diff --git a/src/modules/ShortcutGuide/ShortcutGuide/tasklist_positions.h b/src/modules/ShortcutGuide/ShortcutGuide/tasklist_positions.h deleted file mode 100644 index 4ac5bed8a9..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/tasklist_positions.h +++ /dev/null @@ -1,29 +0,0 @@ -#pragma once -#include -#include -#include -#include -#include - -struct TasklistButton -{ - std::wstring name; - long x{}; - long y{}; - long width{}; - long height{}; - long keynum{}; -}; - -class Tasklist -{ -public: - void update(); - std::vector get_buttons(); - bool update_buttons(std::vector& buttons); - -private: - winrt::com_ptr automation; - winrt::com_ptr element; - winrt::com_ptr true_condition; -}; diff --git a/src/modules/ShortcutGuide/ShortcutGuide/trace.cpp b/src/modules/ShortcutGuide/ShortcutGuide/trace.cpp deleted file mode 100644 index f2a414d6ac..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/trace.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "pch.h" -#include "trace.h" - -#include - -TRACELOGGING_DEFINE_PROVIDER( - g_hProvider, - "Microsoft.PowerToys", - // {38e8889b-9731-53f5-e901-e8a7c1753074} - (0x38e8889b, 0x9731, 0x53f5, 0xe9, 0x01, 0xe8, 0xa7, 0xc1, 0x75, 0x30, 0x74), - TraceLoggingOptionProjectTelemetry()); - -void Trace::SendGuideSession(const __int64 duration_ms, const wchar_t* close_type) noexcept -{ - TraceLoggingWriteWrapper( - g_hProvider, - "ShortcutGuide_GuideSession", - TraceLoggingInt64(duration_ms, "DurationInMs"), - TraceLoggingWideString(close_type, "CloseType"), - ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), - TraceLoggingBoolean(TRUE, "UTCReplace_AppSessionGuid"), - TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); -} - -void Trace::SendSettings(ShortcutGuideSettings settings) noexcept -{ - TraceLoggingWriteWrapper( - g_hProvider, - "ShortcutGuide_Settings", - TraceLoggingWideString(settings.hotkey.c_str(), "Hotkey"), - TraceLoggingInt32(settings.overlayOpacity, "OverlayOpacity"), - TraceLoggingWideString(settings.theme.c_str(), "Theme"), - TraceLoggingWideString(settings.disabledApps.c_str(), "DisabledApps"), - TraceLoggingBoolean(settings.shouldReactToPressedWinKey, "ShouldReactToPressedWinKey"), - TraceLoggingInt32(settings.windowsKeyPressTimeForGlobalWindowsShortcuts, "WindowsKeyPressTimeForGlobalWindowsShortcuts"), - TraceLoggingInt32(settings.windowsKeyPressTimeForTaskbarIconShortcuts, "WindowsKeyPressTimeForTaskbarIconShortcuts"), - ProjectTelemetryPrivacyDataTag(ProjectTelemetryTag_ProductAndServicePerformance), - TraceLoggingBoolean(TRUE, "UTCReplace_AppSessionGuid"), - TraceLoggingKeyword(PROJECT_KEYWORD_MEASURE)); -} diff --git a/src/modules/ShortcutGuide/ShortcutGuide/trace.h b/src/modules/ShortcutGuide/ShortcutGuide/trace.h deleted file mode 100644 index a3446a8570..0000000000 --- a/src/modules/ShortcutGuide/ShortcutGuide/trace.h +++ /dev/null @@ -1,11 +0,0 @@ -#pragma once -#include "ShortcutGuideSettings.h" - -#include - -class Trace : public telemetry::TraceBase -{ -public: - static void SendGuideSession(const __int64 duration_ms, const wchar_t* close_type) noexcept; - static void SendSettings(ShortcutGuideSettings settings) noexcept; -}; diff --git a/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.vcxproj b/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.vcxproj index e24c0db76d..76a3e640a2 100644 --- a/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.vcxproj +++ b/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/ShortcutGuideModuleInterface.vcxproj @@ -8,9 +8,10 @@ 15.0 Win32Proj - {2d604c07-51fc-46bb-9eb7-75aecc7f5e81} + {E487304A-B1FB-4E6B-8E70-014051AF5B99} ShortcutGuideModuleInterface ShortcutGuideModuleInterface + 10.0.26100.0 DynamicLibrary @@ -37,7 +38,7 @@ - $(RepoRoot)$(Platform)\$(Configuration)\ + $(RepoRoot)$(Platform)\$(Configuration)\WinUI3Apps\ PowerToys.ShortcutGuideModuleInterface diff --git a/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/dllmain.cpp b/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/dllmain.cpp index a870fb9ad8..1d35f91cd9 100644 --- a/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/dllmain.cpp +++ b/src/modules/ShortcutGuide/ShortcutGuideModuleInterface/dllmain.cpp @@ -104,7 +104,10 @@ public: if (_enabled) { _enabled = false; - TerminateProcess(); + if (IsProcessActive()) + { + TerminateProcess(m_hProcess, 0); + } } else { @@ -131,10 +134,6 @@ public: virtual std::optional GetHotkeyEx() override { Logger::trace("GetHotkeyEx()"); - if (m_shouldReactToPressedWinKey) - { - return std::nullopt; - } return m_hotkey; } @@ -148,7 +147,7 @@ public: if (IsProcessActive()) { - TerminateProcess(); + TerminateProcess(m_hProcess, 0); return; } @@ -170,16 +169,6 @@ public: } } - virtual bool keep_track_of_pressed_win_key() override - { - return m_shouldReactToPressedWinKey; - } - - virtual UINT milliseconds_win_key_must_be_pressed() override - { - return std::min(m_millisecondsWinKeyPressTimeForGlobalWindowsShortcuts, m_millisecondsWinKeyPressTimeForTaskbarIconShortcuts); - } - private: std::wstring app_name; //contains the non localized key of the powertoy @@ -193,7 +182,6 @@ private: // If the module should be activated through the legacy pressing windows key behavior. const UINT DEFAULT_MILLISECONDS_WIN_KEY_PRESS_TIME_FOR_GLOBAL_WINDOWS_SHORTCUTS = 900; const UINT DEFAULT_MILLISECONDS_WIN_KEY_PRESS_TIME_FOR_TASKBAR_ICON_SHORTCUTS = 900; - bool m_shouldReactToPressedWinKey = false; UINT m_millisecondsWinKeyPressTimeForGlobalWindowsShortcuts = DEFAULT_MILLISECONDS_WIN_KEY_PRESS_TIME_FOR_GLOBAL_WINDOWS_SHORTCUTS; UINT m_millisecondsWinKeyPressTimeForTaskbarIconShortcuts = DEFAULT_MILLISECONDS_WIN_KEY_PRESS_TIME_FOR_TASKBAR_ICON_SHORTCUTS; @@ -219,7 +207,7 @@ private: SHELLEXECUTEINFOW sei{ sizeof(sei) }; sei.fMask = { SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI }; - sei.lpFile = L"PowerToys.ShortcutGuide.exe"; + sei.lpFile = L"WinUI3Apps\\PowerToys.ShortcutGuide.exe"; sei.nShow = SW_SHOWNORMAL; sei.lpParameters = executable_args.data(); if (ShellExecuteExW(&sei) == false) @@ -239,33 +227,18 @@ private: return true; } - void TerminateProcess() - { - if (m_hProcess) - { - if (WaitForSingleObject(m_hProcess, 0) != WAIT_OBJECT_0) - { - if (exitEvent && SetEvent(exitEvent)) - { - Logger::trace(L"Signaled {}", CommonSharedConstants::SHORTCUT_GUIDE_EXIT_EVENT); - } - else - { - Logger::warn(L"Failed to signal {}", CommonSharedConstants::SHORTCUT_GUIDE_EXIT_EVENT); - } - } - else - { - CloseHandle(m_hProcess); - m_hProcess = nullptr; - Logger::trace("SG process was already terminated"); - } - } - } - bool IsProcessActive() { - return m_hProcess && WaitForSingleObject(m_hProcess, 0) != WAIT_OBJECT_0; + if (!m_hProcess) + { + return false; + } + auto result = WaitForSingleObject(m_hProcess, 0); + if (result == WAIT_FAILED) + { + Logger::error("Failed to wait for SG process."); + } + return result == WAIT_TIMEOUT; } void InitSettings() @@ -289,10 +262,6 @@ private: void ParseSettings(PowerToysSettings::PowerToyValues& settings) { - m_shouldReactToPressedWinKey = false; - m_millisecondsWinKeyPressTimeForGlobalWindowsShortcuts = DEFAULT_MILLISECONDS_WIN_KEY_PRESS_TIME_FOR_GLOBAL_WINDOWS_SHORTCUTS; - m_millisecondsWinKeyPressTimeForTaskbarIconShortcuts = DEFAULT_MILLISECONDS_WIN_KEY_PRESS_TIME_FOR_TASKBAR_ICON_SHORTCUTS; - auto settingsObject = settings.get_raw_json(); if (settingsObject.GetView().Size()) { @@ -328,36 +297,6 @@ private: { Logger::warn("Failed to initialize Shortcut Guide start shortcut"); } - try - { - // Parse Legacy windows key press behavior settings - auto jsonUseLegacyWinKeyBehaviorObject = settingsObject.GetNamedObject(L"properties").GetNamedObject(L"use_legacy_press_win_key_behavior"); - m_shouldReactToPressedWinKey = jsonUseLegacyWinKeyBehaviorObject.GetNamedBoolean(L"value"); - auto jsonPressTimeForGlobalWindowsShortcutsObject = settingsObject.GetNamedObject(L"properties").GetNamedObject(L"press_time"); - auto jsonPressTimeForTaskbarIconShortcutsObject = settingsObject.GetNamedObject(L"properties").GetNamedObject(L"press_time_for_taskbar_icon_shortcuts"); - int value = static_cast(jsonPressTimeForGlobalWindowsShortcutsObject.GetNamedNumber(L"value")); - if (value >= 0) - { - m_millisecondsWinKeyPressTimeForGlobalWindowsShortcuts = value; - } - else - { - throw std::runtime_error("Invalid Press Time Windows Shortcuts value"); - } - value = static_cast(jsonPressTimeForTaskbarIconShortcutsObject.GetNamedNumber(L"value")); - if (value >= 0) - { - m_millisecondsWinKeyPressTimeForTaskbarIconShortcuts = value; - } - else - { - throw std::runtime_error("Invalid Press Time Taskbar Shortcuts value"); - } - } - catch (...) - { - Logger::warn("Failed to get legacy win key behavior settings"); - } } else { diff --git a/src/runner/main.cpp b/src/runner/main.cpp index 6960f61b26..e9f3840c30 100644 --- a/src/runner/main.cpp +++ b/src/runner/main.cpp @@ -260,7 +260,7 @@ int runner(bool isProcessElevated, bool openSettings, std::string settingsWindow L"PowerToys.KeyboardManager.dll", L"PowerToys.Launcher.dll", L"WinUI3Apps/PowerToys.PowerRenameExt.dll", - L"PowerToys.ShortcutGuideModuleInterface.dll", + L"WinUI3Apps/PowerToys.ShortcutGuideModuleInterface.dll", L"PowerToys.ColorPicker.dll", L"PowerToys.AwakeModuleInterface.dll", L"PowerToys.FindMyMouse.dll", diff --git a/src/settings-ui/Settings.UI.Controls/QuickAccess/QuickAccessViewModel.cs b/src/settings-ui/Settings.UI.Controls/QuickAccess/QuickAccessViewModel.cs index 81aa5e59c5..256cd9258d 100644 --- a/src/settings-ui/Settings.UI.Controls/QuickAccess/QuickAccessViewModel.cs +++ b/src/settings-ui/Settings.UI.Controls/QuickAccess/QuickAccessViewModel.cs @@ -168,18 +168,10 @@ namespace Microsoft.PowerToys.Settings.UI.Controls ModuleType.PowerOCR => SettingsRepository.GetInstance(SettingsUtils.Default).SettingsConfig.Properties.ActivationShortcut.ToString(), ModuleType.Workspaces => SettingsRepository.GetInstance(SettingsUtils.Default).SettingsConfig.Properties.Hotkey.Value.ToString(), ModuleType.MeasureTool => SettingsRepository.GetInstance(SettingsUtils.Default).SettingsConfig.Properties.ActivationShortcut.ToString(), - ModuleType.ShortcutGuide => GetShortcutGuideToolTip(), + ModuleType.ShortcutGuide => SettingsRepository.GetInstance(SettingsUtils.Default).SettingsConfig.Properties.OpenShortcutGuide.ToString(), ModuleType.MouseWithoutBorders => SettingsRepository.GetInstance(SettingsUtils.Default).SettingsConfig.Properties.ReconnectShortcut.ToString(), _ => string.Empty, }; } - - private string GetShortcutGuideToolTip() - { - var shortcutGuideSettings = SettingsRepository.GetInstance(SettingsUtils.Default).SettingsConfig; - return shortcutGuideSettings.Properties.UseLegacyPressWinKeyBehavior.Value - ? "Win" - : shortcutGuideSettings.Properties.OpenShortcutGuide.ToString(); - } } } diff --git a/src/settings-ui/Settings.UI.Library/ShortcutGuideProperties.cs b/src/settings-ui/Settings.UI.Library/ShortcutGuideProperties.cs index d34a2f748a..f1f1caaeab 100644 --- a/src/settings-ui/Settings.UI.Library/ShortcutGuideProperties.cs +++ b/src/settings-ui/Settings.UI.Library/ShortcutGuideProperties.cs @@ -15,34 +15,29 @@ namespace Microsoft.PowerToys.Settings.UI.Library public ShortcutGuideProperties() { - OverlayOpacity = new IntProperty(90); - UseLegacyPressWinKeyBehavior = new BoolProperty(false); - PressTimeForGlobalWindowsShortcuts = new IntProperty(900); - PressTimeForTaskbarIconShortcuts = new IntProperty(900); Theme = new StringProperty("system"); DisabledApps = new StringProperty(); OpenShortcutGuide = DefaultOpenShortcutGuide; + FirstRun = new BoolProperty(true); + WindowPosition = new IntProperty((int)ShortcutGuideWindowPosition.Left); } [JsonPropertyName("open_shortcutguide")] public HotkeySettings OpenShortcutGuide { get; set; } - [JsonPropertyName("overlay_opacity")] - public IntProperty OverlayOpacity { get; set; } - - [JsonPropertyName("use_legacy_press_win_key_behavior")] - public BoolProperty UseLegacyPressWinKeyBehavior { get; set; } - - [JsonPropertyName("press_time")] - public IntProperty PressTimeForGlobalWindowsShortcuts { get; set; } - - [JsonPropertyName("press_time_for_taskbar_icon_shortcuts")] - public IntProperty PressTimeForTaskbarIconShortcuts { get; set; } - [JsonPropertyName("theme")] public StringProperty Theme { get; set; } [JsonPropertyName("disabled_apps")] public StringProperty DisabledApps { get; set; } + + [JsonPropertyName("first_run")] + public BoolProperty FirstRun { get; set; } + + // Migrated from StringProperty ("left" / "right") to IntProperty in v3.0. + // The converter accepts both shapes so existing users' settings.json keeps working. + [JsonPropertyName("window_position")] + [JsonConverter(typeof(ShortcutGuideWindowPositionConverter))] + public IntProperty WindowPosition { get; set; } } } diff --git a/src/settings-ui/Settings.UI.Library/ShortcutGuideSettings.cs b/src/settings-ui/Settings.UI.Library/ShortcutGuideSettings.cs index 40174aeb81..89a2c26f9b 100644 --- a/src/settings-ui/Settings.UI.Library/ShortcutGuideSettings.cs +++ b/src/settings-ui/Settings.UI.Library/ShortcutGuideSettings.cs @@ -21,7 +21,7 @@ namespace Microsoft.PowerToys.Settings.UI.Library { Name = ModuleName; Properties = new ShortcutGuideProperties(); - Version = "1.0"; + Version = "2.0"; } public string GetModuleName() diff --git a/src/settings-ui/Settings.UI.Library/ShortcutGuideWindowPosition.cs b/src/settings-ui/Settings.UI.Library/ShortcutGuideWindowPosition.cs new file mode 100644 index 0000000000..ce91bb6343 --- /dev/null +++ b/src/settings-ui/Settings.UI.Library/ShortcutGuideWindowPosition.cs @@ -0,0 +1,12 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +namespace Microsoft.PowerToys.Settings.UI.Library +{ + public enum ShortcutGuideWindowPosition + { + Left = 0, + Right = 1, + } +} diff --git a/src/settings-ui/Settings.UI.Library/ShortcutGuideWindowPositionConverter.cs b/src/settings-ui/Settings.UI.Library/ShortcutGuideWindowPositionConverter.cs new file mode 100644 index 0000000000..f43c866352 --- /dev/null +++ b/src/settings-ui/Settings.UI.Library/ShortcutGuideWindowPositionConverter.cs @@ -0,0 +1,70 @@ +// Copyright (c) Microsoft Corporation +// The Microsoft Corporation licenses this file to you under the MIT license. +// See the LICENSE file in the project root for more information. + +using System; +using System.Text.Json; +using System.Text.Json.Serialization; + +namespace Microsoft.PowerToys.Settings.UI.Library +{ + // Reads either { "value": "left" | "right" } (legacy string form, pre-v3.0) or { "value": 0 | 1 } (current int form). + // Always writes the int form so saved settings.json migrates forward on first save. + public sealed class ShortcutGuideWindowPositionConverter : JsonConverter + { + public override IntProperty Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options) + { + if (reader.TokenType != JsonTokenType.StartObject) + { + throw new JsonException(); + } + + int value = (int)ShortcutGuideWindowPosition.Left; + while (reader.Read()) + { + if (reader.TokenType == JsonTokenType.EndObject) + { + return new IntProperty(value); + } + + if (reader.TokenType != JsonTokenType.PropertyName) + { + continue; + } + + bool isValueProp = string.Equals(reader.GetString(), "value", StringComparison.Ordinal); + reader.Read(); + + if (!isValueProp) + { + reader.Skip(); + continue; + } + + switch (reader.TokenType) + { + case JsonTokenType.Number: + value = reader.GetInt32(); + break; + case JsonTokenType.String: + value = string.Equals(reader.GetString(), "right", StringComparison.OrdinalIgnoreCase) + ? (int)ShortcutGuideWindowPosition.Right + : (int)ShortcutGuideWindowPosition.Left; + break; + default: + reader.Skip(); + break; + } + } + + return new IntProperty(value); + } + + public override void Write(Utf8JsonWriter writer, IntProperty value, JsonSerializerOptions options) + { + writer.WriteStartObject(); + writer.WriteNumber("value", value.Value); + writer.WriteEndObject(); + } + } +} diff --git a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ShortcutGuide.cs b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ShortcutGuide.cs index 6ebab902e7..11f7a266ee 100644 --- a/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ShortcutGuide.cs +++ b/src/settings-ui/Settings.UI.UnitTests/ViewModelTests/ShortcutGuide.cs @@ -48,7 +48,6 @@ namespace ViewModelTests // Verify that the old settings persisted Assert.AreEqual(originalGeneralSettings.Enabled.ShortcutGuide, viewModel.IsEnabled); - Assert.AreEqual(originalSettings.Properties.OverlayOpacity.Value, viewModel.OverlayOpacity); // Verify that the stub file was used var expectedCallCount = 2; // once via the view model, and once by the test (GetSettings) @@ -105,21 +104,5 @@ namespace ViewModelTests Func isDark = s => JsonSerializer.Deserialize(s).Properties.Theme.Value == "dark"; settingsUtilsMock.Verify(x => x.SaveSettings(It.Is(y => isDark(y)), It.IsAny(), It.IsAny()), Times.Once); } - - [TestMethod] - public void OverlayOpacityShouldSeOverlayOpacityToOneHundredWhenSuccessful() - { - // Arrange - var settingsUtilsMock = new Mock(new FileSystem(), null); - ShortcutGuideViewModel viewModel = new ShortcutGuideViewModel(settingsUtilsMock.Object, SettingsRepository.GetInstance(mockGeneralSettingsUtils.Object), SettingsRepository.GetInstance(mockShortcutGuideSettingsUtils.Object), msg => { return 0; }, ShortCutGuideTestFolderName); - Assert.AreEqual(90, viewModel.OverlayOpacity); - - // Act - viewModel.OverlayOpacity = 100; - - // Assert - Func equal100 = s => JsonSerializer.Deserialize(s).Properties.OverlayOpacity.Value == 100; - settingsUtilsMock.Verify(x => x.SaveSettings(It.Is(y => equal100(y)), It.IsAny(), It.IsAny()), Times.Once); - } } } diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/ShortcutGuide.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/ShortcutGuide.png index ccef1f4c31..0af878b776 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/ShortcutGuide.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/OOBE/ShortcutGuide.png differ diff --git a/src/settings-ui/Settings.UI/Assets/Settings/Modules/ShortcutGuide.png b/src/settings-ui/Settings.UI/Assets/Settings/Modules/ShortcutGuide.png index 85610c4190..0af878b776 100644 Binary files a/src/settings-ui/Settings.UI/Assets/Settings/Modules/ShortcutGuide.png and b/src/settings-ui/Settings.UI/Assets/Settings/Modules/ShortcutGuide.png differ diff --git a/src/settings-ui/Settings.UI/PowerToys.Settings.csproj b/src/settings-ui/Settings.UI/PowerToys.Settings.csproj index 352f7997f7..4c8a2a4456 100644 --- a/src/settings-ui/Settings.UI/PowerToys.Settings.csproj +++ b/src/settings-ui/Settings.UI/PowerToys.Settings.csproj @@ -19,6 +19,7 @@ PowerToys.Settings.pri + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShortcutGuide.xaml.cs b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShortcutGuide.xaml.cs index f979ddb6a4..0f3dcce35f 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShortcutGuide.xaml.cs +++ b/src/settings-ui/Settings.UI/SettingsXAML/OOBE/Views/OobeShortcutGuide.xaml.cs @@ -29,7 +29,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views private void Start_ShortcutGuide_Click(object sender, Microsoft.UI.Xaml.RoutedEventArgs e) { - var executablePath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "..", @"PowerToys.ShortcutGuide.exe"); + var executablePath = Path.Combine(System.AppDomain.CurrentDomain.BaseDirectory, "..", @"WinUI3Apps//PowerToys.ShortcutGuide.exe"); var id = System.Environment.ProcessId.ToString(CultureInfo.InvariantCulture); var p = Process.Start(executablePath, id); if (p != null) @@ -55,14 +55,7 @@ namespace Microsoft.PowerToys.Settings.UI.OOBE.Views ViewModel.LogOpeningModuleEvent(); var settingsProperties = SettingsRepository.GetInstance(SettingsUtils.Default).SettingsConfig.Properties; - if ((bool)settingsProperties.UseLegacyPressWinKeyBehavior.Value) - { - HotkeyControl.Keys = new List { 92 }; - } - else - { - HotkeyControl.Keys = settingsProperties.OpenShortcutGuide.GetKeysList(); - } + HotkeyControl.Keys = settingsProperties.OpenShortcutGuide.GetKeysList(); // Disable the Launch button if the module is disabled var generalSettings = SettingsRepository.GetInstance(SettingsUtils.Default).SettingsConfig; diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/ShellPage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/ShellPage.xaml index 45672e8180..8133708aaf 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/ShellPage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/ShellPage.xaml @@ -233,7 +233,11 @@ x:Uid="Shell_ShortcutGuide" helpers:NavHelper.NavigateTo="views:ShortcutGuidePage" AutomationProperties.AutomationId="ShortcutGuideNavItem" - Icon="{ui:BitmapIcon Source=/Assets/Settings/Icons/ShortcutGuide.png}" /> + Icon="{ui:BitmapIcon Source=/Assets/Settings/Icons/ShortcutGuide.png}"> + + + + + + + diff --git a/src/settings-ui/Settings.UI/SettingsXAML/Views/ShortcutGuidePage.xaml b/src/settings-ui/Settings.UI/SettingsXAML/Views/ShortcutGuidePage.xaml index 488c808230..fb36c12ad5 100644 --- a/src/settings-ui/Settings.UI/SettingsXAML/Views/ShortcutGuidePage.xaml +++ b/src/settings-ui/Settings.UI/SettingsXAML/Views/ShortcutGuidePage.xaml @@ -23,63 +23,13 @@ - - - - - + + - - - - - - - - - - - - - - - + @@ -89,13 +39,11 @@ - - - + + + + + @@ -126,5 +74,8 @@ + + + \ No newline at end of file diff --git a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw index fb1b793679..1fbb45f007 100644 --- a/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw +++ b/src/settings-ui/Settings.UI/Strings/en-us/Resources.resw @@ -503,7 +503,7 @@ opera.exe Product name: Navigation view item name for PowerRename - Shortcut Guide + Shortcut Guide V2 Product name: Navigation view item name for Shortcut Guide @@ -1125,17 +1125,13 @@ opera.exe Inactive color - Shows a help overlay with Windows shortcuts. - - - Press duration before showing global Windows shortcuts (ms) - ms = milliseconds + Displays an overlay with keyboard shortcuts for Windows and your apps. Activation method - Use a shortcut or press the Windows key for some time to activate + Use a shortcut to activate Shortcut Guide Custom shortcut @@ -1162,8 +1158,14 @@ opera.exe Shortcut Guide do not loc the Product name. Do you want this feature on / off - - Background opacity (%) + + Window position + + + Left + + + Right Exclude apps @@ -1366,7 +1368,7 @@ opera.exe do not loc the product name - Shortcut Guide + Shortcut Guide V2 GitHub repository @@ -2042,7 +2044,13 @@ Made with 💗 by Microsoft and the PowerToys community. Screen Ruler is a quick and easy way to measure pixels on your screen. - Shortcut Guide presents the user with a listing of available shortcuts for the current state of the desktop. + The new Shortcut Guide displays keyboard shortcuts for your apps and for the Windows environment. The following apps are included by default (with more to come in the future): +The Microsoft Windows Operating System +Windows Explorer +Notepad +Microsoft PowerToys + +The shortcuts always correspond to the most current application/Windows version. A collection of utilities to enhance your mouse. @@ -2204,7 +2212,7 @@ From there, simply click on one of the supported files in the File Explorer and Do not localize this string - Shortcut Guide + Shortcut Guide V2 Do not localize this string @@ -3779,10 +3787,6 @@ Activate by holding the key for the character you want to add an accent to, then Open as administrator - - Press duration before showing taskbar icon shortcuts (ms) - ms = milliseconds - A Windows shell extension to find out which processes are using the selected files and directories. {Locked="Windows"} diff --git a/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs index 99a1e70b81..a2228565d8 100644 --- a/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/DashboardViewModel.cs @@ -223,7 +223,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels IsEnabled = gpo == GpoRuleConfigured.Enabled || (gpo != GpoRuleConfigured.Disabled && ModuleHelper.GetIsModuleEnabled(generalSettingsConfig, moduleType)), IsLocked = gpo == GpoRuleConfigured.Enabled || gpo == GpoRuleConfigured.Disabled, Icon = ModuleHelper.GetModuleTypeFluentIconName(moduleType), - IsNew = false, + IsNew = moduleType == ModuleType.ShortcutGuide, DashboardModuleItems = GetModuleItems(moduleType), ClickCommand = new RelayCommand(DashboardListItemClick), }; @@ -793,9 +793,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels { ISettingsRepository moduleSettingsRepository = SettingsRepository.GetInstance(SettingsUtils.Default); - var shortcut = moduleSettingsRepository.SettingsConfig.Properties.UseLegacyPressWinKeyBehavior.Value - ? new List { 92 } // Right Windows key code - : moduleSettingsRepository.SettingsConfig.Properties.OpenShortcutGuide.GetKeysList(); + var shortcut = moduleSettingsRepository.SettingsConfig.Properties.OpenShortcutGuide.GetKeysList(); var list = new List { diff --git a/src/settings-ui/Settings.UI/ViewModels/ShortcutGuideViewModel.cs b/src/settings-ui/Settings.UI/ViewModels/ShortcutGuideViewModel.cs index 8c91cb4779..61cddf2966 100644 --- a/src/settings-ui/Settings.UI/ViewModels/ShortcutGuideViewModel.cs +++ b/src/settings-ui/Settings.UI/ViewModels/ShortcutGuideViewModel.cs @@ -54,10 +54,6 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels InitializeEnabledValue(); - _useLegacyPressWinKeyBehavior = Settings.Properties.UseLegacyPressWinKeyBehavior.Value; - _pressTimeForGlobalWindowsShortcuts = Settings.Properties.PressTimeForGlobalWindowsShortcuts.Value; - _pressTimeForTaskbarIconShortcuts = Settings.Properties.PressTimeForTaskbarIconShortcuts.Value; - _opacity = Settings.Properties.OverlayOpacity.Value; _disabledApps = Settings.Properties.DisabledApps.Value; switch (Settings.Properties.Theme.Value) @@ -66,6 +62,12 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels case "light": _themeIndex = 1; break; case "system": _themeIndex = 2; break; } + + switch (Settings.Properties.WindowPosition.Value) + { + case (int)ShortcutGuideWindowPosition.Right: _positionIndex = 1; break; + default: _positionIndex = 0; break; + } } private void InitializeEnabledValue() @@ -97,10 +99,7 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels private bool _enabledStateIsGPOConfigured; private bool _isEnabled; private int _themeIndex; - private bool _useLegacyPressWinKeyBehavior; - private int _pressTimeForGlobalWindowsShortcuts; - private int _pressTimeForTaskbarIconShortcuts; - private int _opacity; + private int _positionIndex; public bool IsEnabled { @@ -177,73 +176,24 @@ namespace Microsoft.PowerToys.Settings.UI.ViewModels } } - public int OverlayOpacity + public int PositionIndex { get { - return _opacity; + return _positionIndex; } set { - if (_opacity != value) + if (_positionIndex != value) { - _opacity = value; - Settings.Properties.OverlayOpacity.Value = value; - NotifyPropertyChanged(); - } - } - } + switch (value) + { + case 1: Settings.Properties.WindowPosition.Value = (int)ShortcutGuideWindowPosition.Right; break; + default: Settings.Properties.WindowPosition.Value = (int)ShortcutGuideWindowPosition.Left; break; + } - public bool UseLegacyPressWinKeyBehavior - { - get - { - return _useLegacyPressWinKeyBehavior; - } - - set - { - if (_useLegacyPressWinKeyBehavior != value) - { - _useLegacyPressWinKeyBehavior = value; - Settings.Properties.UseLegacyPressWinKeyBehavior.Value = value; - NotifyPropertyChanged(); - } - } - } - - public int PressTime - { - get - { - return _pressTimeForGlobalWindowsShortcuts; - } - - set - { - if (_pressTimeForGlobalWindowsShortcuts != value) - { - _pressTimeForGlobalWindowsShortcuts = value; - Settings.Properties.PressTimeForGlobalWindowsShortcuts.Value = value; - NotifyPropertyChanged(); - } - } - } - - public int DelayTime - { - get - { - return _pressTimeForTaskbarIconShortcuts; - } - - set - { - if (_pressTimeForTaskbarIconShortcuts != value) - { - _pressTimeForTaskbarIconShortcuts = value; - Settings.Properties.PressTimeForTaskbarIconShortcuts.Value = value; + _positionIndex = value; NotifyPropertyChanged(); } }