Keep finger pan/zoom working after using the pen

After writing with the pen, fingers could no longer navigate:
- every touch was ignored for 5 s after any pen activity (and for as long
  as a hover-capable pen stayed near the screen),
- after that, a one-finger drag on a page drew ink instead of panning,
- a one-finger drag on the background did nothing while an ink tool was on.

Once a pen has been used, fingers now only pan and zoom. The 5 s session
and hover lockouts only block finger ink; touches are still rejected while
the pen is down, for palm-sized contacts and within 150 ms of pen activity.
A finger drag off the page always pans.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VsorPV3JeJRoZ1mD1pdvtL
This commit is contained in:
besbara 2026-09-26 20:09:53 +00:00
parent fa2f491161
commit bca1a6a407
4 changed files with 88 additions and 16 deletions

View file

@ -82,12 +82,12 @@
{:else if tab === 'input'}
<h2>Pen &amp; touch</h2>
<div class="row">
<div><div class="name">Draw with finger</div><div class="desc">When off, a single finger always pans; only pen and mouse draw.</div></div>
<div><div class="name">Draw with finger</div><div class="desc">When off, a single finger always pans; only pen and mouse draw. Once you use a pen, fingers only pan and zoom.</div></div>
<input type="checkbox" class="toggle" bind:checked={s.fingerDraw} onchange={save} />
</div>
<h3>Palm rejection</h3>
<div class="row">
<div><div class="name">Pen session lockout</div><div class="desc">Ignore touches while the pen is writing or was used in the last 5 seconds.</div></div>
<div><div class="name">Pen session lockout</div><div class="desc">Ignore touches while the pen is writing, and finger ink for 5 seconds after it was used.</div></div>
<input type="checkbox" class="toggle" bind:checked={s.palm.penSession} onchange={save} />
</div>
<div class="row">
@ -99,7 +99,7 @@
<input type="checkbox" class="toggle" bind:checked={s.palm.timing} onchange={save} />
</div>
<div class="row">
<div><div class="name">Lock out on pen hover</div><div class="desc">Ignore touches while the pen hovers above the screen.</div></div>
<div><div class="name">Lock out on pen hover</div><div class="desc">Ignore finger ink while the pen hovers above the screen.</div></div>
<input type="checkbox" class="toggle" bind:checked={s.palm.hover} onchange={save} />
</div>
{:else}