Skip to content

On-screen keyboard toggle for Companion Dashboard kiosk (web UI, next to Toggle Fullscreen) #9

Description

@dubpixel

Summary

Add an on-screen (virtual) keyboard toggle for Companion Dashboard's kiosk display, controllable from the web UI — same pattern as the existing Toggle Fullscreen button (issue delivered in this session, dashboard_toggle_fullscreen() / xdotool). Dashboard's own settings UI requires typing (connection URLs, etc.), which is impossible on a pure touchscreen setup with no physical keyboard attached — the 52Pi 11.26" touch display this project targets has no such input path today.

Proposed approach

  • matchbox-keyboard — lightweight, X11-native virtual keyboard, well-suited to this project's existing X11/openbox kiosk stack (install-dashboard.sh). No CLI args needed for basic use; spawns a small on-screen keyboard window. Toggle via process presence: pgrep -x matchbox-keyboard to check state, matchbox-keyboard & to show, pkill -x matchbox-keyboard to hide — same shape as the existing dashboard_toggle_fullscreen()/dashboard_enabled() functions.
  • Considered and explicitly not recommending onboard for v1: it has nicer auto-show-on-text-field-focus behavior in theory (via AT-SPI), but that's not guaranteed to work reliably inside an Electron/Chromium app (Dashboard's actual runtime), and this project's existing pattern (F11) is already manual-toggle-from-web-UI, not auto-detect — consistency argues for matchbox-keyboard's simpler manual model. Revisit only if manual toggle proves too much friction in practice.
  • Not yet live-verified on hardware this pass — package availability/exact window behavior on Raspberry Pi OS Trixie hasn't been confirmed against real hardware, only against general knowledge of the tool. Verify during implementation, not assumed here.

What our side would need

  • scripts/install-dashboard.sh: add matchbox-keyboard to the apt-get install line (already uses --no-install-recommends, see gotcha #23 — keep that).
  • src/dpx-buttonode-ui/dpx-buttonode-ui.py: new keyboard_active()/toggle_onscreen_keyboard() helpers (pattern: dashboard_toggle_fullscreen()), a new POST route (/dashboard/keyboard), and a button next to Toggle Fullscreen on the Mode tab's Dashboard section — only shown while Dashboard itself is running (same gating as Toggle Fullscreen).
  • Runs via DISPLAY=:0 same as the F11 mechanism, since dpx-buttonode-ui and the kiosk session both run as root on the same machine.

Out of scope for this pass

  • Auto-show-on-focus behavior (onboard/AT-SPI route) — explicitly deferred, see above.
  • Implementation — scoping only, per explicit request.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions