<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lan-mouse/input-capture/src, branch main</title>
<subtitle>a fork</subtitle>
<id>https://git.nsrddyn.com/lan-mouse/atom/input-capture/src?h=main</id>
<link rel='self' href='https://git.nsrddyn.com/lan-mouse/atom/input-capture/src?h=main'/>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/'/>
<updated>2026-11-27T18:08:11Z</updated>
<entry>
<title>Fix capture/emulation bugs, smoother pointer, matching edge positions</title>
<updated>2026-11-27T18:08:11Z</updated>
<author>
<name>nasr</name>
<email>nsrddyn@gmail.com</email>
</author>
<published>2026-11-27T17:53:52Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=c994f85a6d743a7600a9013561e43e2206c5b485'/>
<id>urn:sha1:c994f85a6d743a7600a9013561e43e2206c5b485</id>
<content type='text'>
- proto: Enter/Leave carry an optional offset along the crossed edge
  (trailing bytes, so 0.11 peers still interoperate); decode only the
  received bytes instead of a stale fixed buffer; truncated datagrams
  are errors instead of panics
- capture: the cursor enters the remote at the height it left, and
  returns via a locked-pointer cursor hint where it left the remote
- capture: input captured before the peer acks Enter is queued and
  flushed instead of dropped
- layer-shell: forward accelerated motion (virtual pointers are not
  accelerated by the receiving compositor); track the wl_keyboard so
  capabilities events don't duplicate key events; ungrab before
  destroying capture windows; no panics on events without focus
- input-capture: events for positions without a client no longer
  stall the stream (Poll::Pending without a wakeup)
- wlroots emulation: place the cursor on the entry edge via absolute
  motion; drain compositor events and apply keymap changes; send
  axis_source before axis with a single frame
- emulation: check for dead peers every 500ms so held keys are
  released within ~1.5s instead of up to 6s
- connect: stop the ping loop after a send error

