DynaMouse

Finally, a system for Mac that allows you to have multiple mice, multiple monitors and assign each to one another. While Mac allows for multiple mice plugged-in at the same time, it doesn't allow multiple cursors at the same time.

DynaMouse
GitHub - projectstorm/dynamouse: macOS multi-mouse & multi-external display assignment for complex screen and peripheral workstations.
macOS multi-mouse & multi-external display assignment for complex screen and peripheral workstations. - projectstorm/dynamouse

A few weeks ago, I went through the process of reconfiguring my home music studio. A big part of my new setup, involves orienting my midi keyboard 90 degrees from my main primary ultra-wide monitor. As such, I also have a monitor above this keyboard (with its own trackpad and keyboard) resulting in two monitor + input stations orientated perpendicular to each other. Both are connected to the same computer.

When I produce music, I do all my editing on my primary ultra-wide, but then rotate my chair towards my keyboard to record synths. This ultimately means I am constantly switching monitors as well as input methods. This would ordinarily not be an issue, but since I am constantly dragging my mouse long distances between screens very frequently, and macOS only support a single cursor, this is actually a rather big inconvenience.

After some thorough searching on the web, I could not find any software that allows for mouse/screen assignment (or multiple monitors etc..). BetterTouchTool was the closest I could get, but ultimately it was still hacky and not really up to the task. That's when penny dropped and I finally figured I would give this a go.

Enter DynaMouse

DynaMouse is a non obtrusive Typescript & Electron application that monitors USB input devices using HID libraries to detect serial events. When DynaMouse runs for the first time it asks for 'Accessibility' permissions and upon success, hides from the Mac Dock, appears as a menubar item and you can then proceed to assign a screen to one of your connected 'mouse' input devices.

Using the node-HID library: when we detect any input from a device we 1) store the current mouse position on the previosly active device, deregister the affected device listener, position the mouse cursor using robot libraries to the configured screen and setup new listeners to all the other input devices. The process then repeats when a different input device is activated.

The result is that we can now 'virtually' assign devices to various screens allowing your physical workstation to 'emulate' multiple cursors.

Future Work

Multiple cursors

While macOS does not support this natively, it should be possible to render a transparent window with a virtual mouse without requiring the de-registration of each device

Sensitivity based activation

Sometimes vibrations from the woofers in my studio speakers can accidentally trigger the high sensitivity optical sensors in my gaming mice. This results in the cursor switching to the assigned screen accidentally. The fix for this is to setup a sort of throttle/time-based-debounce (various libraries support this) and then only activate when a threshold is crossed. I would implement this using t-shirt size-settings per assignment.