mirror of
https://github.com/feschber/lan-mouse.git
synced 2026-05-15 14:15:52 -06:00
[GH-ISSUE #46] Host peripherals that move to Windows from Linux cannot move back #13
Labels
No labels
Xorg
documentation
enhancement
macos
pull-request
question
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/lan-mouse#13
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @MulverineX on GitHub (Dec 14, 2023).
Original GitHub issue: https://github.com/feschber/lan-mouse/issues/46
The magic edge appears to be broken on Windows, to work around it the connection must be deactivated.
Environments:
Sending
Receiving
@feschber commented on GitHub (Dec 14, 2023):
Yes, input capture is not yet implemented in Windows so this is expected. For now, you can release the mouse by pressing Ctrl+alt+shift+super (on the Linux machine)
@MulverineX commented on GitHub (Dec 14, 2023):
I'm not sure I understand, the input is happening on Linux
@feschber commented on GitHub (Dec 14, 2023):
There is no magic edge (=input capture) on windows yet. That's why it's not working. But you can press the key combination on the sending machine (Linux) to release the mouse there.
@MulverineX commented on GitHub (Dec 31, 2023):
This appears to persist in 0.5.0
@beyertom commented on GitHub (Jan 23, 2024):
I didnt read anything in the readme or the commit logs, but for me the magic-edge on windows works now with v0.5.1 (Server wlroots / Client Windows).
Thank you very much, awesome project!
@feschber commented on GitHub (Jan 23, 2024):
Are you by any chance using Hyprland on the server side?
@beyertom commented on GitHub (Jan 23, 2024):
yes i do
this gets logged on the server when i move the mouse from client to server:
2024-01-23T10:31:49Z WARN lan_mouse::backend::producer::wayland] compositor released mouse@feschber commented on GitHub (Jan 23, 2024):
Okay because this is really a bug with Hyprland rather than a feature in LanMouse.
In my testing, the pointer is released when it is moved on a second screen on Hyprland. (In the invisible locked state).
Do you have multiple monitors on the server side? And is your windows monitor the same resolution as those two?
@beyertom commented on GitHub (Jan 23, 2024):
what a conicidence, i actually added a second screen to my server since i tested lan-mouse the last time.
The resolution of windows is not the same as the main monitor of the Server (the one "right" of Windows).
I am not complaining, though. It works exactly how I wanted it to be. :-)
@feschber commented on GitHub (Jan 23, 2024):
Whatever works for you I guess!
I will see that I can add proper support for at least detecting when the screen is exited on the windows side soon.
@beyertom commented on GitHub (Feb 12, 2024):
yesterday i upgraded to Hyprland 0.35.0 and now unfortuneately its not working anymore.
The client screen is on the left, and i can move the mouse there only more to the left. unti iam at the very left edge of the screen
@feschber commented on GitHub (Feb 12, 2024):
Jup - See readme. There was a regression.
@fecet commented on GitHub (Mar 15, 2024):
Problem persist by using hyprland
a01949dd28@feschber commented on GitHub (Mar 20, 2024):
Windows input capture support is next on the list ;)
@MulverineX commented on GitHub (Apr 25, 2024):
uhhh, @feschber this still isn't working afaict. I'm using the 0.7.3 release. I'm guessing that https://github.com/feschber/lan-mouse/pull/99 broke it
@feschber commented on GitHub (Apr 25, 2024):
What exactly is not working? Did you get the latest pre-release binary and restart lan-mouse?
@MulverineX commented on GitHub (Apr 25, 2024):
@feschber Previously I was on 0.5.0. I've tried 0.7.3 & 0.5.1, neither let me move the cursor back. Also, it appears there was a regression on remote input in Windows on both versions, where every mouse click is duplicated very quickly, causing bugs in several applications and highlighting a whole word in text editors, curiously Windows Explorer is not effected. The latest pre-release doesn't change code that should effect linux or windows. And yes, I'm actually running these versions of the software. I've double checked process managers on both machines and there isn't duplicates running either.
@feschber commented on GitHub (Apr 25, 2024):
@MulverineX Please try the pre release. It does not show all changes since 0.7.3 in the release notes until I update to 0.8
@MulverineX commented on GitHub (Apr 25, 2024):
Aha! Yep, I realized this after I sent that message, there hasn't been a build for a while. I'm on the 0.8 pre-release now, the duplicated mouse clicks are fixed, but the "edge" of my screen is being calculated incorrectly. I have a 2560x1440p display, but it appears to think that my screen on Windows ends at 1920 and jumps over to linux early. I can provide a video if you need.
@MulverineX commented on GitHub (Apr 25, 2024):
@feschber also, scrolling is way slower on the client device, and using the Ctrl+Shift+Alt+Super fallback for releasing the cursor causes those keys to be locked again in the client device.
@MulverineX commented on GitHub (Apr 25, 2024):
Would display Scale effect it?