Co-Authored-By: Claude Opus 5.5 &lt;noreply@anthropic.com&gt;
Claude-Session: https://claude.ai/code/session_018U4KzBtfgSJ9kb2ywxrpvG
</content>
</entry>
<entry>
<title>fix(macos): respect Natural Scrolling for scroll direction, both directions (#498)</title>
<updated>2026-10-25T11:33:54Z</updated>
<author>
<name>Daniel Hanson</name>
<email>hansondr@users.noreply.github.com</email>
</author>
<published>2026-10-25T11:33:54Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=cf22560fad2eda18b7a3cba4d4e4e3be8cf83fe0'/>
<id>urn:sha1:cf22560fad2eda18b7a3cba4d4e4e3be8cf83fe0</id>
<content type='text'>
* fix(macos): respect Natural Scrolling for scroll direction, both directions

Scrolling from a non-macOS sender onto a macOS receiver is inverted
(wl_pointer.axis / libei use positive = scroll down/right, the opposite of
CGEvent's convention). Symmetrically, a macOS sender scrolls backwards on
non-macOS receivers.

Capture (input-capture/src/macos.rs): negate the delta at capture time on
both the continuous (PIXEL) and discrete (v120) paths and both axes, so the
wire stays source-agnostic (matches the approach in #470). Real hardware
deltas already reflect this Mac's own Natural Scrolling preference -- the OS
applies that transform upstream, before the event reaches this tap -- so a
fixed conversion is correct here; no preference read is needed.

Emulation (input-emulation/src/macos.rs): convert the wire sign to CGEvent's
sign, but -- unlike #470's fixed conversion -- read the receiver's
com.apple.swipescrolldirection preference and negate conditionally. This
revives the approach from #460, caching the CFString preference key on
MacOSEmulation instead of allocating it per scroll tick.

A synthetic CGEvent posted at the HID event tap produces the same on-screen
direction for a given sign regardless of Natural Scrolling (confirmed on
hardware, consistent with #470 and #481). But a real trackpad's delta sign is
flipped by the OS before the CGEvent exists, specifically because of Natural
Scrolling. So with a fixed conversion, turning Natural Scrolling on desyncs a
real trackpad from Lan Mouse's forwarded mouse-wheel input on the same Mac;
turning it off only re-syncs them because the fixed sign happens to match the
non-natural convention. Reading the preference keeps both in sync in either
state.

Verified on real hardware, both directions, against the exact 0.11.0 release
protocol (not just main, to rule out wire-compatibility noise):
- Windows (sender) -&gt; macOS/Apple Silicon (receiver): correct with Natural
  Scrolling both on and off; forwarded scroll stays in sync with the
  receiving Mac's own trackpad in both states.
- macOS/Apple Silicon (sender) -&gt; Windows (receiver): correct with Natural
  Scrolling both on and off, matching what a real trackpad in each state
  produces.

Prior art: #470 (capture-side fix reproduced here), #460 (the emulation-side
preference read this revives), #481 (the symptom report), #415 / #347 (as
noted in #470).

* invert scrolling for Axis events, not Axis120

this matches the wire convention from Linux / Libei, etc.

---------

Co-authored-by: Ferdinand Schober &lt;ferdinandschober20@gmail.com&gt;</content>
</entry>
<entry>
<title>fix(macos): correct scroll direction for remote clients</title>
<updated>2026-10-25T10:05:01Z</updated>
<author>
<name>zhoujinze</name>
<email>zhoujinze@gmail.com</email>
</author>
<published>2026-06-07T11:49:13Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=fb7a77a2a78d4eb3fc21a991c66c85aea561679f'/>
<id>urn:sha1:fb7a77a2a78d4eb3fc21a991c66c85aea561679f</id>
<content type='text'>
macOS scroll deltas use the opposite sign convention from evdev
when Natural Scrolling is OFF. When Natural Scrolling is ON, the
system negates the deltas, which happens to match evdev.

Read CGEvent field 137 (isDirectionInvertedFromDevice) to detect
whether Natural Scrolling is active. When it is not, negate both
continuous (trackpad) and discrete (mouse wheel) scroll deltas so
the network protocol always carries evdev-compatible values.

Closes #451
</content>
</entry>
<entry>
<title>fix(libei): only restart the capture session on device change under GNOME</title>
<updated>2026-08-31T12:11:10Z</updated>
<author>
<name>mrcha033</name>
<email>mrcha033@yonsei.ac.kr</email>
</author>
<published>2026-08-06T23:55:16Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=6b1eddef7ab3ae0b06f2ed3d9b21165e03ea4cad'/>
<id>urn:sha1:6b1eddef7ab3ae0b06f2ed3d9b21165e03ea4cad</id>
<content type='text'>
`EiEvent::DeviceRemoved` currently tears down and recreates the whole
input-capture session. That is a workaround for mutter, which stops
delivering events after a device change, but it is applied on every
compositor.

Elsewhere the restart is pure overhead: every device change costs a
CreateSession + ConnectToEIS round trip. On compositors that keep
per-session state around it is worse than overhead - Hyprland keeps a
keymap fd per EIS session and never reaps sessions whose client went
away, so the churn drives it out of file descriptors and eventually
crashes it. On this machine the churn ran at ~35 ConnectToEIS per 38
minutes; gating it to GNOME brought that to 0 with no change in capture
behaviour.

`SeatRemoved` still releases unconditionally - a seat going away really
does invalidate the session.

The default is derived from XDG_CURRENT_DESKTOP and can be overridden
with LM_RESTART_SESSION_ON_DEVICE_CHANGE=1/0 for compositors that need
the mutter behaviour but do not advertise themselves as GNOME.
</content>
</entry>
<entry>
<title>chore: Minor code style improvements to Wayland code</title>
<updated>2026-08-31T10:59:27Z</updated>
<author>
<name>Ian Douglas Scott</name>
<email>idscott@system76.com</email>
</author>
<published>2026-08-20T20:41:30Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=09889cd83923a1715edce4d9c02c7ae1f4142b90'/>
<id>urn:sha1:09889cd83923a1715edce4d9c02c7ae1f4142b90</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix(input-capture/layer_shell): Call `read()` on guard only once</title>
<updated>2026-08-31T10:59:27Z</updated>
<author>
<name>Ian Douglas Scott</name>
<email>idscott@system76.com</email>
</author>
<published>2026-08-20T19:40:30Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=c194df791dc11c79d266ada4d413179d4da3525b'/>
<id>urn:sha1:c194df791dc11c79d266ada4d413179d4da3525b</id>
<content type='text'>
With `wayland-backend/client_system` enabled, this was causing an
infinite loop since `read` never returned `WouldBlock`.

This seems to be an inconsistency in wayland-rs:
https://github.com/Smithay/wayland-rs/pull/959

In any case, it isn't necessary to call `read` more than once.
</content>
</entry>
<entry>
<title>hotfix: plasma 6.7 reporting Barrier ID 1</title>
<updated>2026-06-21T17:06:25Z</updated>
<author>
<name>Ferdinand Schober</name>
<email>ferdinand.schober@fau.de</email>
</author>
<published>2026-06-21T17:04:49Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=133e1ae81dd47b7243859695e6a53f7ba36ecdc9'/>
<id>urn:sha1:133e1ae81dd47b7243859695e6a53f7ba36ecdc9</id>
<content type='text'>
Still not 100% sure of the root cause, but it looks
like plasma is reporting 1 as the barrier id in all cases...
</content>
</entry>
<entry>
<title>Update reis to 0.7.0</title>
<updated>2026-06-19T23:17:02Z</updated>
<author>
<name>Ian Douglas Scott</name>
<email>idscott@system76.com</email>
</author>
<published>2026-06-19T22:45:01Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=6fb7e247461b87647dde7fdfcb06b75dd47daa26'/>
<id>urn:sha1:6fb7e247461b87647dde7fdfcb06b75dd47daa26</id>
<content type='text'>
</content>
</entry>
<entry>
<title>move feature flags to build.rs (#439)</title>
<updated>2026-05-19T09:26:06Z</updated>
<author>
<name>Ferdinand Schober</name>
<email>ferdinandschober20@gmail.com</email>
</author>
<published>2026-05-19T09:26:06Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=a9461ae830ea91c5d2bce0c78c405217fd8f91c5'/>
<id>urn:sha1:a9461ae830ea91c5d2bce0c78c405217fd8f91c5</id>
<content type='text'>
</content>
</entry>
<entry>
<title>windows: fix clippy lints</title>
<updated>2026-05-16T15:09:06Z</updated>
<author>
<name>Ferdinand Schober</name>
<email>ferdinandschober20@gmail.com</email>
</author>
<published>2026-05-16T15:09:06Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=1fa3800d3c9012b7e55980b0db72052641752113'/>
<id>urn:sha1:1fa3800d3c9012b7e55980b0db72052641752113</id>
<content type='text'>
</content>
</entry>
</feed>
