Skip to content

Command Line (polyctl)

polyctl is a small command-line tool that talks to a running PolyKybdHost daemon over its local control socket. It is stdlib-only and never imports Qt, which makes it ideal for headless machines, scripted setups, and quick one-off commands without opening the tray GUI.

Subcommands

CommandDescription
statusShow connection state and current keyboard status
lang list / lang set <code>List available languages, or switch the active language
brightness <value>Set display brightness
idle <…>Configure or trigger idle behaviour
overlay …Inspect and manage key overlays
keymap …Read/write the dynamic keymap
commandsList the keyboard’s available one-off commands
fw versionReport the keyboard’s firmware version
fw flash <bin> [--apply]Flash a firmware .bin over HID (streams progress)
pause / resumeSuspend or resume the daemon’s device I/O
mru savePersist the recently-used overlay cache
settings get <key> / settings set <key> <value>Read or change a setting
update check / update installCheck for and install host updates (streams progress)
window reportReport the current active window to the daemon
watchStream live events from the daemon to the terminal
shutdownStop the daemon

Long-running operations (fw flash, update install) subscribe to daemon events and stream their progress to the terminal as it happens.

Examples

Terminal window
# Check the daemon is alive and the keyboard is connected
polyctl status
# Switch the active language
polyctl lang set en-US
# Set display brightness
polyctl brightness 80
# Flash firmware and apply it immediately
polyctl fw flash firmware.bin --apply
# Stream live events (reconnects, overlay sends, window changes)
polyctl watch
# Adopt the daemon-by-default startup model
polyctl settings set daemon_mode true

Because polyctl speaks the same control protocol the tray GUI uses, you can mix the two freely — drive a headless daemon from scripts and attach the GUI later with python -m polyhost --connect when you want a window.