microsoft / PowerToys

Windows system utilities to maximize productivity
MIT License
111.87k stars 6.59k forks source link

Mouse Utility - Constrain Movement via hotkey - Toggle precision mode via hotkey #25156

Open mike-macdermott opened 1 year ago

mike-macdermott commented 1 year ago

Description of the new feature / enhancement

Preface: The mouse is the most important tool we have for interacting with graphical user interfaces, which are the majority of all computer interactions. Many utilities that currently exist to enhance this interaction experience are poorly planned, ill or partially implemented, or most commonly, gimmicky and vendor/hardware/device specific. software control and configuration of fancy or extreme device sensors or capabilities are mildly useful at best ( button to toggle DPI) and useless bloatware at worst. most importantly, most mice require separate specific software installation for each device, including those from the same vendor! (looking at you logitech...). Forget about productivity if you need to frequently switch mice....Point is, consideration/customization of the mouse input/interaction is largely an afterthought, and even amongst the features supported, rarely does anything modify or enhance the actual positional input the mouse was designed for (except dpi settings).

Feature Description: Constrain mouse movement Similar to using the ruler in windows snipping tool, the user should be able to hold a hotkey and have their mouse movement constrained/restrained exclusively to a single degree of freedom (DOF). Greatly enhanced utility and customization would come from being able to dampen, rather than ignore, input outside of the designated constraint. Whereas the directional input is slowed (or even accelerated?) as a function of distance from the designated constraint. exponential and linear functions would serve as a "gravity" guide along the constraint but enable small deviations. a sigmoid function would serve as a "magnetic" guide enabling the ability to "break free" during operation. you get the idea.
Precision mode Finally, separate from constraints, the utility feature would enable the ability to toggle a "precision" mode as found on some mice hardware as a dpi toggle to dampen all mouse movement when active. In my experience, this is very useful, but only available as jump to a specific predefined magnitude of dampening. In reality, the level of precision needed varies between tasks or even parts of a single task. this should be modifiable/scaled on the spot using the scroll wheel while hotkey is held.

Minimum functional capability would be to constrain to either horizontal or vertical movement and toggle precision mouse mode. Integration with Microsoft Surface Dial in addition to or instead of mouse scroll wheel would be a plus!

Additional functional capabilities may include:

CAUTION it is functionally imperative that constraints are only active while a hotkey is pressed to avoid user confusion, or getting "locked out" of a gui if a user gets pulled away and replaced by another unfamiliar user. knives are very useful, but dangerous in the wrong hands.

Multiple constraints might seem frivolous at first, but could be very useful. Imagine I have two columns of items, I want to drag a number of individual items from the first column to the second, with two vertical "magnetically" damped constraint/guides, I can effortlessly grab and snap items between them. maintaining perfect vertical alignment is just a bonus.

Periodic constraints would greatly facilitate drawing equally spaced points on a line, drawing a grid, placing items in a 1D or 2D array, and drawing concentric circles.

Methods to determine which DOF is desired and other interface options is open for debate

at a minimum I think one hotkey should activate an exclusive undamped horizontal constraint and one for a vertical constraint. ideally these would be next to each other (allowing for something like drawing a rectangle easily by toggling between the two) to reduce cognitive load

A single hotkey to toggle precision mode should suffice.

At least one hotkey to enforce/release a custom defined constraint (and alternate?) would be very helpful

Scenario when this would be used?

It is important to understand that this tool will be important to the power user not just to make precision work easier (or even an option) but also for accessibility reasons. Many users do not have access to specialized input devices and must operate with sub-optimal standard input devices. Some users must draw or drag something from point a to b. this is much more difficult for users that have tremors, tics, arthritis, etc.. it is true that this presents a more general difficulty of using a computer at all for these users, however affliction severity varies, and more importantly, some mouse movements are more important than others. This tool will help with those.

While usage scenarios are pervasive to many software, typical cases would be:


Constrain to 45-degree diagonals:

