[PR #297] Add raw evdev input emulation #362

Open
opened 2026-05-05 22:17:36 -06:00 by gitea-mirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/feschber/lan-mouse/pull/297
Author: @samvv
Created: 5/29/2025
Status: 🔄 Open

Base: mainHead: main


📝 Commits (4)

  • 883d162 First rough implementation of evdev emulation
  • e9856e2 Fix CLI backend overrides
  • ab238ba Fix clippy warnings
  • 1f222fa Fix mouse wheel and use HI_RES

📊 Changes

8 files changed (+825 additions, -2 deletions)

View changed files

📝 Cargo.lock (+54 -0)
📝 Cargo.toml (+2 -0)
📝 input-capture/src/layer_shell.rs (+1 -1)
📝 input-emulation/Cargo.toml (+6 -1)
📝 input-emulation/src/error.rs (+10 -0)
input-emulation/src/evdev.rs (+734 -0)
📝 input-emulation/src/lib.rs (+11 -0)
📝 src/config.rs (+7 -0)

📄 Description

This pull request adds another input emulation backend that uses evdev to create a virtual mouse/keyboard, bypassing Wayland restrictions. It is meant to be a fallback for the other Linux backends.

This backend successfully fixes input emulation issues on COSMIC and potentially other platforms that lack a proper remote desktop portal.

Limitations

Currently this feature requires lan-mouse to be run as root, e.g. with sudo -E lan-mouse. This is a temporary limitation that I hope to alleviate by creating a separate daemon and authentication mechanism.

To Do

  • Discrete scrolling needs to be tested. I just put a formula I thought might work. If I'm correct this is a Mac feature, which I don't have.
  • A daemon that allows unprivileged execution of lan-mouse, as described above. We are going to use an udev rule.
  • Natural scrolling doesn't work because presumably the WM is responsible for the conversion. We'd need to emulate it. (optional?)

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/feschber/lan-mouse/pull/297 **Author:** [@samvv](https://github.com/samvv) **Created:** 5/29/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (4) - [`883d162`](https://github.com/feschber/lan-mouse/commit/883d1627dd91da6910408b0ad1806755301a68c4) First rough implementation of evdev emulation - [`e9856e2`](https://github.com/feschber/lan-mouse/commit/e9856e2aa59cf8ecc3903b4e85c36306f8476843) Fix CLI backend overrides - [`ab238ba`](https://github.com/feschber/lan-mouse/commit/ab238ba11e0e8e0c12fd4067fedbb0cc2ce84be4) Fix clippy warnings - [`1f222fa`](https://github.com/feschber/lan-mouse/commit/1f222fa4b01184098f3cc8e85c404c5081ffd9cb) Fix mouse wheel and use HI_RES ### 📊 Changes **8 files changed** (+825 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `Cargo.lock` (+54 -0) 📝 `Cargo.toml` (+2 -0) 📝 `input-capture/src/layer_shell.rs` (+1 -1) 📝 `input-emulation/Cargo.toml` (+6 -1) 📝 `input-emulation/src/error.rs` (+10 -0) ➕ `input-emulation/src/evdev.rs` (+734 -0) 📝 `input-emulation/src/lib.rs` (+11 -0) 📝 `src/config.rs` (+7 -0) </details> ### 📄 Description This pull request adds another input emulation backend that uses [evdev](https://docs.rs/evdev/latest/evdev/) to create a virtual mouse/keyboard, bypassing Wayland restrictions. It is meant to be a fallback for the other Linux backends. This backend successfully fixes input emulation issues on COSMIC and potentially other platforms that lack a proper remote desktop portal. ## Limitations Currently this feature requires lan-mouse to be run as root, e.g. with `sudo -E lan-mouse`. This is a temporary limitation that I hope to alleviate by creating a separate daemon and authentication mechanism. ## To Do - [x] Discrete scrolling needs to be tested. I just put a formula I thought might work. If I'm correct this is a Mac feature, which I don't have. - [x] ~A daemon that allows unprivileged execution of lan-mouse, as described above.~ We are going to use an udev rule. - [ ] Natural scrolling doesn't work because presumably the WM is responsible for the conversion. We'd need to emulate it. (optional?) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
gitea-mirror added the
pull-request
label 2026-05-05 22:17:36 -06:00
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#362
No description provided.