Comments (2)
What I definitely want to avoid is amplification of acceleration across devices (pointer acceleration is captured and then accelerated again when being emulated remotely).
In my opinion the only correct thing to do is to send unaccelerated motion to the compositor and let the compositor handle acceleration instead of lan-mouse
, since the compositor is the only component that can correctly identify if accelerated or unaccelerated motion is required (through interfaces like relative-pointer-unsatble-v1, which report both accelerated and unaccelerated events, letting applications chose what they want).
In other words: Sending accelerated motion to the compositor (and this means any artificial acceleration added by lan-mouse either on the capture or emulation side) would make it impossible for the compositor to infer the original unaccelerated motion.
So ideally, we want to send unaccelerated motion, but also tell the compositor, that it is infact unaccelerated, which I tried to do wherever possible, though in reality most backends do not yet do it correctly.
As for KDE -> KDE, you are (almost certainly) using the layer-shell
capture backend, which is explicitly using dx_unaccel
/ dy_unaccel
, so this is working as intended.
On the emulation side, it's either the remote desktop portal org.freedesktop.impl.portal.RemoteDesktop.NotifyPointerMotion for KDE < 6.1 or libei using ei_pointer.motion_relative on KDE >= 6.1.
The RDP documentation says "The (dx, dy) vector represents the new pointer position in the streams logical coordinate space.", which if I'm understanding correctly is the compositor coordinate space, hence unfortunately motion in its accelerated form... which makes sense, considering the "remote desktop" usecase.
As for libei, it's a little bit more complicated: ei_device_type. Virtual devices generate events in a pixel coordinate space
and physical devices in millimeters. So we probably want to have device type physical here and report unaccelerated motion.
However GNOME and KDE both seem to advertise only devices of type VIRTUAL to libei from what I have seen so far, so no luck here either...
The only emulation backend where acceleration should work correctly, is probably the wlroots backend, which uses zwlr_virtual_pointer_v1, where the documentation explicitly states "This protocol allows clients to emulate a physical pointer device."
I personally am very much in favor of having no pointer acceleration at all, but having this be configurable would not hurt anyone I guess (though the drawback is what I stated above).
from lan-mouse.
Yes, this is with layer-shell capture (due to #140) and libei for emulation.
I agree that sending unaccelerated motion and then handling it locally in the compositor is ideal, but of course then there needs to be an interface that allows that (that is implemented properly in compositors).
I do think that at least a simple linear scale config on the sender side is probably still appropriate, since different mice have different DPI and the linear scale appropriate with one mouse might not be appropriate with another mouse.
from lan-mouse.
Related Issues (20)
- Manual Release required between GNOME and XFCE HOT 3
- How to run it on MacOS HOT 10
- Keyboard focus broken when using Windows Emoji selector (`win+;`) HOT 3
- Some programs with mouse capture (like FPS games) fail to prevent the virtual cursor from moving & leaving the screen HOT 4
- Mouse wheel distance/speed HOT 7
- After upgrade lan mouse version to 0.8.0, Windows side can't access Linux side input HOT 15
- Hyprland not working with 1px shell surface HOT 12
- Can't Install on MacOS HOT 7
- Mouse pointer can't return back to Hyprland's surface HOT 3
- Custom global/host hotkeys HOT 3
- Input Capture not working in Plasma 6.1 HOT 19
- 32-bit build fails HOT 2
- Just asking HOT 1
- KDE Request permission for input emulation cancelled immediately with no prompt HOT 3
- Works only one way HOT 1
- BUG: stoped working after upgrading to Plasma 6.1.0 HOT 7
- Can't control from Hyprland Server a Windows Client / Client can control Server HOT 9
- KDE Plasma back to windows make mouse frozen HOT 2
- Icons missing in Windows build HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lan-mouse.