Skip to content

Let the mouse draw, on the tools rather than the gestures - #81

Merged
marcosqlbi merged 4 commits into
mainfrom
feature/mouse-mode
Aug 30, 2026
Merged

Let the mouse draw, on the tools rather than the gestures#81
marcosqlbi merged 4 commits into
mainfrom
feature/mouse-mode

Conversation

@marcosqlbi

Copy link
Copy Markdown
Collaborator

Someone who downloaded a whiteboard onto a laptop with no pen and no touchscreen found that the toolbar did nothing. 1.1 conceded that at startup and collected votes in discussion 78. This answers it, as 1.2.0.

Mouse drawing is a setting — Off / On / WhenNoDigitizer, defaulting to the last — under which the left button does what the selected tool does. One rule governs it and any later change to it: a mouse gets the tools, not the gestures. Everything on the toolbar becomes reachable, and nothing that exists because of what a hand and a pen can do — pressure, hover, the reverse end, the barrel button — is simulated with modifiers and timers.

Ctrl is the old mouse: it selects, moves and resizes a container and hands the drawing tool back, which is what the left button did on its own. Ctrl takes double-click framing with it, because two quick dabs with an ink tool are two strokes and the click count is tested before the tool branch. The tool otherwise stops being handed back after every gesture, including a right-button pan, which would have taken someone who chose the Eraser and quietly left them holding a pen.

Pressure is the neutral constant the straight-line constraint already draws at. Deriving it from speed was rejected: the width would vary for a reason the hand cannot feel. Calligraphy is unaffected, since its width comes from speed rather than pressure, and the highlighter already ignores pressure.

Why this is small

Decision 22. AppendInkPoint — renamed from AppendPenInkPoint, which is all it needed — takes a screen point and a pressure and has no idea what device it is serving, so the mouse gets the straight-line constraint and the calligraphy dynamics without a second implementation. PointerAction.Erase was already written and unreachable from the mouse.

Not one line of the pen path changed, which was the condition for building it at all: every mouse handler already returned early on a non-null StylusDevice. Mouse drawing can therefore be left on beside a pen, which is why On is offered and not only the automatic default.

Reviewing

The proposal, with the alternatives weighed and rejected, is docs/mouse-mode.md; the settled form is decision 23. Worth a look in review:

  • InkSurface_PreviewMouseDown and BeginMouseAction — the branch order, and that borrowSelect reproduces today's behaviour exactly when the setting is off.
  • CompleteMouseAction releases the capture itself, which fires LostMouseCapture synchronously mid-decision; that path returns early rather than clearing _mouseToolBorrowed out from under it.
  • EndMouseInk nudges a stationary stroke, because two coincident points enclose nothing to render and a click would otherwise draw nothing where a pen tap draws a dot.

Verification

Build is clean and the Core smoke tests pass, including the settings round-trip and the version 12 → 13 upgrade. Those tests are UI-free, so the behaviour itself is not covered by them — the nine-step checklist added to the README under "Mouse drawing validation" has not been walked. Step 9 is the one that matters: on a pen machine with Mouse drawing On, draw with the pen and confirm nothing about it changed.

🤖 Generated with Claude Code

marcosqlbi and others added 4 commits August 30, 2026 19:13
Someone who downloaded a whiteboard onto a laptop with no pen and no
touchscreen found that the toolbar did nothing. 1.1 conceded that at
startup and collected votes in discussion 78. This answers it.

Mouse drawing is a setting, on by default exactly where Windows reports
neither a stylus nor a touchscreen, under which the left button does what
the selected tool does. One rule governs it and any later change to it: a
mouse gets the tools, not the gestures. Everything on the toolbar becomes
reachable, and nothing that exists because of what a hand and a pen can do
- pressure, hover, the reverse end, the barrel button - is simulated with
modifiers and timers.

Ctrl is the old mouse: it selects, moves and resizes a container and hands
the drawing tool back, which is what the left button did on its own. Ctrl
takes double-click framing with it, because two quick dabs with an ink tool
are two strokes and the click count is tested before the tool branch. The
tool otherwise stops being handed back after every gesture, including a
right-button pan, which would have taken someone who chose the Eraser and
quietly left them holding a pen.

Pressure is the neutral constant the straight-line constraint already draws
at. Deriving it from speed was rejected: the width would vary for a reason
the hand cannot feel. Calligraphy is unaffected, since its width comes from
speed rather than pressure, and the highlighter already ignores pressure.

This is small because of decision 22. AppendInkPoint - renamed from
AppendPenInkPoint, which is all it needed - takes a screen point and a
pressure and has no idea what device it is serving, so the mouse gets the
straight-line constraint and the calligraphy dynamics without a second
implementation. PointerAction.Erase was already written and unreachable
from the mouse.

Not one line of the pen path changed, which was the condition for building
it at all: every mouse handler already returned early on a non-null
StylusDevice. Mouse drawing can therefore be left on beside a pen, which is
why On is offered and not only the automatic default.

The proposal, with the alternatives weighed and rejected, is
docs/mouse-mode.md; the settled form is decision 23. Version is 1.2.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The mouse-drawing edits read as a different voice from the pages around
them: four paragraphs in the guide where Finger drawing gets one sentence
and a table column, and shortcut rows twice the length of their neighbours.
Cut to match, and dropped the phrasings that belong in the decision log
rather than on a page someone is reading to learn the application - "a
mouse gets the tools, not the gestures" among them.

The guide's new section was also inserted between the Navigation table and
the paragraph that closes that section, splitting it. It now follows the
section rather than interrupting it, and the parts of the page that already
name Finger drawing - the Pan tool row, the palette paragraph, and the
navigation lede - name Mouse drawing beside it instead of repeating
themselves lower down.

Ctrl + left button in the shortcut list also stops nesting one kbd inside
another and uses the same markup as every other modifier combination on the
page.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Mouse drawing took five sentences in an FAQ whose other answers take one or
two. What a mouse cannot do - pressure, hover, the rear eraser - belongs in
the guide, where someone has already decided to read; the FAQ says what it
is and where the switch is.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Trimming only the mouse sentences left the older Finger drawing text as the
long half of an answer whose neighbours run to one or two sentences. Both
settings now get one clause each. What was dropped is documented where it is
useful rather than lost: two-finger navigation and the toolbar buttons are
in the guide and the shortcut list, and the caveat that Windows reports a
list of digitizers rather than what is plugged in is in the Preferences
entry itself, which is where someone reads it while making the choice.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@marcosqlbi
marcosqlbi merged commit e9f1145 into main Aug 30, 2026
4 checks passed
@marcosqlbi
marcosqlbi deleted the feature/mouse-mode branch August 30, 2026 17:36
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

Successfully merging this pull request may close these issues.

1 participant