<feed xmlns='http://www.w3.org/2005/Atom'>
<title>lan-mouse, branch main</title>
<subtitle>a fork</subtitle>
<id>https://git.nsrddyn.com/lan-mouse/atom/?h=main</id>
<link rel='self' href='https://git.nsrddyn.com/lan-mouse/atom/?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(wlroots): use local timestamps for emulated events</title>
<updated>2026-10-25T14:07:59Z</updated>
<author>
<name>Nietto</name>
<email>denisnietto@yahoo.com.br</email>
</author>
<published>2026-10-12T15:44:59Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=69958c625163649b69e27d0a6fb5a3edd596a467'/>
<id>urn:sha1:69958c625163649b69e27d0a6fb5a3edd596a467</id>
<content type='text'>
</content>
</entry>
<entry>
<title>chore(deps): update crates with RustSec advisories</title>
<updated>2026-10-25T14:07:35Z</updated>
<author>
<name>Minh</name>
<email>github@mtruong.dev</email>
</author>
<published>2026-10-09T10:13:53Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=eca73b073cc8dc9db70ce34d000783f553fc3b61'/>
<id>urn:sha1:eca73b073cc8dc9db70ce34d000783f553fc3b61</id>
<content type='text'>
Bump the lockfile to versions that carry fixes:

- quick-xml 0.39.2 -&gt; 0.41.0 (RUSTSEC-2026-0194, RUSTSEC-2026-0195)
- rustls 0.23.37 -&gt; 0.23.45 (RUSTSEC-2026-0285)
- rustls-webpki 0.103.10 -&gt; 0.103.15 (RUSTSEC-2026-0098,
  RUSTSEC-2026-0099, RUSTSEC-2026-0104)
- anyhow 1.0.102 -&gt; 1.0.103 (RUSTSEC-2026-0190, unsound)
- event-listener 5.4.1 -&gt; 5.4.2 (RUSTSEC-2026-0221, unsound)
- rand 0.8.5 -&gt; 0.8.6 (RUSTSEC-2026-0097, unsound)

wayland-scanner moves 0.31.10 -&gt; 0.31.11 as well. 0.31.10 requires
quick-xml 0.39, so this bump is what allows quick-xml to update. It runs
at build time only.

