removing done specs to wiki (#1276)

This commit is contained in:
Clint Rutkas 2020-02-12 14:55:39 -08:00 committed by GitHub
parent 86e7a19a98
commit a2fe4a0b80
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 12 additions and 822 deletions

View file

@ -63,16 +63,6 @@ Chris Davis contributed his [SmartRename tool](https://github.com/chrdavis/Smart
![SmartRename](https://github.com/microsoft/PowerToys/raw/master/src/modules/powerrename/images/PowerRenameDemo.gif)
### Additional utilities in the pipeline are
* Maximize to new desktop widget - The MTND widget shows a pop-up button when a user hovers over the maximize / restore button on any window. Clicking it creates a new desktop, sends the app to that desktop and maximizes the app on the new desktop.
* [Process terminate tool](doc/specs/Terminate%20Spec.md)
* [Animated gif screen recorder](doc/specs/Gif-Maker.md)
### Backlog
The full backlog of utilities can be found [here](https://github.com/Microsoft/PowerToys/tree/master/doc/planning/PowerToysBacklog.md)
## What's Happening
### December Update
@ -147,10 +137,10 @@ provided by the bot. You will only need to do this once across all repos using o
This project has adopted the [Microsoft Open Source Code of Conduct][conduct-code]. For more information see the [Code of Conduct FAQ][conduct-FAQ] or contact [opencode@microsoft.com][conduct-email] with any additional questions or comments.
[conduct-code]: https://opensource.microsoft.com/codeofconduct/
[conduct-FAQ]: https://opensource.microsoft.com/codeofconduct/faq/
[conduct-email]: mailto:opencode@microsoft.com
## Privacy Statement
The application logs basic telemetry. Our Telemetry Data page (Coming Soon) has the trends from the telemetry. Please read the [Microsoft privacy statement](http://go.microsoft.com/fwlink/?LinkId=521839) for more information.
[conduct-code]: https://opensource.microsoft.com/codeofconduct/
[conduct-FAQ]: https://opensource.microsoft.com/codeofconduct/faq/
[conduct-email]: mailto:opencode@microsoft.com

View file

@ -1,108 +0,0 @@
# GIF Maker Spec
![Terminate](../images/Logo.jpg "Power Toys")
- **What is it:** Users can record their screen and turn the recording into a GIF.
- **Authors:** Benjamin Leverette and Prudence Phillips
- **Spec Status:** Draft
## 1. Overview
### 1.1. Elevator Pitch / Narrative
David loves using GIFs to add creativity to his typical responses to messages. His friend Amanda emails him and asks what he would like to eat for lunch today. David recently watched a burrito video, so he uses the GIF maker to screen record a brief moment from the video in order to tell Amanda that it's "Burrito Day."
### 1.2. Customers
Like all utilities from PowerToys, the GIF Maker feature is for power users and developers who are looking to tune and streamline their Windows experience for greater productivity.
### 1.3. Problem Statement and Supporting Customer Insights
Power users need a way to better record their screens and use the recordings to create GIFs. A teammate held a personal interactions with the community that validate the usefulness of a feature that provides such functionality.
### 1.4. Existing Solutions or Expectations
Users currently must use the game bar in order to record the screen, and there is no way to turn recordins into GIFs. There are third-party resources that allow users to create GIFs online after uploading images and videos.
### 1.5. Goals/Non-Goals
Design and develop a feature that can record screens and turn them into GIFs within an 8 week period.
## 2. Definition of Success
### 2.1. Expected Impact: Customer, and Technology Outcomes, Experiments + Measures
This feature will give users the ability to screen record and create GIFs effectively and add a new dimension to using GIFs on Windows. Measures of success include:
- A score of an average of 3.75 stars on a new Consumer Design Satisfaction Survey
- 5% increase in number of stars on the Github repo within first month of release
- Installed by 10% of users who have starred the PowerToys Github
- Uninstalled by less than 30% of users who installed
- Launched by over 60% of users who installed
## 3. Requirements
### 3.1. Functional Requirements
#### 3.1.1. Initial UX/UI
Users may or may not have any open windows on their screen. They can access this utility the same way you would access the Snip & Sketch tool on Windows or using an assigned keyboard shortcut. After the tool has been accessed by the user they can:
- Start a new screen recording
- The tool will record the user's entire screen
- Video can be saved in multiple formats (.GIF, .MP4, .HEIC, .M4A, etc...)
- Edit an already existing video into a GIF
- Keyboard Shortcut Suggestions:
- Ctrl + Alt + R
- Ctrl + Alt + G
![GIF Maker UI](images/GIF%20Maker%20Spec.png "GIF Maker UI")
#### 3.1.2. File Button Features
Upon opening the GIF Maker utility, users must click 'New' to begin. They will have two options: 'Record' and 'Open'.
- Record
- Choosing this option closes the GIF Maker window and displays a record button.
- When they click the record button, it starts a brief countdown. Once the countdown concludes, it records the user's entire screen.
- User clicks the stop button to end the recording
- Open
- If the user clicks 'Open', the mini File Explorer window opens for the user to select a video.
- Once a video is selected, it appears in the GIF Maker, below the tool bar, for the user to edit.
- Saving
- Recorded videos can be saved in multiple video formats
- Users can further edit their videos and save them as GIFs
#### 3.1.3. GIF Editing Tools
- Add Text
- Users can add text to their videos
- Default Windows fonts will be available
- Crop Video
- Users can crop their videos manually or use the default cropping options. The default options will include:
- 1:1
- 4:3
- 3:2
- 16:9
- Users can also leave their video in their original dimensions
- Trim Video
- Users can trim the length of their videos
- Users can make GIFs with a minimum time of 0.05 seconds and a maximum time of 6.00 seconds
#### 3.1.4. Settings
The PowerToys app will have a settings framework for the GIF Maker utility to plug into. The settings framework has a UI frame that creates a page for the utility. Its settings will be represented as a json blob with the following features:
### 3.2. Enable/Disable
- The user can select to enable or disable the GIF Maker utility's functionality, which initializes or suspends its resource use.
### 3.3. Custom Configuration
- Similar to the functionality of a switch or radio button, the user will be able to select options for the countdown: 0, 5, or 10 secs.
## 4. Dependencies
- Explore Internship Program limits us to an 8-week window to complete the task.
- Availability of public API's

View file

@ -1,266 +0,0 @@
![alt text][PowerToys_Logo]
- **What is it:** Users can remap their keys
- **Authors:** Sakariya Ahmed
- **Spec Status:** Draft
# 1. Overview
## 1.1 Key definitions
Here are a few definitions of words found throughout this document to ensure clarity:
- **Key Remapping:** Refers to the act of changing the output of a keystroke on your keyboard. An example is remapping the “Tab” key to “Delete”.
- **Shortcuts or Key shortcuts:** A combination of 2 or more keystrokes that results in a user-defined action. An example is <kbd>Ctrl</kbd>+<kbd>Z</kbd> un-doing an action in Microsoft Word
- **KSM:** Acronym for Keyboard Shortcut Manager
- **Keystroke:** A single press of a key
- **Exotic key:** These are keys that are unique and dont exist on many keyboards. Example: Calculator or search button.
## 1.2 Press Release
Powertoys has just released a new utility called “Keyboard Shortcut Manager”! This keyboard manager enables customers to customize their computer on a keyboard level. With it, all the keys on your keyboard are dynamic and can be remapped to provide different outputs.
Ever switched computers and the shortcut to search your computer was different? Or change the keys you press an app you use often? This utility is perfect if youre always looking to be more efficient on your computer or are a long-time user of a different OS and want to bring your keypresses and shortcuts with you!
## 1.3 Elevator Pitch
A keyboard is an extremely powerful and primary method of interacting with your operating system, and historically Windows has lacked the configurability to make this power extend to you, the user. With this new addition to Powertoys you gain access to the keyboards potential with the ability to remap keys and create user-defined keyboard shortcuts.
## 1.4 Tweet
*"Ever wish you could change some shortcuts and edit keyboard buttons? Or switch computers and your keyboard was slightly different? PowerToys is here to solve all your keyboard woes with a Keyboard Shortcut Manager! Customize your experience by remapping keys or creating new shortcuts!"*
## 1.5 Narrative / Scenario
**User Problem 1** - Mac/Linux “switch” users: A user who has recently made the switch to Windows and is having trouble adjusting to the keyboard differences. Simple tasks like locking the computer, copy / paste, and switching browsers now require thinking and the lack of muscle memory makes the user feels clumsy at times. For example, copying an object on MacOS, <kbd>cmd</kbd> + <kbd>C</kbd>, requires your thumb whereas on Windows, <kbd>Ctrl</kbd> + <kbd>C</kbd>, its your pinky. Even within identical applications there are shortcut disparities. Going to the address bar in Google Chrome on a Mac is <kbd>cmd</kbd> + <kbd>L</kbd>, on a PC, that would map to <kbd>Alt</kbd> + <kbd>D</kbd>.
**Outcome**: A successful KSM manager would increase comfortability and users wouldnt feel like they lost functionality or convenience with switching to Windows 10. In effect, it would help decrease churn and avoid a negative experience for a new user, which is crucial moment for public sentiment on Windows.
**User Problem 2** Users want customizability to make them faster: Developers, or power users, who use their keyboard a lot are constantly looking to save themselves time and make their processes more convenient. This community has largely relied on 3<sup>rd</sup> party tools or has left their keys alone but voiced frustration with the lack of a native tool to remap keys. An example of a power shortcut that made its way into Windows is <kbd>![Windows Key][winlogo]</kbd> + <kbd>L</kbd>. You used to have to hit <kbd>Ctrl</kbd> + <kbd>Alt</kbd> + <kbd>Del</kbd> then click “Lock”.
**Outcome**: A successful KSM manager would unlock functionality and convenience for many power users, increasing their everyday efficiency. Keyboard changes are highly visible and successfully extending control would greatly boost satisfaction to continue to cement Windows as the *ideal* platform for a developer.
## 1.6 Customers
We have two primary customers:
- **Developers/PowerUsers** of Windows10 that want a built-in and lightweight solution to remap their own hotkeys which will increase their efficiency in completing tasks.
- **Former Linux and MacOS** users who now use Windows and would like to utilize their former keyboard shortcuts to get rid of the learning period and ease the transition to using a new device.
## 1.7 Problem Statement and Supporting Customer Insights
Windows 10 is available on a multitude of devices and as such, various keyboard inputs are utilized to access the UI. The Keyboard and eyboard Shortcuts are an integral way of teracting with Windows and users have had difficulty accessing them when they have non-standard keyboards or knowledge of shortcuts from a different OS.
Comfortability/Ease of use, especially for new users, can be crucial as their first few interactions can cause frustration and result in a higher churn towards competitors. For developers and some seasoned users, where using their keyboard is a large part their job, ability
to remap keystrokes and engage executables can lead to massive gains in time. In fact, this was the [second most popular topic](https://github.com/microsoft/PowerToys/issues/6) measured through thumbs up and the most commented issue in the PowerToys Github.
## 1.8 Solutions or Expectations
To make-up for the lack of a built-in solutions users that have come across this issue only once often rely on learning the basic windows shortcuts and forgoing additional productivity. For users where this has become an ongoing concern, the vast majority who switch to the Powertoy will come with certain expectations as they have come to rely on a multitude of 3<sup>rd</sup> party solutions. 28% of survey respondents used 3<sup>rd</sup> party tools, and 60% of those who did used either AutoHotKey or SharpKeys.
*Various 3<sup>rd</sup> party solutions:*
The following are the most popular 3<sup>rd</sup> party apps across
different operating systems:
- AutoHotkey
- SharpKeys
- Karabiner (MacOS)
| | AutoHotKey | SharpKeys | Karabiner |
|--------------------------------|--------------------|--------------------|-------------------|
|Does the application have a UI? | ![alt text][cross] | ![alt text][check] |![alt text][check] |
|OS-Level Shortcuts</p> | ![alt text][check] | ![alt text][cross] |![alt text][check] |
|App-Level Shortcuts</p> | ![alt text][check] | ![alt text][cross] |![alt text][check] |
|Multi-keyboard support</p> | ![alt text][check] | ![alt text][cross] |![alt text][check] |
|Profiles for different uses</p> | ![alt text][cross] | ![alt text][check] |![alt text][check] |
**Sharpkeys** is an open source application created for Windows that allows the user to remap keys through their computers registry. It was created to make the process of accessing the registry and reprogramming keys more convenient for advanced users and accessible for casual users. The Sharpkeys GUI (*Figure 1*) allows users to keep track of remapped keys and import/export key configurations. When users try to remap a key, they can do it through pressing the key on their keyboard or selecting the key from a drop-drown menu. Both are exhaustive for North American users and the SharpKeys community is currently working to expanding their support for even more international keyboards. Sharpkeys requires a restart but doesnt require elevated permissions or to run in the background. It does not support the remapping of key combinations or shortcuts. Additionally, it is unable to remap keys that cannot be remapped from Windows registry access: Fn, Windows, Calculator, etc.
![alt text][sharpkey_landing]
Figure 1. SharpKeys: Landing Screen
![alt text][sharpkey_setting]
Figure 2. Sharpkeys: Key Remapping Input
**AutoHotKey** is a scripting language that runs on Windows and while it focuses on and was first created to remap keys and create shortcuts, it is capable of a lot more. Using AHK requires spending time reading their extensive documentation (*Figure 3)* to become adept at writing scripts. There is no GUI or interface that comes with AHK and it is all interpreted through a text editor. With AHK users can create both OS-level and app-specific shortcuts, however there is no simple way to share/save key configurations among multiple users. AHK has a very strong community that has been able to create tools that fill in many of the languages functionality gaps.
![alt text][ahk_documentation]
Figure 3. AutoHotKey Documentation
**Karabiner** is a MacOS solution for users to remap their keys. Karabiners interface (*Figure 4)* is intuitive and accessible to both beginner and advanced users. It is capable of what it calls “simple modifications, which are just remapping a single key to another key. Karabiner has support for multiple keyboards and the user can target a specific device or all devices for any remapping. Complex modifications (*Figure 5)* are defined by Karabiner as creating/editing shortcuts that consist of multiple key presses or mapping a shortcut to a single key. These complex modifications can be imported from Karabiners website where the community has created a vast array of key configurations. If you cannot find a suitable configuration, a user can create their own by using the terminal to open Karabiners JSON file. After learning the syntax from the reference manual, this JSON file can be edited to automatically add new user-defined rules.
![alt text][karabiner_landing]
Figure 4. Karabiner: Landing Screen
![alt text][karabiner_complex]
Figure 6. Karabiner: Complex Modifications
## 1.9 Survey Results
A brief survey was sent to the Windows Developer community during the planning stage of this utility. The consumer research was then used to inform this functional spec and test the preliminary hypothesis. Heres a summary of the survey results
- *Question*: Do you currently use any third-party tools to remap keys and/or create shortcuts?
- Nearly 30% of survey respondents used 3<sup>rd</sup> party tools. This indicates that there is not only a real demand for the utility and many users currently remap their keys.
- *Question*: Which third party tools do you use to remap keys and create shortcuts?
- The most popular 3<sup>rd</sup> party tool was AutoHotKey, followed by SharpKeys. Karabiner was not mentioned as this was sent to Windows developers but it was still highlighted in the competitive research due to its popularity among Mac users.
- *Question*: If you could improve the way that you manage your remap keys and create shortcuts using the third-party tools, what would you change?
- Over 50% of survey respondents asked for either native integration into Windows and / or a pleasant UI experience instead of scripting. This confirmed the decision to ensure users can engage with all of the utilitys functionality through a UI.
- *Question*: What features would you most like in in a keyboard shortcut manager besides remapping keys?
- \~70% of users requested shortcuts, either app-level or OS level, with OS shortcuts being the most demanded. This helped us prioritize the different features we planned in the functional spec.
- *Question*: If remapping your keyboard required a restart, would you still use this PowerToy?
- Before design, we were intimately aware that this could be a pain point for many users. Over 60% of respondents answered 'Yes', providing confidence that a restart, if necessary, is possible.
## 1.10 Goals / Non-Goals
#### *Goals*
- The KSM can be used to configure keypresses on Windows 10 with any built-in / external keyboard
- The KSM provides an intuitive and lightweight UI experience (53% of survey respondents who use 3<sup>rd</sup> party tools wanted integration into Windows and/or a UI)
- The KSM will be able to remap keys
- The KSM will be able to edit OS-level shortcuts
- The KSM will work with all keyboards, regardless of locale (Example: Japanese keyboard)
#### *Stretch Goals*
- The KSM will be able to edit app-level shortcuts
#### *Non-Goals*
- Require a reboot only when absolutely necessary (42% of survey respondents would not use this PowerToy if reboot was required)
## 2. Requirements
### 2.1 Functional Requirements Overview
| No. | Requirement | Pri |
| --- |-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- |
| 1 | Remap any button on keyboard to any other button on keyboard | P0 |
| 2 | OS-Level key shortcuts. Example: Making <kbd>![Windows Key][winlogo]</kbd> + <kbd>G</kbd> lock the computer. | P1 |
| 3 | App level keyboard shortcuts. Example: Going to the address bar in Chrome on a MacOS is <kbd>cmd</kbd>+<kbd>L</kbd>, on a PC, that would map to <kbd>Alt</kbd> + <kbd>D</kbd>. | P2 |
| 4 | Settings page that easily configures all supported scenarios. | P1 |
| 5 | The Powertoys Shortcut Guide needs to be aware of keyboard remaps. Example: If <kbd>![Windows Key][winlogo]</kbd> + <kbd>G</kbd> locks the computer the Shortcut Guide needs to list this as the method to lock a computer, not <kbd>![Windows Key][winlogo]</kbd> + <kbd>L</kbd>. | P1 |
| 6 | A Mac ready profile that is prepopulated with commonly used remappings and adjustments. | P1 |
| 6 | A Linux ready profile that is prepopulated with commonly used remappings and adjustments. | P1 |
| 7 | Multiple keyboard support. Example: Surface Laptop and Surface keyboard have different layout and a remap maybe needed. | P1 |
| 8 | The KSM needs to meet accessibility requirements. | P1 |
| 9 | The KSM needs to meet localization requirements. | P1 |
### 2.2 Functional Requirements for remapping of keys
| No. | Requirement | Pri |
| --- | ------------------------------------------------------------------------------------------------------------------------------------- | --- |
| 1 | Remapping of keys is done through a user interface. User is able to select the key to remap and the corresponding key to remap it to. | P1 |
| 2 | Support for global and key-board specific shortcuts. Example: See Karabiner | P2 |
| 3 | Function Key remap | P3 |
| 4 | Remapping of keys can be done through a JSON file | P3 |
### 2.3 Functional Requirements for OS-Level shortcuts
| No. | Requirement | Pri |
| --- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | --- |
| 1 | Can disable any existing OS-level shortcuts. Example: <kbd>![Windows Key][winlogo]</kbd> + <kbd>C</kbd> | P0 |
| 2 | OS-level shortcuts have priority over apps that come with shortcuts. Example: <kbd>Alt</kbd> + <kbd>Enter</kbd> will trigger OS action, not excel-specific action when in Excel | P1 |
| 3 | Winkey shortcuts have priority over app-specific shortcuts | P2 |
### 2.4 Functional Requirements for App-Level shortcuts *(stretch goal)*
| No. | Requirement | Pri |
|-----|------------------------------------------------------------|-----|
| 1 | A list of available apps on computer with *friendly names* | P2 |
| 2 | Assign app-level shortcuts through settings UI | P2 |
| 3 | Able to set global shortcut exceptions to certain apps | P3 |
### 2.5 Functional Requirements for Settings
| No. | Requirement | Pri |
| - | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --- |
| 1 | Recognize key presses. | P0 |
| 2 | Clearly show what keys cannot be remapped | P1 |
| 3 | Option to reset to default | P1 |
| 4 | Save, load, and export KSM settings so they can be loaded onto a different computer | P1 |
| 5 | Warn users if any Winkey shortcuts have been orphaned. Example: Mapping <kbd>![Windows Key][winlogo]</kbd> + <kbd>D</kbd> to <kbd>![Windows Key][winlogo]</kbd> + <kbd>L</kbd> in one-direction, ergo no longer providing the user a method to lock their PC. | P1 |
| 6 | Display all remapping and shortcut changes that have been made | P1 |
| 7 | Settings are capable of dark mode | P2 |
| 8 | Warn users when multiple keys have the same function. Example: Left <kbd>Alt</kbd> and Right <kbd>Alt</kbd> | P2 |
| 9 | I am presented with a list of all the current OS-level key mapping and shortcuts in use | P3 |
| 10 | Users can quickly swap profiles for different workloads. Example: See \#2 | P3 |
### 2.6 Functional Requirements Open Questions / Concerns
#### 2.6.1 Circular reference
- When two or more keys are remapped to each other the logic needs to ensure there is never a loop and clear indication regarding priority order of operations.
#### 2.6.2 WinKey Priority and Access
- Should certain shortcuts be restricted to the user? Example: <kbd>![Windows Key][winlogo]</kbd> + <kbd>D</kbd>
#### 2.6.3 Multiple Keyboards Shortcut support
- Currently, there exists no plan to incorporate the creation of shortcuts for specific keyboards. Is this an expected use case?
#### 2.6.4 SharpKey / AHK Partnership
- SharpKey has weak copy-left license (Ms-PL Microsoft Public License) and we need to evaluate whether any of its codebase is useful. AutoHotKeys scripting model could help us but we need to validate if its possible / if it's a good idea. 52% of survey respondents who used 3<sup>rd</sup> party tools used AHK and 68% used either AHK or Sharpkeys.
#### 2.6.5 Elevated Permissions
- Is consistently running elevated (aka run as admin) required for the Keyboard Shortcut Manager?
#### 2.6.6 F-Key / Fn key ignore
- Can we have a setting that makes <kbd>Fn</kbd> keys (i.e <kbd>F1</kbd>-<kbd>F12</kbd>) always act like function keys?
## 3. Measure Requirements
| No. | Requirement | Implication | Pri |
| - | ------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------- | --- |
| 1 | \# of keys being remapped per user and which keys | Insight into use and whether certain keys are persistent across community\* | P1 |
| 2 | \# of OS-level shortcuts created vs \# of App-level shortcuts | Understand how users are using shortcuts | P1 |
| 3 | \# of times the same user loads different key configurations. | Should multi-profile use be prioritized | P1 |
| 4 | \# of times built-in shortcuts are disabled | Recommended defaults for developers | P1 |
| 5 | \# of times built-in shortcuts are remapped | Recommended defaults for developers | P1 |
| 6 | Specificity and frequency of *exotic* keys being remapped. | Whether the KSM is missing keys and if some keys not useful | P1 |
| 7 | \# of visits to the KSM editor/settings in a given time period | Continuous visits could imply lack of clarity with UX or bug in app | P1 |
| 8 | Frequency of keys being mapped to each other (swapped). Example: <kbd>*Key A*</kbd> -> <kbd>Key B</kbd>, <kbd>Key B</kbd> -> <kbd>Key C</kbd>, <kbd>Key C</kbd> -> <kbd>*Key A*</kbd> | Whether auto/hot swapping needs to be prioritized | P1 |
| 9 | Amount of people that have remapped turned on / off | Information on whether KSM is being utilized | P1 |
| 10 | Maximum number of keyboards someone has attached to their keyboard in a 28-day period | Validates whether to prioritize additional keyboard support | P1 |
## 4. UI Mockup
### See below for screenshots of the UI mockups:
*Please understand that these are preliminary**
### 4.1 Main UI Settings
![alt text][ui_main]
### 4.2 Main UI Settings Cont'd
![alt text][ui_main2]
### 4.3 Remapping Keys Settings
![alt text][ui_remap1]
### 4.4 Keyboard Selection
![alt text][ui_remap2]
### 4.5 Detecting Key Presses
![alt text][ui_remap3]
### 4.6 Edit Shortcuts Settings
![alt text][ui_editshortcuts1]
### 4.6 Detecting Shortcut Key Presses
![alt text][ui_editshortcuts2]
[cross]: ./images/keymanager/icon-cross.png "Does not do"
[check]: ./images/keymanager/icon-check.png "Feature"
[karabiner_landing]: ./images/keymanager/karabiner_landingpage.png "Karabiner landing page"
[karabiner_complex]: ./images/keymanager/karabiner_complexmodifications.png "Karabiner complex settings"
[ahk_documentation]: ./images/keymanager/autohotkey_landingpage.png "AutoHotKey landing page"
[sharpkey_landing]: ./images/keymanager/sharpkeys_landingpage.png "SharpKeys landing page"
[sharpkey_setting]: ./images/keymanager/sharpkeys_selectkey.png "SharpKeys detecting key settings"
[PowerToys_Logo]: ./images/keymanager/PowerToys_Logo.png "PowerToys Logo"
[ui_Main]: ./images/keymanager/UI_mainsettings.png "Settings Landing page "
[ui_main2]: ./images/keymanager/UI_mainsettings2.png "Settings Landing page continued"
[ui_remap1]: ./images/keymanager/UI_remapsettings.png "Remapping Keys"
[ui_remap2]: ./images/keymanager/UI_remapsettings2.png "Drop down "
[ui_remap3]: ./images/keymanager/UI_remapsettings3.png "Remapping key pop up"
[ui_editshortcuts1]: ./images/keymanager/UI_editshortcut.png "Edit Shortcuts Settings"
[ui_editshortcuts2]: ./images/keymanager/UI_editshortcut2.png "Edit Shortcuts key pop up"
[winlogo]: ./images/keymanager/winkey.png

View file

@ -1,60 +0,0 @@
# PowerRename File Classification Spec
![Power Rename](../images/Logo.jpg "Power Toys")
- **What is it:** Users can quickly rename and group files.
- **Authors:** Benjamin Leverette and Prudence Phillips
- **Spec Status:** Draft
## 1. Overview
### 1.1. Elevator Pitch / Narrative
David has recently uploaded thousands of pictures from his camera to his Surface Laptop. Unfortunately, the images all have generic names such as 'IMG_141' instead of labels that he can identify. David downloads the File Classification PowerToy that allows him to create new folders with files that share a label, rename a group of files with a label, or change the name or portion of a name in a group of files to another name.
### 1.2. Customers
Like all utilities from PowerToys, the File Classification feature is for power users and developers who are looking to tune and streamline their Windows experience for greater productivity.
### 1.3. Problem Statement and Supporting Customer Insights
Power users need a better way to organize files, from renaming files to creating new folders for similar files. Our PowerToys Consumer Survey received feedback validating the usefulness of a feature that provides such functionality.
### 1.4. Existing Solutions or Expectations
Users currently have to highlight a group of files and right click to rename them. Users must manually create a folder, move files to that folder, and rename them. There are third-party resources that allow users to rename files similarly.
We expect users to install and enable PowerToys for Windows in order to access the File Classification utility.
### 1.5. Goals/Non-Goals
Design and develop a feature that can rename and group files within an 8 week period.
## 2. Definition of Success
### 2.1. Expected Impact: Customer, and Technology Outcomes, Experiments + Measures
Our PowerToys Consumer Survey received an abundant amount of participation and feedback from a community of passionate power users. This feature will give them the ability to rename, group and organize files in a way that makes their virtual library of files more organized and efficient. As interns, we would have 8 weeks to complete the project.
## 3. Requirements
### 3.1. Functional Requirements
- Users must select a group of files by checking each file or using Shift + directional keys. They must then use a shortcut to open the File Classification utility, which provides three options:
- Automates folder creation and movement of user-selected files after receiving a label determined by the user.
- Renames all user-selected files after receiving a label determined by the user.
- Identifies a string of characters in the names of user-selected files and changes it to a string determined by the user.
- Labels are used to rename files by completely overwriting the files' current names with the custom 'Label' typed by the user and each file receives a counting number.
- Shortcut should take accessibility into account.
- Perhaps Windows key + C?
![Rename](images/File%20Classification%20Design%20Blurred.png "Rename")
### 3.2. Measure Requirements
- Survey what power users want out of the File Classification feature through forms and Github.
## 4. Dependencies
- Explore Internship Program limits us to an 8-week window to complete the task.
- Availability of public API's

View file

@ -1,215 +0,0 @@
# FancyZones
## FancyZones
FancyZones is the base class that runs the show. It uses hooks to monitor for windows entering and exiting the move/size loop and to listen for key presses for hotkey interception. For every connected display, it creates a ZoneWindow which is used to display the active ZoneSet per monitor for use when editing the layout or displaying the drop targets. A ZoneSet is composed of one or more Zones which are the locations where windows can be easily positioned.
### SetWinEventHook
The main driving force behind FancyZones is the accessibility hook used to know when a window enters the move/size loop. It listens for EVENT_SYSTEM_MOVESIZESTART, EVENT_SYSTEM_MOVESIZEEND, and EVENT_OBJECT_LOCATIONCHANGE. For each of these three events, it forwards on to the ZoneWindow associated with the monitor that the window being dragged is currently on.
### Keyboard Hook
A low-level keyboard hook is installed in order to, optionally, intercept Window+Arrow hotkeys. Traditionally, Win+Left/Right arrow will move a window between Windows Snap regions. This hook allows FancyZones to use Win+Left/Right arrow to move windows between Zones.
The hook also allows using 0-9 to change the active ZoneSet during a drag operation.
### Display Changes
During initial standup, FancyZones creates a ZoneWindow for each connected monitor. When it receives a WM_DISPLAYCHANGE, it updates the available ZoneWindows to reflect the state of the system (eg add a new ZoneWindow for newly connected monitor, delete ZoneWindow for disconnected monitor, etc)
### Interface
```
interface IFancyZones : public IUnknown
{
// Returns the main application window
IFACEMETHOD_(HWND, GetWindow)() = 0;
// Returns the global HINSTANCE for the process
IFACEMETHOD_(HINSTANCE, GetHInstance)() = 0;
// Returns the global Settings object used to look up individual settings throughout the product
IFACEMETHOD_(Settings, GetSettings)() = 0;
// Used in WinMain to initialize FancyZones and enter the message loop
IFACEMETHOD_(void, Run)() = 0;
// Toggles the visibility of all ZoneWindows
IFACEMETHOD_(void, ToggleZoneViewers)() = 0;
// Shows a single ZoneWindow in editor mode on the provided monitor
IFACEMETHOD_(void, ShowZoneEditorForMonitor)(_In_ HMONITOR monitor) = 0;
// Returns true if we are currently detecting a movesize loop
IFACEMETHOD_(bool, InMoveSize)() = 0;
// Called by the event hook in response to EVENT_SYSTEM_MOVESIZESTART
IFACEMETHOD(MoveSizeEnter)(_In_ HWND window, _In_ HMONITOR monitor, POINT ptScreen) = 0;
// Called by the event hook in response to EVENT_SYSTEM_MOVESIZEEND
IFACEMETHOD(MoveSizeExit)(_In_ HWND window, POINT ptScreen) = 0;
// Called by the event hook in response to EVENT_OBJECT_LOCATIONCHANGE
IFACEMETHOD(MoveSizeUpdate)(_In_ HMONITOR monitor, POINT ptScreen) = 0;
// Called during startup or on WM_DISPLAYCHANGE to add a ZoneWindow to the collection
// There will be one ZoneWindow per connected monitor
IFACEMETHOD(AddZoneWindow)(_In_ IZoneWindow* zoneWindow, _In_ HMONITOR monitor) = 0;
// Called in response to WM_DISPLAYCHANGE from the main application window
IFACEMETHOD_(void, OnDisplayChange)(DisplayChangeType changeType) = 0;
// Used to move the specified HWND into Zone
// The ZoneSet used is found by looking up the monitor that window is currently on
// This gets called to keep windows in their current zones after a WM_DISPLAYCHANGE
IFACEMETHOD_(void, MoveWindowIntoZoneByIndex)(_In_ HWND window, int index) = 0;
// Used to filter out windows that the hook should not be processing
// Currently checks if the window's GWL_STYLE has WS_MAXIMIZEBOX
IFACEMETHOD_(bool, IsInterestingWindow)(_In_ HWND window) = 0;
// Called byt the event hook in response to EVENT_OBJECT_NAMECHANGE on the Desktop window
// The accessible name of the desktop window changes when the current virtual desktop changes
IFACEMETHOD_(void, VirtualDesktopChanged)() = 0;
// Returns the GUID of the current active virtual desktop
IFACEMETHOD_(GUID, GetCurrentVirtualDesktopId)() = 0;
// Called by the LL keyboard hook
// Used to override snap hotkeys and to change the active ZoneSet during a drag
IFACEMETHOD_(bool, OnKeyDown)(LPARAM lparam) = 0;
// Keep windows positioned inside their zones when the active ZoneSet changes
IFACEMETHOD_(void, MoveWindowsOnActiveZoneSetChange)() = 0;
};
```
## ZoneWindow
ZoneWindow is used to display the Zones a user can drop a window in during a drag operation, flash the Zones when the ZoneSet changes, and draw the Zone Editor UI when in edit mode. Basically, when a ZoneSet needs to be visualized, ZoneWindow does it.
### Interface
```
interface IZoneWindow : public IUnknown
{
// Shows the ZoneWindow
// If activate is true, set foreground to the window otherwise just show
IFACEMETHOD(ShowZoneWindow)(bool activate) = 0;
// Hide the ZoneWindow
IFACEMETHOD(HideZoneWindow)() = 0;
// Called when the drag enters the monitor this ZoneWindow is assigned to
IFACEMETHOD(MoveSizeEnter)(_In_ HWND window, POINT ptScreen, DragMode dragMode) = 0;
// Called when the drag exits the monitor
IFACEMETHOD(MoveSizeExit)(_In_ HWND window, POINT ptScreen) = 0;
// Called when the drag updates position on this monitor
IFACEMETHOD(MoveSizeUpdate)(POINT ptScreen, DragMode dragMode) = 0;
// Called when a drag ends and the window is not dropped in a Zone
IFACEMETHOD(MoveSizeCancel)() = 0;
// Returns the DragMode of the current drag operation
// DragMode allows for overriding drag behavior via settings or via hotkey
IFACEMETHOD_(DragMode, GetDragMode)() = 0;
// Part of the chain to move a window into a specific Zone
IFACEMETHOD_(void, MoveWindowIntoZoneByIndex)(_In_ HWND window, int index) = 0;
// Used to cycle a window between zones via the hijacked snap hotkeys
IFACEMETHOD_(void, MoveWindowIntoZoneByDirection)(_In_ HWND window, DWORD vkCode) = 0;
// Called in response to WM_DISPLAYCHANGE
// Allows cleanup, if necessary, since ZoneWindow will be destroyed shortly thereafter
IFACEMETHOD_(void, OnDisplayChange)(DisplayChangeType type) = 0;
// Allows changing the active ZoneSet via key press either during a drag or while the ZoneWindow is in foreground
IFACEMETHOD_(void, CycleActiveZoneSet)(DWORD vkCode) = 0;
};
```
## ZoneSet
Collection of one or more Zones. Only one ZoneSet is active at a time per monitor.
### Interface
```
interface IZoneSet : public IUnknown
{
// Gets the unique ID used to identify this ZoneSet
IFACEMETHOD_(GUID, GetId)() = 0;
// Adds a Zone to the collection
IFACEMETHOD(AddZone)(_In_ Microsoft::WRL::ComPtr<IZone> zone, bool front) = 0;
// Removes a Zone from the collection
IFACEMETHOD(RemoveZone)(_In_ Microsoft::WRL::ComPtr<IZone> zone) = 0;
// Returns the topmost Zone at the given point
IFACEMETHOD_(Microsoft::WRL::ComPtr<IZone>, ZoneFromPoint)(POINT pt) = 0;
// Returns a Zone that the window is in
// Will return nullptr if the window is not in a Zone
IFACEMETHOD_(Microsoft::WRL::ComPtr<IZone>, ZoneFromWindow)(_In_ HWND window) = 0;
// Gets all the Zones
IFACEMETHOD_(std::vector<Microsoft::WRL::ComPtr<IZone>>, GetZones)() = 0;
// ZoneSetLayout
// * Grid - Pregenerated layout (2x2, 3x3, etc)
// * Row - Pregenerated layout in a single row
// * Focus - Pregenerated layout with a central focus Zone and fanned peripheral Zones
// * Custom - User generated Zone
IFACEMETHOD_(ZoneSetLayout, GetLayout)() = 0;
// The amount of default padding between Zones in a generated layout
IFACEMETHOD_(int, GetInnerPadding)() = 0;
// Makes a copy of the IZoneSet and marks it as ZoneSetLayout::Custom
IFACEMETHOD_(Microsoft::WRL::ComPtr<IZoneSet>, MakeCustomClone)() = 0;
// Persists ZoneSet data to the registry
IFACEMETHOD_(void, Save)() = 0;
// Moves a Zone to the front of the collection
IFACEMETHOD_(void, MoveZoneToFront)(_In_ Microsoft::WRL::ComPtr<IZone> zone) = 0;
// Moves a Zone to the back of the collection
IFACEMETHOD_(void, MoveZoneToBack)(_In_ Microsoft::WRL::ComPtr<IZone> zone) = 0;
// Part of the chain to move a window into a specific Zone
IFACEMETHOD_(void, MoveWindowIntoZoneByIndex)(_In_ HWND window, _In_ HWND zoneWindow, int index) = 0;
// Part of the chain to move a window into a specific Zone
IFACEMETHOD_(void, MoveWindowIntoZoneByDirection)(_In_ HWND window, _In_ HWND zoneWindow, DWORD vkCode) = 0;
// Called when a drag ends or leaves the monitor this ZoneWindow is on
// This will remove the window from its currently assigned Zone and assign it
// to a different Zone based on the current cursor position
IFACEMETHOD_(void, MoveSizeExit)(_In_ HWND window, _In_ HWND zoneWindow, _In_ POINT ptClient) = 0;
};
```
## Zone
Basically a RECT and a map of HWND->RECT to keep track of where windows can be placed and which windows are currently in the Zone.
### Interface
```
interface IZone : public IUnknown
{
// Returns the RECT that this Zone represents
IFACEMETHOD_(RECT, GetZoneRect)() = 0;
// Returns true if the specified window is in this Zone's collection
IFACEMETHOD_(bool, ContainsWindow)(_In_ HWND window) = 0;
// Adds the window the collection
IFACEMETHOD_(void, AddWindowToZone)(_In_ HWND window, _In_ HWND zoneWindow, bool stampZone) = 0;
// Removes the window from the collection
IFACEMETHOD_(void, RemoveWindowFromZone)(_In_ HWND window, bool restoreSize) = 0;
// Sets an id for this Zone
// The id will be unique per ZoneSet
IFACEMETHOD_(void, SetId)(size_t id) = 0;
// Returns the id given to this Zone
IFACEMETHOD_(size_t, GetId)() = 0;
};
```

View file

@ -1,57 +0,0 @@
# Power Toys Settings Framework and Core Infrastructure
The Power Toys app will have a settings framework that each Power Toy can plug into. The settings framework has a UI frame that creates a page for each Power Toy. The UI frame should use the Navigation View “hamburger” UI. Each Power Toy will represent its settings as a json blob as described below.
Each Power Toy will live in a separate .dll and be run in a separate thread by the main Power Toys process. The main Power Toys .exe will expose key global Windows event handlers so that there is only one system-level hook for these critical events. The current set of Power Toys require these global events. This list will be amended as new Power Toys are authored that require additional global hooks.
* SetWinEventHook - FancyZones requires knowledge of when a window enters the move/size loop. It listens for EVENT_SYSTEM_MOVESIZESTART, EVENT_SYSTEM_MOVESIZEEND, and EVENT_OBJECT_LOCATIONCHANGE messages from SetWinEventHook.
* Low-level keyboard hook - The Windows key Shortcut Guide and FancyZones both require low-level keybord hooks to intercept keyboard input and get a first chance to process it. Other Power Toys will require this as well
* Each Power Toy must listen for 4 events:
* Enable When invoked, enables the Power Toys functionality and performs any necessary initialization. Invoked with a JSON string from the persisted settings store
* Disable When invoked, disables the Power Toys functionality and performs any clean-up to suspend all resource use
* OutputSettings Return a json serialized blob of the settings for the Power Toy
* InputSettings Invoked with a JSON string with updated settings from the UI which is then deserialized and the state is applied. If the settings cannot be applied by the Power Toy, the PT must return an error and an error string for the end user
* Each Power Toy may optionally provide one or more custom configuration UIs that can be invoked from its settings page
* Each custom UI is specified as a JSON string in the settings property bag
* The Power Toy must provide a named method that returns a serialized JSON settings string for the settings framework to call
* The method should launch UI to edit the settings but the UI shown must be asynchronous and not block the setting UI
* The Power Toys main .exe will provide a method called InvokeSettingsUI that will show the settings dialog for the calling Power Toy.
* Settings will be serialized by the settings framework and will be read at launch of the Power Toys framework and each Power Toys settings will be passed into the PTs Enable method
* Settings will be serialized on a per-user basis
* The Settings JSON format will be versioned and each payload must specify it's version attribute. The initial version is 1.0
## Power Toys Settings Object
The settings JSON object for each Power Toy should provide:
* Title string
* Icon
* Logo Image
* Credits string
* Credits link
* Settings property bag. Each item in the property bag has two items:
* String: display name
* String: property / editor type
* Version number: Currently only 1.0 is supported
Property Bag of settings in priority order (type->editor)
* Bool->slide switch
* Int->free text box
* String->free text box
* Int ->Up/Down spinner
* Color-> Color picker
* Image->File picker, preview area, drag and drop
* Cursor->file picker and drop down, possibly an image
* Property Bag JSON string->Button to launch a custom editor from the Power Toy
* Method name to invoke. The method will return a serialized JSON string with the updated custom editor settings
* String to display on the button
* Percentage->Slider
* Time->Time picker
* Date->Date picker
* IP address->masked text box
## PowerToys Main Settings Page
* Need to get Nick to help with the settings UI design (see attached for a whiteboard sketch)
* Need to have a settings page for overall PowerToys which will include the following
* Check for updates
* Startup at launch
* Enable / disable for each utility.
* This invokes the Enable and Disable events for the PowerToy and suspends all resource use including CPU, GPU, Networking, Disk I/O and memory commit
* The settings UI should have an “Apply” button which will push the settings object to

View file

@ -1,89 +0,0 @@
# **Terminate Program Spec**
![Terminate](../images/Logo.jpg "Power Toys")
- **What is it:** Shortcut for users to quickly terminate a running program
- **Authors:** Benjamin Leverette and Prudence Phillips
- **Spec Status:** Draft
## 1. Overview
### 1.1. Elevator Pitch / Narrative
Mike is debugging his code in Visual Studio and the program freezes with the "App not responding" text displaying on the title bar, informing him that he cannot continue his work without closing the program and restarting it. Mike has tried to close the program using the close button and end task via the task manager, but none of these mechanisms work in helping him terminate the process so he can proceed with his work. With this PowerToy installed, Mike now has a visual and accessible last-resort method to help him kill the process.
### 1.2. Customers
PowerToys is mainly targeted towards Windows Power Users though it is available to users who want to experience using windows in a more efficient and productive way.
### 1.3. Problem Statement and Supporting Customer Insights
Windows users need an accessible mechanism to completely kill a process when it is being unresponsive and hindering work flow. The team is still required to find solutions for:
- A public name for this PowerToy.
- The degree to which the process will be terminated.
### 1.4. Existing Solutions or Expectations
The current methods a user can close a running program in Windows include:
- Clicking on the close button in the program
- Closing the program via task manager
- Using the keyboard shortcut Alt + F4 to close the program
### 1.5. Goals/Non-Goals
- Develop this PowerToy and have sufficient time for testing and integration within our assigned 8 weeks for the project.
- Meet customers expectation with end result of project.
## 2. Definition of Success
### 2.1. Expected Impact: Customer, and Technology Outcomes, Experiments + Measures
The PowerToys repo currently has 200+ people watching, over 4000 stars and 109 forks on github despite having an empty repo. Also, this particular PowerToy received a rating of 3.44/5 in the survey we sent out to the community asking them to rate how useful they think it will be. after the release of this PowerToy, the following will be used to measure our success rate:
- At least a 5% increase in Github stars within a month of release
- A 3.75/5 rating on a post-completion Consumer Satisfaction Survey on this PowerToy.
- 100 downloads & installs within the first month of release.
- Less than 40% of unistalls by users who install this PowerToy
## 3. Requirements
### 3.1. Functional Requirements
To use this PowerToy, a user will:
- Press the chosen keyboard shortcut. This will display the 'Terminate' window.
- Click the left mouse button anywhere in the Terminate Window and drag the cursor to whatever other window they wish to kill.
- Note: users can configure in their options to disable the yes/no prompt and just terminate apps instantly.
- Release the left mouse button over the new app to kill it.
- Once they are done with the utility, user closes the terminate window to exit.
![Terminate](images/Terminate%20Blurred.png "Terminate")
- Keyboard shortcut
- Alt + Shift + X
3.1.1 Settings
The PowerToys app will have a settings framework for the Terminate utility to plug into. The settings framework has a UI frame that creates a page for the utility. Its settings will be represented as a json blob with the following features:
- Enable/Disable
- The user can select to enable or disable the Terminate utility's functionality, which initializes or suspends its resource use.
- Custom Configuration
- Similar to the functionality of a switch or radio button, the user will be able to select options for the appearance of the mouse cursor.
### 3.2 Public Name
The initially proposed name for this app is Terminate App. However, there are multiple other alternative names that we are also considering:
- Destroy App
- Knockdown Program
- Dismantle App
## 4. Dependencies
- The 8 week time limit of the explore internship
- Availability of public APIs, since we intend to make this project open source.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 812 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 213 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 858 B

View file

@ -1,20 +1,15 @@
# Specs
This folder is where specs for PowerToys will be stored.
All approved specs are inside the [Wiki](https://github.com/microsoft/PowerToys/wiki)
## Planning
## Spec process
- [Terminate](Terminate%20Spec.md)
- [GIF Maker](Gif-Maker.md)
1. A proposed item is either new or requesting additional design
2. Spec is written inside the Specs folder and a PR happens with feedback.
3. Once spec is signed off, we move it into the [Wiki](https://github.com/microsoft/PowerToys/wiki).
## System knowledge
## Thought process behind this
- [PowerToys Settings](PowerToys-fancyzones.md)
- [PowerToys shared hooks](Shared-hooks.md)
We want a single wholistic for PowerToys. This includes both source code, docs, and specs. At the same time, we want to ensure items have pull requests and feedback. Since the wiki cannot do PR's, we will do the process above.
## Done
- [FancyZones](PowerToys-fancyzones.md)
- [PowerRename](PowerRename.md)
- [Keyboard Manager](KeyboardManager.md)
- Windows key shortcut guide
This process will allow specs to be image rich but not impact the primary repository's size as more items come online.