Skip to content

fix(gui): capture custom shortcuts with distinct numpad keys - #1132

Closed
tournierjc wants to merge 2 commits into
AprilNEA:masterfrom
tournierjc:upstream/shortcut-capture
Closed

tournierjc wants to merge 2 commits into
AprilNEA:masterfrom
tournierjc:upstream/shortcut-capture

Conversation

@tournierjc

Copy link
Copy Markdown

Summary

Record custom keyboard shortcuts from GPUI keystrokes in the button inspector, mapping numpad digits to distinct HID usages (kp0–kp9).

GPUI dependency

Numpad identity requires a GPUI platform fix upstream in Zed:

This PR patches GPUI from tournierjc/zed branch openlogi/numpad-digit-keys until #63402 lands.

Relation to OpenLogi#971

AprilNEA/OpenLogi#971 proposes agent-backed shortcut recording (Fixes #573). This PR uses GPUI keystroke capture in the desktop UI instead — an alternative approach worth comparing before both land.

Testing

cargo check -p openlogi-desktop -p openlogi-core

Verify numpad digits record as kp0–kp9 on Linux after the GPUI patch.

Made with Cursor

@tournierjc
tournierjc requested a review from AprilNEA as a code owner August 29, 2026 08:24
@greptile-apps

greptile-apps Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR adds GPUI-based shortcut capture with distinct numpad digit usages and extends cross-platform injection mappings for the newly recordable keys.

  • Replaces text-based shortcut entry in the mouse inspector and Actions Ring with a reusable shortcut-capture component.
  • Expands HID usage parsing, labels, and platform injection mappings for keypad and navigation keys.
  • Updates GPUI to a temporary patched revision that preserves numpad digit identity.
  • Corrects application-specific Actions Ring layout rendering and Windows keypad Enter injection.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

Filename Overview
crates/openlogi-desktop/src/features/action_ring.rs The editor now renders the effective application-scoped ring layout and commits captured shortcuts through the existing scoped action-ring state path.
crates/openlogi-desktop/src/ui/shortcut_capture.rs Introduces the reusable GPUI shortcut-capture control used by binding editors.
crates/openlogi-core/src/binding/key_combo.rs Extends GPUI key-name conversion and HID usage labeling for keypad and navigation keys.
crates/openlogi-inject/src/inject.rs Expands Windows HID mappings and distinguishes keypad Enter as an extended key.
crates/openlogi-inject/src/inject/windows.rs Propagates Windows extended-key identity through regular and held shortcut injection paths.
Cargo.toml Temporarily redirects GPUI dependencies to the patched numpad-aware upstream fork.

Reviews (3): Last reviewed commit: "fix(gui,inject): honor per-app ring layo..." | Re-trigger Greptile

Comment thread crates/openlogi-desktop/src/features/action_ring.rs Outdated
Comment thread crates/openlogi-inject/src/inject.rs
@tournierjc

Copy link
Copy Markdown
Author
image

tournierjc and others added 2 commits August 29, 2026 18:01
Record keyboard shortcuts from GPUI keystrokes in the button inspector,
with kp0-kp9 identity preserved via a patched GPUI fork.

Depends on zed-industries/zed#63402 (Fixes zed-industries/zed#11948).
Alternative approach to AprilNEA#971.

Co-authored-by: Cursor <cursoragent@cursor.com>
Greptile: show the scoped Actions Ring layout in the editor instead of
always reading default, and set KEYEVENTF_EXTENDEDKEY for HID 0x58 so
keypad Enter stays distinct from main Enter when injecting shortcuts.

Co-authored-by: Cursor <cursoragent@cursor.com>
@tournierjc
tournierjc force-pushed the upstream/shortcut-capture branch from 500296e to f0c4d0d Compare August 29, 2026 16:06
@tournierjc tournierjc closed this Aug 29, 2026
@tournierjc
tournierjc deleted the upstream/shortcut-capture branch August 29, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Keyboard shortcuts can't be set to mouse buttons

1 participant