Skip to main content

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-engine-server-2). 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.

  1. Open Plover
  2. Navigate to the Plugin Manager tool
  3. Select the "plover-engine-server-2" plugin entry in the list
  4. Click install
  5. Restart Plover

The same method can be used for updating and uninstalling the plugin.

Configuration

To configure the plugin, create a file named plover_engine_server_config.json inside Plover's configuration directory (same directory as plover.cfg file).

Example content:

{
    "host": "localhost",
    "port": 8086,
    "secretkey": "mysecretkey"
}

All fields are optional. The default is included in the example above.

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_engine_server/manager.py, or write an example program (or use the existing plover_engine_server/websocket/example_client.py) 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"}.

Note: to avoid Plover being controlled by a malicious website, you should set some secret key, and add the secret key into the sent content. For example {"stroke": ["S-"], "secretkey": "mysecretkey"}.

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.
Note This should be used very sparingly because it may have unintended effects.

Metadata

Release files for plover-engine-server-2 0.0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for plover-engine-server-2 0.0.7
File Size Uploaded
plover_engine_server_2-0.0.7.tar.gz 30.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for plover-engine-server-2 0.0.7
File Interpreter ABI Platform
plover_engine_server_2-0.0.7-py3-none-any.whl Python 3 none any Details

Total release size: 55.5 kB

Release files / plover_engine_server_2-0.0.7.tar.gz

Download URL plover_engine_server_2-0.0.7.tar.gz
Size 30.4 kB
Tags Source
SHA-256 checksum
How to use checksums
1c4ffb0adaef3c2a9018032c87b6cd228354725974f204e65006e52c1fe6afc4
BLAKE2b-256 checksum
How to use checksums
983ceff89d86dff80a863c44e2863c51782678690c02d4a06c67c2106b3274bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.5

Release files / plover_engine_server_2-0.0.7-py3-none-any.whl

Download URL plover_engine_server_2-0.0.7-py3-none-any.whl
Size 25.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
701ff8ac1d350201cfa7c50a105a1a682af93bfd8fccf20df7272427122ef2cf
BLAKE2b-256 checksum
How to use checksums
4bea5594152e8924e1e8e96cb563e922557b82efeb36ddd433435ba1808ffaa5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.6.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.5

Release history Release notifications | RSS feed

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.8

2 release files

This release

0.0.7 This release

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page