This feature allows users to create and edit diagonal lines and elements more precisely, which is particularly useful in design tasks, such as isometric drawings, architectural plans, or geometric patterns.

Constrain to arbitrary slopes

By constraining to arbitrary slopes, users can create custom lines and shapes that perfectly match the requirements of their projects, leading to more versatile and precise designs.

Constrain to slopes from a specific anchor point

This feature allows users to create custom slopes originating from a specific point, ensuring consistency and precision in designs that require multiple lines extending from a central location. Like the vanishing point in perspective drawings

Modify slope angle dynamically (with scroll wheel?)

This feature enables users to adjust the slope angle in real-time, providing a more fluid and adaptive design experience.

Constrain to Rotational DOF (like protractor in snipping tool)

This feature allows users to create and edit circular or arc-based elements with precision, which is particularly useful in tasks involving radial designs, such as logos or clock faces.

Constrain to parabola

This feature enables users to create and edit parabolic curves, which can be crucial in tasks involving curves or arcs with varying curvature, such as in graphs, architectural designs, or motion paths. Usage Example: A user creating a motion path for an animation can constrain the mouse movement to a parabola, ensuring a smooth and natural trajectory for the animated object. Usage Example: A student sketching optical designs

Modify Curvature/Radii dynamically (with scroll wheel?)

This feature allows users to adjust the curvature or radii of curves and arcs in real-time, providing a more flexible and adaptive design experience.

Constrain to arbitrary Curves

This feature enables users to create and edit custom curves, providing precise control over the shape and form of their designs

Bezier Curves via a Bézier curve builder interface

Bezier curves allow highly complex and abnormal curves to be easily created and specified using an interface very many are familiar with

Mathematical curves via equation input

This feature allows users to create and edit curves based on mathematical equations, providing extreme control over the shape without resorting to a complex charting software Usage Example: student sketching an aspherical lens design Usage Example: teacher in a remote classroom sketching a guassian curve or a windowed signal

Modify a single equation variable dynamically (with scroll wheel?)

This feature enables interactive realtime control over the given equation, allowing to see and sketch how to changes over time/input Usage Example: A user creating a sine wave visualization can dynamically modify the amplitude or frequency of the wave, providing a more interactive and adaptable design experience.

implement visual interface to overlay/rotate/translate/scale equation

This feature provides users with a visual interface to fit the mathematical curves constraint to their specific task, offering a more intuitive and accessible method for adjusting the position, scale, and orientation of the curve within their design. Usage Example: An architect sketching a building with a curved facade can overlay the mathematical curve on the design, rotate, translate, and scale the curve to achieve the desired appearance.

Enable constraint damping/deviation

This feature allows users to control the strength of the constraint, offering more flexibility in their mouse movements and the ability to make small deviations from the constraint when necessary. Usage Example: A digital artist working on a hand-drawn illustration can use constraint damping to create smoother lines while still maintaining a natural, organic feel in their work.

Modify damping behavior as a function of distance from constraint

This feature enables more control and adaptability in movements.

allow function and scale to be specified

This feature allows the strength and behavior of deviations from the damped constraint to be modified and customized

Enable multiple simultaneous (active?) constraints

This feature allows users to work with multiple constraints at the same time, increasing efficiency and productivity in tasks that require precise alignment or positioning of elements. Usage Example: A user organizing items in a grid layout can apply both horizontal and vertical constraints simultaneously, ensuring perfect alignment and spacing between items.

Enable periodic constraints

This feature allows users to create constraints that repeat at regular intervals, offering a more efficient method for creating patterns or evenly spaced elements. Usage Example: A artist creating a pattern with repeating elements can use periodic constraints to ensure consistent spacing and alignment between each element in the pattern. think of sketching a rubiks cube

Enable 2D constraints via stencils

This feature allows for outlining or filling in of a 2D area on the monitor

provide common shapes

provide common engineer/survey stencils

allow import of custom stencil shapes

Modify magnitude of precision mode with scroll wheel

This feature will greatly enhance use of the precision mode by allowing real time dynamic magnitude adjustments

