Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The lesser known ms paint feature #348

Open
Heinrich-XIAO opened this issue Oct 22, 2024 · 1 comment
Open

The lesser known ms paint feature #348

Heinrich-XIAO opened this issue Oct 22, 2024 · 1 comment

Comments

@Heinrich-XIAO
Copy link

When you hold space in ms paint, you can use the arrow keys to draw similarly to an etch-a-sketch.

@1j01
Copy link
Owner

1j01 commented Nov 4, 2024

What version of MS Paint supports this? And what tools?
I can't seem to demonstrate this feature in this Windows 98 VM.

Edit: I found it in Windows 11's MS Paint. (I don't know why but it didn't seem to work the first time I tried.)

So it works by moving the actual mouse cursor. I can't do this in JS, not in the browser. Browsers don't let webpages move the cursor for security reasons. However I could implement something that hides the real cursor and shows a fake one inside the web page.

Looks like they support drawing with the brush/pencil, creating selections with the selection tool, creating shapes, and even focusing UI under the mouse by pressing space, although there are some UX problems like there's apparently no way to accept a shape with the keyboard without moving it out of the way enough for pressing space to click off of it instead of resizing it. (I would expect Enter to work but it doesn't.)
You can also Tab between the resize handles of a selection or shape, moving the cursor to each one. After pressing Tab, the arrow keys will immediately start resizing rather than requiring spacebar to click and drag the handles.
After focusing UI under the mouse by pressing space, such as the tool selector, it doesn't select a tool when pressing space or enter, but this seems like a bug, possibly due to the behavior of focusing the UI under the mouse interfering with the behavior of activating focused tool buttons with space.
Tabbing to the focus the canvas allows you to move the mouse again with the arrow keys.

All in all, it seems like a pretty nice feature. They also have mouse acceleration, where if you hold the arrow keys down it starts to go faster, giving it a balance of precision and speed.

I'm mainly targeting recreating MS Paint from Windows 98, but this is definitely something I would add in "from the future", as it's largely invisible (doesn't add any GUI that would detract from the nostalgia). However the fact that I can't directly move the mouse cursor (as well as the UX problems/bugs noted above) means that it would require some UX consideration.

This feature is similar to the dwell clicking and head tracking features I've been building, and perhaps could share the same code for hover halos, clickable element filtering, and mouse movement and clicking simulation.
Indeed, perhaps I should build these features into Tracky Mouse, or modularize Tracky Mouse more as needed to use these features of the library separately...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@1j01 @Heinrich-XIAO and others