A server for exposing Plover engine events and functionality
Project description
Plover WebSocket Server
A WebSocket server for exposing Plover events and controlling Plover from an external program.
Installation
TODO: This will be true once released. For now, you can only pip install this from source which requires running Plover from source to use.
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
To set the host name and port used, create a file named plover_engine_server_config.json
inside Plover's configuration directory (same directory as plover.cfg
file)
with the content:
{
"host": "localhost",
"port": 8086
}
All fields are optional. The default is included in the example above.
How to Use
- Enable it in Configure -> Plugins
- Connect to http://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"}
.
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}
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
.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for plover_engine_server_2-0.0.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | e692de3463b8867f40a2984b867db67fcd533f5ba73bb499b5bb3e1f2a6fc548 |
|
MD5 | 9970642e61ea31373bd47d16f41d989d |
|
BLAKE2b-256 | 436d89f0e0cf193827d1591c484f88e62c9b0725614f7a19fa24317ed56b6ef8 |
Hashes for plover_engine_server_2-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4881c781d1694516fe228718e512dc0171b298ebf5d06f5ec1cfe1bea23e750d |
|
MD5 | d0bb86baaae0c6ff986eedd92199b1de |
|
BLAKE2b-256 | 808b852674745276e2bd03727da9ae400680a18e94ab3ba1c70c4d1e25af7c8b |