Also, I have a bit of a weird setup, My windows machine is a laptop that traditionally has a 1080p screen attached, but has since been removed. Perhaps the API you're using is giving you details for that non-existent display, rather than the external monitor my mouse is actually on?
@feschber commented on GitHub (Apr 25, 2024):
This is intentional (sort of, will need to fix this of course) and one reason I have not made a new release yet.
@feschber commented on GitHub (Apr 25, 2024):
Could you run it with $env:LAN_MOUSE_LOG_LEVEL='debug' and paste the output? That should show what displays are detected. And scale is something I have not tested so yeah that could be an issue.
@feschber commented on GitHub (Apr 25, 2024):
full command should be
(powershell)
@MulverineX commented on GitHub (Apr 25, 2024):
Forgot to test this last night, will test later today
@MulverineX commented on GitHub (Apr 26, 2024):
@feschber alright here you go. (should've provided all of this information already, apologies)
Windows client debug log
Arch Linux server debug log
Lol this is wrong. Looks like scale definitely is affecting it, my KDE Plasma environment is also set to 125% scale.

(this is on the linux side, doesn't look like there's any useful debug in the windows log)
Here's my current Windows lan-mouse config:
And my current Arch Linux config:
@MulverineX commented on GitHub (Apr 26, 2024):
Alright I tried changing display scales while lan-mouse was not running. Changing the linux side to 100% did nothing, however, changing windows to 100% solved the problem. If linux was the left monitor I'd probably have the reverse of this issue.
🤞 you can find APIs on both platforms for getting real display resolution.
@feschber commented on GitHub (Apr 26, 2024):
There is another issue on windows - DNS resolution is extremely slow: https://github.com/hickory-dns/hickory-dns/issues/1968
In your logfile on the windows side, it's still trying to resolve the host (this can take like 30 seconds).
I'm in the process of adding this information to the UI.
I will test how exactly scaling effects things, thank you for catching that.
@feschber commented on GitHub (Apr 26, 2024):
Could #91 have been the issue? Did you test a recent version?
@MulverineX commented on GitHub (Apr 26, 2024):
That's no longer happening
@feschber commented on GitHub (Apr 26, 2024):
Ah I missed that part. I assume it must have been that issue then.
@MulverineX commented on GitHub (Apr 26, 2024):
The slow DNS hasn't caused any problems for me btw, the connection always opens immediately
Thank you!!! Please mention me here or in the release when you've got that fixed, I appreciate it! Thanks for all your work on this tool.
@MulverineX commented on GitHub (Apr 29, 2024):
@feschber I think I found the problem, https://stackoverflow.com/a/26097858
@feschber commented on GitHub (Apr 29, 2024):
Imo it's probably best to not be DPI aware and rather retrieve the actual display resolution via
EnumDisplaySettings.This way I dont have to rely on an application manifest (which currently does not exist)
@MulverineX commented on GitHub (Apr 29, 2024):
Did some digging, this appears to be the method most are using to add a manifest to their Rust binaries https://github.com/nabijaczleweli/rust-embed-resource
If
EnumDisplaySettingsworks though that'd be fine probably@feschber commented on GitHub (May 6, 2024):
could you confirm that the latest commit works?
@MulverineX commented on GitHub (May 6, 2024):
@feschber It works perfectly! Thank you so much! If my situation was reversed though I would still have an issue, because Linux scaling isn't being taken into account either. Luckily, its my right-side monitor
@feschber commented on GitHub (May 9, 2024):
@MulverineX are you sure about that? Because the scaling does not have any influence on the window position or size in wayland (layer-shell only wants to know on what edge to display the window).
You can verify the position of the "entry zones" via
(assuming you are still using KDE)
@MulverineX commented on GitHub (May 9, 2024):
Will look into this for ya later today
@MulverineX commented on GitHub (May 10, 2024):
finally got around to testing this, its not an issue, everything works as it should :)
@feschber commented on GitHub (May 11, 2024):
Thanks for testing, appreciate it!
@MulverineX commented on GitHub (May 12, 2024):
@feschber edit: #132