Repository navigation
Conversation
Co-authored-by: Xuan Zhang <xuan@arcbox.dev>
Co-authored-by: Xuan Zhang <xuan@arcbox.dev>
Co-authored-by: Xuan Zhang <xuan@arcbox.dev>
Greptile SummaryThe PR adds agent-owned recording of physical keyboard shortcuts, transports recording state over IPC, saves shortcuts to mouse-button or gesture targets, expands cross-platform key injection, and updates Linux device permissions.
Confidence Score: 3/5The PR is not safe to merge until Linux keyboard-node access is constrained so unrelated active-user processes do not gain persistent global keystroke visibility. The recording and IPC flow is session-gated, but the Linux packaging change broadens keyboard evdev access from a temporary OpenLogi operation to every process under the active desktop identity. Files Needing Attention: packaging/linux/udev/70-openlogi.rules
|
| Filename | Overview |
|---|---|
| crates/openlogi-agent-core/src/shortcut_recording.rs | Adds the agent-owned bounded recording state machine, portable key conversion, session rejection, timeout, and listener lifecycle. |
| crates/openlogi-desktop/src/features/mouse/view.rs | Coordinates recording sessions with the selected button or gesture and session-gates completed shortcuts before persistence. |
| crates/openlogi-desktop/src/services/ipc.rs | Adds recording commands and acknowledgement handling while resetting long-held observations around session mutations. |
| crates/openlogi-ipc/src/ipc.rs | Extends the append-only protocol with recording state and commands alongside a protocol-version bump. |
| crates/openlogi-inject/src/inject/windows.rs | Expands Windows shortcut injection for newly recordable physical keys, including selected extended-key handling. |
| packaging/linux/udev/70-openlogi.rules | Grants session-wide keyboard-node access to the active user, exposing keystrokes outside OpenLogi recording sessions. |
Sequence Diagram
sequenceDiagram
participant UI as Desktop UI
participant IPC as IPC Client
participant Agent as Agent Recorder
participant OS as Keyboard Listener
UI->>IPC: Start recording
IPC->>Agent: start_shortcut_recording()
Agent-->>IPC: Session ID
Agent->>OS: Start observe-only listener
OS-->>Agent: Physical key events
Agent-->>IPC: Generation-stamped recording state
IPC-->>UI: Recording / waiting / complete
UI->>UI: Save shortcut to selected target
UI->>IPC: Cancel or consume session
IPC->>Agent: cancel_shortcut_recording()
Agent->>OS: Drop listener
Reviews (1): Last reviewed commit: "fix(linux): grant shortcut recorder keyb..." | Re-trigger Greptile
| # `uaccess` grants an ACL to the active local seat user; it does not make the node | ||
| # world-readable. This also covers Bluetooth keyboards on the virtual uhid bus, | ||
| # which logind's normal physical-seat rules may not classify on their own. | ||
| SUBSYSTEM=="input", KERNEL=="event*", ENV{ID_INPUT_KEYBOARD}=="1", TAG+="uaccess" |
There was a problem hiding this comment.
Keyboard ACL outlives recording
When this rule is installed, uaccess grants every process running as the active desktop user access to all keyboard event nodes for the session, not just OpenLogi during its 60-second recording window, exposing global keystrokes to unrelated or compromised processes under that identity. How this was verified: The rule applies a user-scoped ACL to every ID_INPUT_KEYBOARD node, while recorder teardown only drops OpenLogi's listener and never revokes that ACL.
Knowledge Base Used: Distribution packaging and CI
|
Hi @AprilNEA — checking in on the status of this one, since it looks like the most complete answer to #573 (real key recording rather than typing a chord as text). I'd argue this is the single biggest gap left between OpenLogi and Options+ right now. Binding an arbitrary chord to a button is what turns the mouse from "a few fixed actions" into a per-app control surface: Cmd+Shift+A to mute in Zoom, Win+Shift+T in a launcher, a hotkey for an AutoHotkey/Raycast script, a Super-bound GNOME shortcut — and combined with the per-app profile overlay it means the same button does the right thing in every app. That's the workflow people are describing in #573 and #1190 (14 comments before it was closed as a duplicate), and it's the one thing several of them say they still keep Options+ around for. Every one of them ends up hand-editing A few things I noticed that may be blocking it:
Is agent-side recording still the direction you want, or would you rather land a text-input editor first and layer recording on top later? If it's just a matter of bandwidth, I'm happy to help: rebase the branch onto current |
Summary
inputsandcontrolscrates.Changes
Testing
cargo fmt --all -- --checkRUSTFLAGS=\"-D warnings\" cargo clippy --workspace --all-targets --locked -- -D warningsRUSTFLAGS=\"-D warnings\" cargo test --workspace --lockedRUSTDOCFLAGS=\"-D warnings\" cargo doc --workspace --no-deps --document-private-items --exclude openlogi-ui --exclude openlogi-desktop --exclude openlogi-overlay --exclude openlogi-agentcargo test --locked -p openlogi-ipc --test wire_formatcargo test --locked -p openlogi-desktopcargo test --locked -p openlogi-desktop i18ncargo xtask ci clippy-windowsaarch64-apple-darwincross-Clippy foropenlogi-core,openlogi-inject,openlogi-ipc,openlogi-agent-core, andopenlogi-agentcargo xtask ci wasmcargo xtask ci shellwith shellcheck 0.9.0 and shfmt 3.13.1cargo xtask release check-publishcargo deny --config .cargo/deny.toml --all-features --manifest-path crates/openlogi/Cargo.toml checkcargo xtask linux packagewith nfpm 2.47.0 (DEB, RPM, and Arch packages created)Not runtime-tested on physical keyboard/mouse hardware. Maintainer verification: record modifier/key and numpad combinations for a button and gesture, save them, and trigger them on macOS, Linux/X11, Linux/Wayland, and Windows; on Linux, verify the installed udev rule grants the active desktop session keyboard access after re-login or rule reload.
The native GPUI interaction and screenshots were not exercised because the Linux orb is headless; desktop state/interaction tests passed. Nix formatting/evaluation/package builds and
udevadmparser/runtime checks were not run because those tools are unavailable in the orb.Fixes #573