Skip to content

rust: Port obs-nix-hotkey-state.c to obs-hotkey #1514

Closed

Description

@rdoupe

Unit

Port libobs/obs-nix-hotkey-state.c.h to obs-hotkey: the Linux/Wayland key and shortcut state machine (147 lines, its own TU in libobs.nix-wayland). It came from our Wayland hotkey work.

Phase and position

Phase 6 (libobs host code, Linux). The hotkey name map is already in obs-hotkey (#833).

Dependencies and existing tests

It locks obs->hotkeys.mutex, a field of obs-internal.h. Per testing-policy.md, a C caller that reaches into obs-internal.h gets a behaviour-neutral accessor first, in its own PR, with the existing C tests passing; then the unit is ported.

test_wayland_hotkeys (8 cases) and test_portal_shortcuts (28) cover it, but they compile the C into themselves (obs=hotkey_test_obs), so a Rust swap is invisible to them, as with scene-bounds. The port's proof is Tier 3 parity against the C oracle, with those tests unchanged.

Plan

  1. Behaviour-neutral PR: a hidden C accessor for the hotkey lock, used by obs-nix-hotkey-state.c.h; no other change.
  2. Port PR after 1 lands: Rust in obs-hotkey, shim swap under ENABLE_RUST_LIBOBS=ON, Tier 1, layout, Tier 3 parity, Tier 2 OFF/ON unchanged.

No intended behaviour changes. Public headers, exported signatures and existing C tests stay as they are.

Activity

  1. rdoupe commented on Oct 20, 2026

    @rdoupe
    CollaboratorAuthor

    Claiming: #1514

    1. Behaviour-neutral C PR: hidden accessor for the hotkey lock, used by obs-nix-hotkey-state.c.h, existing tests unchanged.
    2. The port, as its own PR after 1 merges.

    First PR expected today.

  2. added
    claimed
    on Oct 20, 2026
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

    claimed

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions