[GH-ISSUE #369] release_bind not clearing modifiers? #197

Closed
opened 2026-05-05 22:13:31 -06:00 by gitea-mirror · 2 comments
Owner

Originally created by @jonstelly on GitHub (Jan 30, 2026).
Original GitHub issue: https://github.com/feschber/lan-mouse/issues/369

I have 2 linux machines running niri (it's niri mainline where they just added libei support) and dank material shell (using dms lock screen). When I lock a client lan-mouse machine the input gets stuck on that remote machine (lock screen grabbing all input I suspect) so I've configured a release_bind to Meta+z to release the remote focus back to my other computer.

The issue is that after doing this, number keys don't work on the remote machine. It seems like the Meta key up event isn't getting sent on lan-mouse release? The number keys on the remote computer act like meta is still down, pressing 1 behaves like Meta+1 and switches niri workspaces. The end result is that I'm trying to unlock from the lock screen and can't type my password.

release_bind = [ "KeyLeftMeta", "KeyZ" ]

I'm tinkering around with the code now, mainly just copilot trying out some things in the release function to send key-ups before ungrabbing, but the first couple quick takes weren't helpful.

Originally created by @jonstelly on GitHub (Jan 30, 2026). Original GitHub issue: https://github.com/feschber/lan-mouse/issues/369 I have 2 linux machines running niri (it's niri mainline where they just added libei support) and dank material shell (using dms lock screen). When I lock a client lan-mouse machine the input gets stuck on that remote machine (lock screen grabbing all input I suspect) so I've configured a release_bind to `Meta+z` to release the remote focus back to my other computer. The issue is that after doing this, number keys don't work on the remote machine. It seems like the Meta key up event isn't getting sent on lan-mouse release? The number keys on the remote computer act like meta is still down, pressing `1` behaves like `Meta+1` and switches niri workspaces. The end result is that I'm trying to unlock from the lock screen and can't type my password. ``` release_bind = [ "KeyLeftMeta", "KeyZ" ] ``` I'm tinkering around with the code now, mainly just copilot trying out some things in the release function to send key-ups before ungrabbing, but the first couple quick takes weren't helpful.
Author
Owner

@jonstelly commented on GitHub (Feb 3, 2026):

I may have this fixed, https://github.com/feschber/lan-mouse/compare/main...jonstelly:lan-mouse:fix/on-release-key-up. Still testing but will get a PR up for it when I'm happy with things.

<!-- gh-comment-id:3843261949 --> @jonstelly commented on GitHub (Feb 3, 2026): I may have this fixed, https://github.com/feschber/lan-mouse/compare/main...jonstelly:lan-mouse:fix/on-release-key-up. Still testing but will get a PR up for it when I'm happy with things.
Author
Owner

@feschber commented on GitHub (Feb 4, 2026):

   // Give the compositor time to process key-up events before tearing down the backend

I'm not sure this is necessary, terminating the session should already wait for this.

<!-- gh-comment-id:3847651280 --> @feschber commented on GitHub (Feb 4, 2026): > // Give the compositor time to process key-up events before tearing down the backend I'm not sure this is necessary, terminating the session should already wait for this.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/lan-mouse#197
No description provided.