Skip to content

Fix eraser end not erasing - #5

Merged
modfox merged 1 commit into
mainfrom
fix/eraser-contact
Nov 4, 2026
Merged

modfox merged 1 commit into
mainfrom
fix/eraser-contact

Conversation

@modfox

@modfox modfox commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Flipping the pen to the eraser end changed the cursor in Clip Studio Paint, but pressing down didn't erase.

Cause

The pen reports eraser contact on the Eraser status bit (bit 3), not Tip Switch (bit 0). EventEmitter only looked at tipDown. The proximity event already said "eraser" (pointer type 3), so apps switched tools, but a press with the eraser end never sent a mouse-down.

Fix

EventEmitter now counts tipDown || eraser as contact for mouse down/drag/up and for bit 0 of the tablet button mask. Pressure is sent the same way as for the tip.

Testing

  • swift test: 43 tests pass. New test testEraserContactIsAClick checks that an eraser press sends down, drag and up, with eraser pointer type, pressure and button bit 0.
  • Checked on the Cintiq Pro 24: the eraser end now erases in Clip Studio Paint.

🤖 Generated with Claude Code

The pen reports eraser contact via the Eraser status bit (bit 3), not
Tip Switch (bit 0). EventEmitter only checked tipDown, so flipping the
pen switched apps to the eraser tool (via the proximity event) but
pressing never produced a mouse-down, and nothing was erased.

Contact is now tipDown || eraser for the down/drag/up state machine and
the tablet button mask.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@modfox
modfox merged commit 9a2ef1a into main Nov 4, 2026
1 check passed
@modfox
modfox deleted the fix/eraser-contact branch November 4, 2026 22:11
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