Repository navigation
Conversation
A shortcut editor cannot record a trigger from ordinary keyboard events: they lack effective native modifiers and Num Lock, and they arrive after text inputs and other widgets have reacted to the keys. Add `Inhibitor::record`, which arms one source-owned `Recording` while inhibition is actually active. The recording exposes its state (`Preparing`, `WaitingForRelease`, `Ready`, `Collecting`, then a terminal `Recorded(trigger)`, `Cancelled(reason)` or `Closed`), a change stream and an explicit `cancel` that revokes it even while other clones are alive. The `winit` shell maps it onto winit's Wayland `KeyboardShortcutsInhibitor::record`. Requires winit's shortcut recording; `Cargo.toml` patches winit to the fork commit that provides it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Canopa fork tracking PR. Its diff against
canopa/keyboard-shortcuts-inhibit(keyboard shortcut inhibition, itself oncanopa/base= upstream0.14at595af03) is exactly the change Canopa carries iniced_winit/iced_runtime. It is merged intocanopa/main, which Canopa builds. This PR stays open until the change is upstreamed or dropped.What
iced_runtime::window::keyboard_shortcuts::recording:Recordingexposes its state (Preparing,WaitingForRelease,Ready,Collecting, then a terminalRecorded(trigger),Cancelled(reason)orClosed), a boundedchanges()stream, andcancel(), which revokes the attempt even while other clones or the stream are alive.Inhibitor::record(), with a defaultDriver::recordthat returnsNone.iced_winit::keyboard_shortcuts: maps the recording onto winit's WaylandKeyboardShortcutsInhibitor::record.canopa/wayland-shortcut-recording(9af67a54292d…), withCargo.lockupdated to match.canopa/mainpins winit'scanopa/main.Why
The GlobalShortcuts editor needs a trigger that the compositor resolves in the current layout. It must be captured before ordinary dispatch, so that text inputs, repeats and dialog Escape do not react to it. See Canopa ADR 0069.
Verification
cargo check --locked --all-targets -p iced_winit -p iced_runtime -p iced_test(default features) andcargo check --locked -p iced --no-default-features --features advanced,wgpu,crisp,web-colors,thread-pool,wayland,image(Canopa's selection) pass at this branch. The only warning is the pre-existingf32::INFINITYdeprecation iniced_widget.cargo test --locked -p iced_winit -p iced_runtime --libpasses, including the twoRecordingtests.Upstream
Nothing upstream. Canopa keeps this locally.
🤖 Generated with Claude Code