No code changes.
</content>
</entry>
<entry>
<title>chore(input-capture): drop unused memmap dependency</title>
<updated>2026-10-25T14:07:35Z</updated>
<author>
<name>Minh</name>
<email>github@mtruong.dev</email>
</author>
<published>2026-10-09T10:13:19Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=23f26cdbabf462b8d117ac3ef66749e83f9620f0'/>
<id>urn:sha1:23f26cdbabf462b8d117ac3ef66749e83f9620f0</id>
<content type='text'>
Nothing in the workspace references memmap, including build scripts and
cfg-gated modules. The crate is unmaintained (RUSTSEC-2020-0077).
</content>
</entry>
<entry>
<title>fix locked getting unset with other key presses</title>
<updated>2026-10-25T14:04:44Z</updated>
<author>
<name>Ferdinand Schober</name>
<email>ferdinandschober20@gmail.com</email>
</author>
<published>2026-10-25T14:01:20Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=37df4124ecf8476f32b676e7ce2ad3e219b7a434'/>
<id>urn:sha1:37df4124ecf8476f32b676e7ce2ad3e219b7a434</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix(macos): treat Caps Lock as a lock/toggle, not a momentary modifier</title>
<updated>2026-10-25T14:04:44Z</updated>
<author>
<name>jtjones09</name>
<email>jones.jeremyt@hotashstudios.com</email>
</author>
<published>2026-06-16T21:04:16Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=b45d4eb1bc3c13c9e3cd007904e86a48ab0a64d4'/>
<id>urn:sha1:b45d4eb1bc3c13c9e3cd007904e86a48ab0a64d4</id>
<content type='text'>
Routing modifier keys out of the key-repeat path (#450) also rerouted Caps
Lock, which is classified as a modifier (LockMask). That made it momentary - it
only applied while the key was physically held instead of latching. Caps Lock
is a LOCKING modifier (XKB "locked"), so a press should toggle a persistent
state.

update_modifiers() now toggles LockMask on Caps Lock key-down and ignores
key-up, so the AlphaShift flag stays set on every subsequent keystroke until
Caps Lock is pressed again. A synthetic CGEvent can't flip the hardware Caps
Lock LED, but carrying the flag produces the correct upper-case output (and,
like real Caps Lock, leaves number-row symbols unshifted).

Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix(macos): correct modifier-key injection, incl. Virtualization.framework guests (#450)</title>
<updated>2026-10-25T14:04:44Z</updated>
<author>
<name>jtjones09</name>
<email>jones.jeremyt@hotashstudios.com</email>
</author>
<published>2026-06-16T20:08:53Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=400c6468ed0aaada30a25620818fca690aaf225e'/>
<id>urn:sha1:400c6468ed0aaada30a25620818fca690aaf225e</id>
<content type='text'>
Modifier-key injection on macOS was broken in several ways. This fixes the
CGEvent bugs diagnosed in #450 and additionally makes modifier chords register
inside Apple Virtualization.framework guest windows.

Layer 1 - CGEvent bugs (originally diagnosed and patched by bmajewski, #450):
- modifier_event() built a bare CGEvent, which defaults to keycode 0
  (kVK_ANSI_A), so every modifier change arrived in apps as a phantom "A" key
  (holding Ctrl registered as Ctrl+A; shortcut recorders captured "A"). It now
  posts a FlagsChanged event carrying the modifier's real keycode
  (modifier_key_event).
- Modifier keys went through the single-slot key-repeat task; pressing a second
  modifier cancelled the first's repeat task and released it while still held,
  tearing chords apart (also the likely cause of #357). Modifiers no longer
  enter the repeat machinery.
- The wholesale Modifiers state handler also posted a (bare) FlagsChanged,
  duplicating the per-key event / injecting the phantom "A"; it now only updates
  internal modifier state.
- to_cgevent_flags() silently dropped Mod5 (ISO_Level3_Shift / AltGr), so Alt
  reported as Mod5 (common on xkb keymaps) never set Option. Mod1 and Mod5 now
  both map to Option.

Layer 2 - Virtualization.framework guest modifiers:
VZVirtualMachineView (Apple Virtualization.framework, used by UTM's Apple
backend, Parallels' macOS guests, VirtualBuddy, etc.) derives the guest's
modifier state from AppKit's flagsChanged(with:) and reads the device-dependent
low-word flag bits, which macOS does not synthesize for posted events - so
Cmd/Ctrl/Shift/Opt chords reached the guest unmodified. modifier_flags_changed_flags()
now also sets the IOKit NX_DEVICE*KEYMASK bits and CGEventFlagNonCoalesced so the
synthetic FlagsChanged is byte-faithful to real hardware. Ordinary apps mask
incoming events to the device-independent word and ignore these bits, so this is
safe for every app and needs no VM/bundle-id detection.

See https://developer.apple.com/forums/thread/766014

Co-authored-by: bmajewski &lt;bmajewski@users.noreply.github.com&gt;
Co-Authored-By: Claude Opus 4.8 (1M context) &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>fix(macos): wait for app exit before relaunch (#475)</title>
<updated>2026-10-25T13:39:24Z</updated>
<author>
<name>Yunmin Cha</name>
<email>mrcha033@yonsei.ac.kr</email>
</author>
<published>2026-10-25T13:39:24Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=974456325e6c350f0c66b4dcdb987bccf1ceb8b4'/>
<id>urn:sha1:974456325e6c350f0c66b4dcdb987bccf1ceb8b4</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix: windows horizontal scroll direction (#513)</title>
<updated>2026-10-25T13:04:35Z</updated>
<author>
<name>Su Kang Yin</name>
<email>paradyse@gmail.com</email>
</author>
<published>2026-10-25T13:04:35Z</published>
<link rel='alternate' type='text/html' href='https://git.nsrddyn.com/lan-mouse/commit/?id=4eb67ddf20a2f13f4495f0cbacefc7fc9bfad964'/>
<id>urn:sha1:4eb67ddf20a2f13f4495f0cbacefc7fc9bfad964</id>
<content type='text'>
Windows emulation negated both axes although MOUSEEVENTF_HWHEEL is already
positive right. So horizontal scroll into Windows was reversed.</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>
</feed>
