2.2.23. Restricting Mouse Movement for Painting Straight Lines

When using painting functions like PrusaSlicer’s support seam placement, it can be very handy to restrict mouse movement to a single axis if the software doesn’t support the feature natively. The Mouse Keys feature available in most mainstream operating systems can help.

Note

These notes are based on my experiences with the Prusa i3 Mk3 and Artillery/Evnovo Sidewinder X1 printers. If you are using a different printer, please verify the hardware details are similar.

In a recent discussion on seam painting on the Prusa forums, someone mentioned the ability to restrict mouse movement to a single axis with some software. This got me thinking about alternatives that would work cross-platform with software like PrusaSlicer that doesn’t currently offer such a feature. In a discussion on this topic in the comments section of a Prusa knowledgebase article, user @Hermes Endakis mentioned using Mouse Keys on Mac to restrict mouse motion.

I gave the Mouse Keys accessibility feature a try. Apparently this feature has existed in most mainstream GUI operating systems since the 1980s with the X Window window manager, so this procedure should work (with some variation) on most mainstream operating systems today. I tried it out on my Mac as follows:

  1. Enable Mouse Keys in your OS (varies).

  2. Position the cursor in PrusaSlicer close to the point you want using the normal mouse.

  3. Tap the Option key 5 times to enable Mouse Keys (button may vary by OS).

  4. Nudge the mouse to your desired start point.

  5. Tap the 0 tenkey button to enable click & hold.

  6. Move with the tenkey arrow keys to draw a straight line.

  7. Tap the . tenkey button to release the mouse button hold.

  8. Tap the Option key 5 times to disable Mouse Keys.

I was pleased with the results. The procedure is a little clunky, but works well enough until Prusa implements a feature in PrusaSlicer. For some reason, I was only able to use this procedure successfully using a ten key pad on my Mac, but I may have missed something. I use a cheap offboard ten key pad when needed.

Restricting mouse movement when painting seams

Fig. 2.28 Restricting mouse movement when painting seams

If you want to try this with other Operating Systems, here are some links. The specific buttons for mouse functions do seem to vary between operating systems and no doubt implementations. I’m also looking into keyboard or mouse button macros to make this a little easier to use.

For another approach on painting straight lines with PrusaSlicer specifically, user @David made a suggestion to use the esc key while holding the mouse button in that same knowledgebase article. User @Swiss_Cheese has expanded on this approach further.

Users of 3DConnexion products may be able to use the “dominant” feature to limit motion to one axis. Unfortunately, this only seems to apply to the SpaceMouse product.

Contact and feedback

You can find me on the Prusa support forums or Reddit where I lurk in many of the 3D printing-related subreddits. I occasionally drop into the Official Prusa 3D discord server where I can be reached as bobstro (bobstro#9830). You can email me directly at projects@ttlexceeded.com.

Last edited on 7 Apr, 2022. Last build on Apr 22, 2022.