Skip to content

feat(gui): name G-key profiles from the M-key cards - #1240

Open
jiliu88 wants to merge 8 commits into
AprilNEA:masterfrom
jiliu88:codex/g913-profile-names
Open

feat(gui): name G-key profiles from the M-key cards#1240
jiliu88 wants to merge 8 commits into
AprilNEA:masterfrom
jiliu88:codex/g913-profile-names

Conversation

@jiliu88

@jiliu88 jiliu88 commented Sep 2, 2026

Copy link
Copy Markdown

Summary

Add optional local names for the three M-key G profiles and make each name directly editable from its M1/M2/M3 card.

Depends on #1177 and #1239. The review scope unique to this draft is commit f61cd8bd; after both dependencies land, this reduces to one profile-naming commit.

Why this is separate

Profile naming is useful once M1/M2/M3 own three independent G1-G5 maps, but it is not required for correct hardware capture, dispatch, or physical key mapping. Keeping it separate prevents a local UX feature from widening the hardware PRs.

Implementation

  • Persist optional per-device M1/M2/M3 display names in g_key_profile_names.
  • Keep the field backward-compatible and omitted when empty; no schema bump is required.
  • Preserve names when legacy device identities fold into canonical identities.
  • Trim names before saving and remove the field when an input is cleared.
  • Render three always-present GPUI text inputs over the M1/M2/M3 name lanes.
  • Persist edits on input change and recreate the inputs only when the selected device changes.
  • Expose settable accessibility text fields with profile-specific labels.
  • Add matching translation keys to every locale catalog.

Testing

Passed on commit f61cd8bd:

  • cargo fmt --all -- --check
  • all 274 openlogi-core tests
  • all 208 openlogi-desktop tests
  • all openlogi-ui tests and locale catalog parity
  • strict Clippy for openlogi-core, openlogi-desktop, and openlogi-ui
  • git diff --check

The resulting Git tree is byte-for-byte identical to the signed local acceptance build previously verified on a physical G915. In that build, M2 was clicked by screen coordinate, displayed its focus ring and caret, accepted an actual a key event, exposed Value: a through accessibility, and was restored to its original empty value.

@jiliu88
jiliu88 marked this pull request as ready for review September 2, 2026 03:06
@jiliu88
jiliu88 requested a review from AprilNEA as a code owner September 2, 2026 03:06
@greptile-apps

greptile-apps Bot commented Sep 2, 2026

Copy link
Copy Markdown

Greptile Summary

Adds configurable Logitech gaming-key profiles, local M-key profile names, gaming-key capture and dispatch, capability propagation, schema migrations, and the corresponding desktop editing interface.

  • Introduces HID++ support for G, M, and MR key events with capture restoration.
  • Adds profile and nine-button binding modes with persisted per-device configuration.
  • Adds editable localized M1/M2/M3 profile names to the keyboard UI.
  • Extends inventory, IPC, diagnostics, tests, and documentation for gaming-key capabilities.

Confidence Score: 3/5

The PR should not merge until identity folding preserves all gaming-key settings and capture-target changes stop inheriting another session's active profile.

Route adoption currently discards several newly persisted settings, while the long-lived keyboard manager can dispatch replacement-device input using a profile selected on an earlier session.

Files Needing Attention: crates/openlogi-core/src/config/identity.rs; crates/openlogi-agent-core/src/watchers/keyboard.rs

Important Files Changed

Filename Overview
crates/openlogi-core/src/config/identity.rs Preserves profile names during identity folding but drops the other newly persisted gaming-key settings.
crates/openlogi-agent-core/src/watchers/keyboard.rs Adds profile-aware gaming-key dispatch, but profile selection persists across capture-target replacement.
crates/openlogi-device/src/session/keyboard.rs Adds coordinated capture, event decoding, wake rearming, and restoration for G/M/MR keys.
crates/openlogi-desktop/src/features/keyboard/function_row.rs Adds capability-gated gaming-key controls and editable per-profile names to the keyboard interface.
crates/openlogi-core/src/config/device.rs Defines the persisted profile names, binding stores, software-control setting, and gaming-key mode.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    UI[M-key profile editor] --> Config[Per-device gaming configuration]
    Config --> Orchestrator[Keyboard capture plan]
    Orchestrator --> Session[HID++ capture session]
    Session --> Events[G / M / MR events]
    Events --> Manager[Keyboard manager profile state]
    Manager --> Dispatch[Configured action dispatch]
Loading

Fix all with Greploop Fix All in Codex Fix All in Claude Code

Reviews (1): Last reviewed commit: "feat(gui): 支持命名 M 键配置层" | Re-trigger Greptile

fold_map_field!(disabled_gestures);
fold_map_field!(per_app_bindings);
fold_map_field!(camera_profiles);
fold_map_field!(g_key_profile_names);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Identity folding drops gaming settings

When a route-keyed device entry is adopted into a canonical identity, fold preserves the profile names but omits g_key_profiles, gaming_button_bindings, g_key_software_control, and gaming_key_mode, causing the user's bindings, opt-in, and selected mode to revert to defaults.

Knowledge Base Used: Core domain and configuration

Fix in Codex Fix in Claude Code

pending_restore: None,
restart_at: None,
dispatcher,
active_g_key_profile: GKeyProfile::M1,

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Capture targets inherit profile state

When a user selects M2 or M3 and the keyboard capture session is replaced, the long-lived manager retains that profile for the next target, causing G-key presses on the replacement keyboard to execute its M2 or M3 action instead of starting from M1.

Knowledge Base Used: Background agent service

Fix in Codex Fix in Claude Code

@davidbudnick davidbudnick added type: feature New feature request area: gui Graphical user interface platform: all Cross-platform issue labels Sep 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: gui Graphical user interface platform: all Cross-platform issue type: feature New feature request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants