Plover WebSocket Server
A WebSocket server for exposing Plover events and controlling Plover from an external program.
This plugin is available on GitHub
and PyPI (under the name plover-websocket-server).
Report all bugs on GitHub.
Installation
Download the latest version of Plover for your operating system from the releases page. Only versions 4.0.0.dev8 and higher are supported.
- Open Plover
- Navigate to the Plugin Manager tool
- Select the "plover-websocket-server" plugin entry in the list
- Click install
- Restart Plover
The same method can be used for updating and uninstalling the plugin.
Configuration
A file named plover_websocket_server_config.json will be created
inside Plover's configuration directory (same directory as plover.cfg file).
Example content:
{
"private_key": "eb700b05b84a14b81ea69d5f826fc4ca30310db22f8943b1975fe56043c00771",
"public_key": "3a283210963d849642011731ba048e8d8f2272802902a9ef7de56d0116236801",
"host": "localhost",
"port": 8086,
"remotes": [
{
"pattern": "^https?\\:\\/\\/localhost?(:[0-9]*)?"
}
],
"ssl": {
"cert_path": "/path/to/cert.pem",
"key_path": "/path/to/key.pem"
}
}
All fields are optional. But if you specify either a private or public key you need the opposed matching key also specified. The same pattern applies to the pair of ssl paths.
The default is included in the example above except for the private and public keys and the ssl paths which are just an example.
In the remotes config, either an object with a Regex pattern, or a string are supported. This is important to allow Cross Origin Resource Sharing (CORS) for the specific case where your client runs on a browser.
How to Use
- Enable it in Configure -> Plugins
- Connect to ws://localhost:8086/websocket with your client and get the data pushed to you as event: data formatted JSON.
Received data format: Search for occurrences of queue_message in plover_websocket_server/manager.py,
or write an example program
and observe its output.
Controlling Plover from other programs:
- Sending 'close' disconnects you.
- Sending a valid JSON string will execute the specified action.
For example
{"stroke": ["S-"]}(note that invalid keys are silently dropped), or{"translation": "abc"}.
If there's some error during the execution, it will be silently ignored and printed on stderr.
If the "force" key is true then the command will be executed even when the engine is turned off.
Note that {PLOVER:RESUME} will have no effect in that case.
Because the Plover inner working is closely tied to the assumption
that strokes can only come from the keyboard, when {PLOVER:RESUME} (or a command with similar effect,
such as {PLOVER:TOGGLE}) is sent and the machine is
"Keyboard" then some characters before the cursor will be deleted.
To prevent this, set the "zero_last_stroke_length" key to true.
Acknowlegements
Forked from https://github.com/user202729/plover_websocket_server.
Metadata
Release files for plover-websocket-server 0.1.15
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| plover_websocket_server-0.1.15.tar.gz | 32.3 kB | Without provenance | Details for plover_websocket_server-0.1.15.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| plover_websocket_server-0.1.15-py3-none-any.whl | Python 3 | none | any | Details for plover_websocket_server-0.1.15-py3-none-any.whl |
Total release size: 63.8 kB
Release files / plover_websocket_server-0.1.15.tar.gz
| Download URL | plover_websocket_server-0.1.15.tar.gz |
|---|---|
| Size | 32.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1a0cb1dc6d34283087d6665edcd725a0993457f4785d5de4b7f4c509915cb360
|
|
BLAKE2b-256 checksum How to use checksums |
72c15fee6e7823ebfc06338edc606c3a76e9a30e9702567fabc53985fe9c522e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Release files / plover_websocket_server-0.1.15-py3-none-any.whl
| Download URL | plover_websocket_server-0.1.15-py3-none-any.whl |
|---|---|
| Size | 31.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ac06b374ab5e1173cd9ea422ea15f69274571e01af497b8afcd08a11ac2d22e5
|
|
BLAKE2b-256 checksum How to use checksums |
d6c430ca23d2a1429f18415cb424a6557caf2425df1cf6870fab596bb1c38a12
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Security for plover-websocket-server 0.1.15
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.