Supporting information

advanced professional software suites like Adobe, AutoCAD, and ArcGIS have some exclusive support for "drawing constraints", but even then the professional nature makes them inaccessible to the masses. Implementing these features in powertoys can change the entire operating experience for anyone with repetitive manual tasks or tasks requiring precise selection, drawing, or alignment, and allows use across all aspects of daily software use from high end to even crude tools. the features are unlikely to ever be implemented into the operating system itself and power users are the perfect audience for this feature as they will know their task requirements, be able to quickly understand the feature benefits and uses, and employ them heavily.

Logue-0 commented 1 year ago

Would love something like this. Could start simple, just constraining the movement to a grid pattern (only horizontal/vertical or both at the same time) would be awesome.

crutkas commented 1 year ago

https://support.microsoft.com/en-us/windows/use-mouse-keys-to-move-the-mouse-pointer-9e0c72c8-b882-7918-8e7b-391fd62adf33

mike-macdermott commented 1 year ago

https://support.microsoft.com/en-us/windows/use-mouse-keys-to-move-the-mouse-pointer-9e0c72c8-b882-7918-8e7b-391fd62adf33 @crutkas

I would like to disagree and appeal the tags you modified as they are fundamentally different tools:

While there is a small functionality overlap in that Mouse Keys could be used to move a cursor exclusively laterally or vertically, the speed and precision available is nothing like that which is proposed. Anyone that has used Mouse Keys that is used to a typical mouse device can attest that the comparison is clunky at best. (Just consider attempting to play a knock off flappy bird game moving the mouse via Mouse Keys vs a finger on a hotkey and a hand on the mouse.....) sure you can change the acceleration speed, but you can't change it on the fly. The proposed utility will offer the full dynamic range and spatial attunement that power users have developed over the years. On top of this fact is that this lowers the barrier to engagement as it does not require taking the hand off of the mouse to use in what most cases will primarily be a mouse operated GUI software. Finally, this is only considering the absolute bare bones implementation. As I'm sure anyone can see, this is just the foundation for all of the more advanced functions that this can offer, enumerated in the original post.

But it starts with the fact that even the proposed minimum constraints are much more dynamic and useful to the power user than Mouse Keys. Which is a different tool, for a different job.

lynnewu commented 1 year ago

Would also like the ability to dynamically (and temporarily) change mouse speeds via modifier keys.

Templar01 commented 1 year ago

I must disagree with the notion that this has been already addressed in Windows. This categorization misinterprets the use-case here.

I can also add my request to this as well. There are many use cases whereby I find myself jumping into mousekeys to constrain my mouse movement. While this is a workaround, it is exactly that, a workaround that breaks one's workflow.

What I would suggest is that we start off simple by allowing just simple vertical and horizontal movement. This used to be a feature in one of the 3rd party mouse drivers but fell out of favor as more applications adopted a specific internal mouse movement hotkey.

I would use this in illustration tools such as in PowerPoint, CAD, and a myriad of other drafting-like tools whereby drawing a straight line would be ideal. Even inside Snip & Sketch, it would add a very valuable enhancement to be able to simply draw a straight line which Snip & sketch does not support.

I should also mention that this has been addressed with a modest and imprecise script using AHK. Here is a post regarding that. This tool called draglock actually embodies the concept proposed here but since it uses a third part utility, it is very rough.

https://windowsforum.com/threads/alternative-software-to-drag-lock-to-constrain-mouse-movement-in-one-direction-eg-horizontal-vertical-diagonal.256659/

https://www.dcmembers.com/skrommel/download/draglock/

mike-macdermott commented 4 months ago

Following up on this feature request as it is still relevant, unaddressed, warranted, community supported, and unfulfilled.

@crutkas can you please remove the resolution tag/label from this feature request/issue?

lynnewu commented 4 months ago

None of the requested functionality is present in any version of Windows. Mouse keys addresses a fundamentally different problem. Unfortunately, I simply am out of time or would be happy to hack on this. :(