feat: add external control service for remote control #8043
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
When running in Wayland environment on Linux, the application's built-in global hotkey binding feature does not work. Adapting to each desktop environment's global hotkey solution is complex and hard to maintain. To address this, this PR introduces an external control service that can be invoked externally, enabling users to assign their own hotkeys to invoke the service, thereby achieving the original global hotkey features.
For consistency across platforms, both an HTTP server (cross-platform) and a UNIX domain socket (Unix-only) are provided.
Fixes #1736
Why we need it and why it was done in this way
Discussions #2379
Breaking changes
None. Just a new feature.
Special notes for your reviewer
My further idea is to allow passing parameters directly in the external invocation, so that specific features inside the application can be triggered directly.
For example, when the external control service is invoked with the following parameters, the application should open the miniwindow and directly navigate to the translation page to translate the given text.
Checklist
Need to update documentation to explain how to use the external control service, but I don't know how to do it yet. I will update the documentation later.
Release note