[GH-ISSUE #127] Windows: Input Lost on Elevated Programs #49

Open
opened 2026-05-05 22:06:41 -06:00 by gitea-mirror · 7 comments
Owner

Originally created by @andreaxhearts on GitHub (May 10, 2024).
Original GitHub issue: https://github.com/feschber/lan-mouse/issues/127

Windows 10 is the client with Ubuntu Linux as the server, set up correctly on both ends. Whenever a program running as admin opens on Windows (UAC prompt, admin command prompt, etc.), input is lost on the Windows machine. I have to use the release keys and make sure the elevated program isn't in focus to be able to use lan-mouse again.

Originally created by @andreaxhearts on GitHub (May 10, 2024). Original GitHub issue: https://github.com/feschber/lan-mouse/issues/127 Windows 10 is the client with Ubuntu Linux as the server, set up correctly on both ends. Whenever a program running as admin opens on Windows (UAC prompt, admin command prompt, etc.), input is lost on the Windows machine. I have to use the release keys and make sure the elevated program isn't in focus to be able to use lan-mouse again.
gitea-mirror added the
windows
label 2026-05-05 22:06:41 -06:00
Author
Owner

@feschber commented on GitHub (May 10, 2024):

You can run it as administrator to prevent this but I did not want to enforce that (yet)

<!-- gh-comment-id:2103893719 --> @feschber commented on GitHub (May 10, 2024): You can run it as administrator to prevent this but I did not want to enforce that (yet)
Author
Owner

@andreaxhearts commented on GitHub (May 10, 2024):

I did just test that, yep that works. User Account Control popup still gets in the way regardless, but most of the time that gets turned off anyway. That's only case though, everything else works with admin.

<!-- gh-comment-id:2105167654 --> @andreaxhearts commented on GitHub (May 10, 2024): I did just test that, yep that works. User Account Control popup still gets in the way regardless, but most of the time that gets turned off anyway. That's only case though, everything else works with admin.
Author
Owner

@feschber commented on GitHub (May 10, 2024):

Yeah you're right, the uac prompt probably needs even higher privileges

<!-- gh-comment-id:2105291670 --> @feschber commented on GitHub (May 10, 2024): Yeah you're right, the uac prompt probably needs even higher privileges
Author
Owner

@vilhalmer commented on GitHub (Jul 24, 2024):

This also occurs when focusing a window which has been marked as Not Responding and like UAC, running as admin can't avoid it. Not sure there's anything that can be done about it, but worth noting.

<!-- gh-comment-id:2248311817 --> @vilhalmer commented on GitHub (Jul 24, 2024): This also occurs when focusing a window which has been marked as Not Responding and like UAC, running as admin can't avoid it. Not sure there's anything that can be done about it, but worth noting.
Author
Owner

@GladOSkar commented on GitHub (Jan 28, 2026):

I believe on Synergy/Barrier, i was even able to click UAC prompts (although the connection broke when the UAC prompt came up and i had to re-move the mouse to the windows computer while the prompt was open. But i was absolutely able to click it remotely, never even had a keyboard/mouse on that PC. Maybe someone who knows more about this can figure out how they did it

Edit: Some info about how that worked can be found at https://github.com/debauchee/barrier/issues/264

Setting the UAC settings in Control panel\User Accounts\User Accounts to "don't dim" makes it not break the connection, and setting it to "Never notify" will never prompt and therefore also works. That's enough for me, but obviously very insecure.

<!-- gh-comment-id:3812286976 --> @GladOSkar commented on GitHub (Jan 28, 2026): I believe on Synergy/Barrier, i was even able to click UAC prompts (although the connection broke when the UAC prompt came up and i had to re-move the mouse to the windows computer while the prompt was open. But i was absolutely able to click it remotely, never even had a keyboard/mouse on that PC. Maybe someone who knows more about this can figure out how they did it Edit: Some info about how that worked can be found at https://github.com/debauchee/barrier/issues/264 Setting the UAC settings in `Control panel\User Accounts\User Accounts` to "don't dim" makes it not break the connection, and setting it to "Never notify" will never prompt and therefore also works. That's enough for me, but obviously very insecure.
Author
Owner

@vilhalmer commented on GitHub (Jan 28, 2026):

Synergy was probably running as SYSTEM. I've been using Sunshine/Apollo as a remote desktop solution lately which also runs at this level and it is also able to interact with nearly all elevated windows, including frozen windows and UAC even with dimming still enabled.

I'm all for not mandating this, but perhaps documenting/providing a way of running as a system service for people who do want the elevation would be enough of a fix? (I don't actually know how to create one, I am more of a necessity user than a power user on the Windows side.)

<!-- gh-comment-id:3812790291 --> @vilhalmer commented on GitHub (Jan 28, 2026): Synergy was probably running as SYSTEM. I've been using Sunshine/Apollo as a remote desktop solution lately which also runs at this level and it is also able to interact with nearly all elevated windows, including frozen windows and UAC even with dimming still enabled. I'm all for not mandating this, but perhaps documenting/providing a way of running as a system service for people who do want the elevation would be enough of a fix? (I don't actually know how to create one, I am more of a necessity user than a power user on the Windows side.)
Author
Owner

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

I've started digging into this. It's nowhere near ready for a PR yet and my branch has some other build, ai and github workflow changes so it looks like a mess, I'll extract out the windows service bits before submitting an isolated PR but I have:

  • cli command to install service lan-mouse install-service or uninstall service from elevated shell - registers service, copies user's config and certificate if they exist to the service config directory (probably some discussion to be had here)
  • lan-mouse running as a service with elevated control - it's able to control input on uac and login screens.
  • since service is autostart it works immediately after rebooting computer
  • service installation is optional - lan-mouse can still run like it does today without installing as a service (with uac / login / unlock screen limitations)

branch with changes
main starting point commit is this

I'll spend a bit of time finishing things and get a PR spun up in a week or so.

<!-- gh-comment-id:3843306734 --> @jonstelly commented on GitHub (Feb 3, 2026): I've started digging into this. It's nowhere near ready for a PR yet and my branch has some other build, ai and github workflow changes so it looks like a mess, I'll extract out the windows service bits before submitting an isolated PR but I have: - cli command to install service `lan-mouse install-service` or uninstall service from elevated shell - registers service, copies user's config and certificate if they exist to the service config directory (probably some discussion to be had here) - lan-mouse running as a service with elevated control - it's able to control input on uac and login screens. - since service is autostart it works immediately after rebooting computer - service installation is optional - lan-mouse can still run like it does today without installing as a service (with uac / login / unlock screen limitations) [branch with changes](https://github.com/feschber/lan-mouse/compare/main...jonstelly:lan-mouse:feature/windows-service) main starting point commit is [this](https://github.com/feschber/lan-mouse/commit/8f05d1e880dc5f5234729b3596e7f454f6e3d5f8) I'll spend a bit of time finishing things and get a PR spun up in a week or so.
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#49
No description provided.