Skip to content

Wayland: a key-taking layer-shell launcher panel (on-demand keyboard) #19

Closed

Description

@kitlangton

A keyboard launcher (a search panel shown from a global shortcut) needs a floating panel that takes keyboard input without becoming an ordinary toplevel. On macOS that's the non-activating launcher panel; on Wayland it should be a layer-shell surface on the overlay layer.

Needed: either a launcher preset on Wayland, or OverlaySpec with KeyPolicy::OnDemand usable as the launcher: the panel takes keys while shown and gives them back when hidden. request_keys needs zwlr_layer_shell_v1 version 4 (keyboard_interactivity: on_demand); fall back to exclusive on older compositors, and document the behaviour per compositor (wlroots, KWin, Hyprland, niri).

Done when: a headless-testable example and a manual check on a wlroots compositor and on KWin: show from a shortcut, type into a TextInput, Escape hides it, focus returns to the previous window.

Activity

  1. ImBIOS commented on Oct 26, 2026

    @ImBIOS
    Contributor

    Verified the launcher pieces against a layer-shell compositor (sway 1.9, wlroots, zwlr_layer_shell_v1 v4):

    • overlay-lab takes the layer-shell path there (OverlayCreated { nonactivating_keys: Supported }, via set_keyboard_interactivity(OnDemand) with the v4 gate + supports_keys capability report). On X11 the same binary reports Unsupported (window fallback). So the KeyPolicy::OnDemand preset, the v4 request_keys fallback, and the capability reporting this issue asks for all exist and behave per compositor.
    • What still needs a person: show-from-shortcut → type into a TextInput → Escape hides it → focus returns to the previous window, plus KWin / Hyprland / niri behavior. swaymsg confirms the picking surfaces exist; end-to-end key injection is not wired up headless.

    No code changes needed for this one from what I can see — the remaining work is the manual pass above.

  2. kitlangton commented on Oct 30, 2026

    @kitlangton
    ContributorAuthor

    Closing this since your check on sway showed the layer-shell launcher works without code changes. What's left is a manual pass on KWin, Hyprland and niri. If anyone hits a compositor where keyboard focus or Escape-to-hide misbehaves, please open a new issue with the compositor and version.

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

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions