Commit Graph
138 Commits
Author SHA1 Message Date
dotCooCoo c36cb9f7f2 keymap: check X11 global grabs across layout groups and after registration
- A chord is refused when the second layout group types a different key a
  chord names at the level the grab uses (US with French: Ctrl+Q would also
  take French Ctrl+A). Digits match at either level; groups 3 and 4 are not
  checked.
- After registering, the mapping is read again. When the chord no longer
  resolves to the grabbed hotkey and slot, the registration is refused and
  its grab goes through the release path, which keeps the slots of current
  entries and grabs again an entry a release removed.
- Presses queued for a refused hotkey id are dropped; releases stay.
- unregister returns an error when the chord's grab could not be released
  and stays stuck.
- GlobalHotkeys::new documents that it must be the only user of
  global-hotkey's events in the process.
2026-11-29 01:05:08 -08:00
dotCooCoo cfadc99a82 Merge main into feat/keymap-global-hotkeys 2026-11-28 17:59:00 -08:00
autocraft-bot[bot] a5b566b051 Merge pull request #3552 2026-11-28 16:18:15 +00:00
BFlat 88ee49fdb0 Merge pull request #3948 from dotCooCoo/fix/shortcut-automation-replace-b-verify
Replace a keyboard shortcut through dialog automation
2026-11-28 11:34:37 +07:00
dotCooCoo 3bf8cc53f5 Replace a keyboard shortcut through dialog automation 2026-11-27 15:59:48 -08:00
dotCooCoo f8d2aa4a18 keymap: save imported conflict removals as final binding lists 2026-11-27 15:41:09 -08:00
BFlat 19cd636f35 Merge pull request #2595 from dotCooCoo/feat/keymap-mods-to-egui
keymap: Mods::to_egui gives the modifiers an egui key event carries
2026-11-27 14:19:56 +07:00
dotCooCoo dadf72bbbe Keep shortcut edits atomic when a binding cannot be saved 2026-11-26 13:01:10 -08:00
dotCooCoo 8512f89e95 Merge main into feat/keymap-mods-to-egui
# Conflicts:
#	crates/keymap/tests/egui.rs
2026-11-25 21:20:56 -08:00
skylartaylor 49f43ff037 keymap: a command the app runs itself keeps its chords out of matching
`CommandDef::with_dispatch(Dispatch::App)` says the app runs a command from
its own key handling. The command keeps its catalog entry and its bindings,
so surfaces and the shortcut editor still show and list its chords, and the
keymap matches none of them: the lookup, the holders, conflicts and
assignment pass over it, and `shown_chord` shows its first single-press
binding, home scope first, which nothing here can shadow.

The default, `Dispatch::Keymap`, is what every def is today; a written
catalog leaves it out.
2026-11-25 17:57:05 +01:00
aiongg 9f2961402b Merge pull request #3360 from aiongg/next-host-input
Hosted egui apps on next: host quit, dock tab focus, float order, host panel fill, app icon, keymap override warnings
2026-11-24 16:08:36 -05:00
aiongg 3ad64a26ea craft-keymap: DeleteKeys says whether Delete and Backspace are one key
A keymap takes Delete and Backspace as one key by default (`DeleteKeys::OneKey`,
Photoshop's rule): a press runs its own key's binding, else the other key's.
`Keymap::with_delete_keys(DeleteKeys::Apart)` keeps them two keys, for an app
that gives them different jobs, and `Matcher` then runs only the pressed key's
binding.
2026-11-24 16:38:18 +00:00
aiongg a783828e55 menu: a translated label with no letter of its own shows its English letter only in CJK languages; elsewhere the letter stays as a hidden mnemonic 2026-11-24 15:57:34 +00:00
bflatastic cbe8866177 keymap: CommandRef equality follows its binding key, so no parameters and an empty object are the same command 2026-11-23 02:01:42 +07:00
bflatastic 8faa8a02c3 keymap: clippy 1.100 clean: no needless borrow in the import's tool check; the hold-binding trial is three trials (text form, off and edits, clashes) 2026-11-22 22:36:03 +07:00
dotCooCoo 86a2dc1f7d keymap: X11 global hotkeys give a leaving binding no events once another binding takes its hotkey id
When a keyboard layout change made a release remove another binding's
grab, that binding was grabbed again through a hotkey whose id could be
the one a leaving binding still had. The leaving binding stayed in the
set until unregister or replace finished, and events were matched to the
first binding with the id, so a press that came in between ran the
command that was being removed. A leaving binding is now marked retired
before the others are grabbed again, and events no longer go to it.
2026-11-22 06:14:18 -08:00
bflatastic 497cc7758f keymap: a reserved chord is never bound, so a default binding on one is dropped when the keymap reserves it 2026-11-22 19:05:29 +07:00
bflatastic 5f4c1f282d cargo fmt on the merged crates 2026-11-22 01:57:31 +07:00
bflatastic 03ef0d0817 Merge remote-tracking branch 'origin/next' into sync/next
# Conflicts:
#	crates/automation/Cargo.toml
#	crates/automation/src/client.rs
#	crates/automation/src/control.rs
#	crates/automation/src/screenshot.rs
#	crates/automation/src/synthetic.rs
#	crates/automation/tests/it/main.rs
#	crates/automation/tests/it/synthetic.rs
#	crates/color-ui/src/palette.rs
#	crates/color-ui/src/ui/area.rs
#	crates/color-ui/src/ui/disc/stories.rs
#	crates/color-ui/src/ui/mod.rs
#	crates/color-ui/src/ui/paint_chip.rs
#	crates/color-ui/src/ui/pair/stories.rs
#	crates/color-ui/src/ui/palette/stories.rs
#	crates/color-ui/src/ui/panel.rs
#	crates/color-ui/src/ui/picker/stories.rs
#	crates/color-ui/src/ui/picker_dialog.rs
#	crates/color-ui/src/ui/swatches/library.rs
#	crates/color-ui/src/ui/swatches/panel.rs
#	crates/color-ui/src/ui/swatches/stories.rs
#	crates/color-ui/src/ui/wheel/stories.rs
#	crates/color-ui/tests/it/main.rs
#	crates/color-ui/tests/it/panels.rs
#	crates/color-ui/tests/it/picker.rs
#	crates/dialogs/src/lib.rs
#	crates/dialogs/src/native.rs
#	crates/dialogs/src/portal.rs
#	crates/dialogs/src/service.rs
#	crates/draw/src/ui/brush_presets/panel.rs
#	crates/draw/src/ui/brush_presets/picker.rs
#	crates/draw/src/ui/brush_presets/stories.rs
#	crates/draw/src/ui/gradient/palette/mod.rs
#	crates/draw/src/ui/pattern/editor.rs
#	crates/draw/src/ui/pen/stories.rs
#	crates/draw/src/ui/transform/mod.rs
#	crates/draw/src/ui/transform/transform_box.rs
#	crates/draw/src/ui/transform/transform_box/stories.rs
#	crates/draw/src/ui/transform/transform_fields.rs
#	crates/draw/tests/it/brush_presets.rs
#	crates/draw/tests/it/main.rs
#	crates/draw/tests/it/transform_box.rs
#	crates/font-manager/src/axes.rs
#	crates/font-manager/src/picker.rs
#	crates/font-manager/src/picker/rows.rs
#	crates/font-manager/src/picker/stories.rs
#	crates/font-manager/tests/it/main.rs
#	crates/font-manager/tests/it/picker.rs
#	crates/host/src/files.rs
#	crates/i18n/src/lib.rs
#	crates/imaging/src/ui/layer_style/styles.rs
#	crates/keymap/src/keymap.rs
#	crates/keymap/src/matcher.rs
#	crates/layers/src/ui/filter/mod.rs
#	crates/layers/src/ui/filter/stories.rs
#	crates/layers/src/ui/mock.rs
#	crates/layers/src/ui/panel/mod.rs
#	crates/layers/src/ui/panel/stories.rs
#	crates/layers/src/ui/tree.rs
#	crates/layers/tests/it/panel_drag_menu.rs
#	crates/layers/tests/it/panel_filter.rs
#	crates/menu/src/bar.rs
#	crates/menu/src/driver.rs
#	crates/menu/src/model.rs
#	crates/menu/src/shortcuts/pages.rs
#	crates/menu/src/shortcuts/state.rs
#	crates/menu/src/shortcuts/stories.rs
#	crates/menu/src/shortcuts/view.rs
#	crates/menu/tests/it/main.rs
#	crates/menu/tests/it/native.rs
#	crates/menu/tests/it/shortcuts/mod.rs
#	crates/pages/src/ui/mod.rs
#	crates/pages/src/ui/view.rs
#	crates/platform/README.md
#	crates/platform/src/clipboard_tests.rs
#	crates/platform/src/open.rs
#	crates/print/src/ui/stories.rs
#	crates/text/src/ui/character.rs
#	crates/text/src/ui/character/stories.rs
#	crates/text/src/ui/find.rs
#	crates/text/src/ui/find/dialog.rs
#	crates/text/src/ui/find/stories.rs
#	crates/text/src/ui/ruler.rs
#	crates/text/src/ui/ruler/paint.rs
#	crates/text/src/ui/ruler/run.rs
#	crates/text/tests/it/main.rs
#	crates/text/tests/it/ruler.rs
#	crates/ui-canvas/src/canvas/mod.rs
#	crates/ui-canvas/src/canvas/tool.rs
#	crates/ui-canvas/src/canvas/tool_host.rs
#	crates/ui-canvas/src/canvas_controls/grid/mod.rs
#	crates/ui-canvas/src/canvas_controls/grid/stories.rs
#	crates/ui-canvas/src/canvas_controls/guides/stories.rs
#	crates/ui-canvas/src/canvas_controls/task_bar.rs
#	crates/ui-canvas/src/canvas_controls/task_bar/stories.rs
#	crates/ui-canvas/tests/it/canvas/navigate.rs
#	crates/ui-canvas/tests/it/canvas/rulers.rs
#	crates/ui-canvas/tests/it/canvas/tool.rs
#	crates/ui-canvas/tests/it/canvas_controls/grid.rs
#	crates/ui-contract/src/contract/body/presses.rs
#	crates/ui-contract/src/contract/items/drag.rs
#	crates/ui-contract/src/contract/items/hooks.rs
#	crates/ui-contract/src/contract/items/lead.rs
#	crates/ui-contract/src/contract/overlay/placement.rs
#	crates/ui-contract/src/contract/overlay/props.rs
#	crates/ui-contract/src/contract/overlay/ui.rs
#	crates/ui-contract/src/contract/steps/label.rs
#	crates/ui-contract/src/contract/text.rs
#	crates/ui-contract/src/contract/tooltip.rs
#	crates/ui-contract/src/layout/body.rs
#	crates/ui-contract/src/primitives/draw.rs
#	crates/ui-contract/src/primitives/icon.rs
#	crates/ui-contract/src/primitives/mod.rs
#	crates/ui-contract/src/primitives/textures/thumbnails.rs
#	crates/ui-contract/src/runtime/commands/board.rs
#	crates/ui-contract/src/runtime/commands/mod.rs
#	crates/ui-contract/src/runtime/drag.rs
#	crates/ui-contract/src/runtime/egui/input.rs
#	crates/ui-contract/src/runtime/egui/plugin.rs
#	crates/ui-contract/src/runtime/frame.rs
#	crates/ui-contract/src/runtime/keys.rs
#	crates/ui-contract/src/runtime/keys/input.rs
#	crates/ui-contract/src/runtime/keys/route.rs
#	crates/ui-contract/src/runtime/pointer.rs
#	crates/ui-contract/src/runtime/wheel.rs
#	crates/ui-contract/src/runtime/windows.rs
#	crates/ui-contract/src/runtime/windows/viewport.rs
#	crates/ui-contract/src/style/cx.rs
#	crates/ui-contract/src/style/span.rs
#	crates/ui-contract/src/testing/access.rs
#	crates/ui-contract/src/testing/icon_trials.rs
#	crates/ui-contract/tests/it/body/mod.rs
#	crates/ui-contract/tests/it/runtime/mod.rs
#	crates/ui-contract/tests/it/runtime/wheel.rs
#	crates/ui-contract/tests/it/runtime/windows.rs
#	crates/ui-contract/tests/it/text/editor.rs
#	crates/ui-gallery/src/mock/panels.rs
#	crates/ui-panels/src/dialog/mod.rs
#	crates/ui-panels/src/docking/group.rs
#	crates/ui-panels/src/rails/drawer/stories.rs
#	crates/ui-panels/src/rails/tool.rs
#	crates/ui-panels/src/rails/tool/stories.rs
#	crates/ui-panels/src/rails/tool/trials.rs
#	crates/ui-panels/src/sections/footer.rs
#	crates/ui-panels/tests/it/dialogs.rs
#	crates/ui-patterns/src/patterns/dock/hide.rs
#	crates/ui-patterns/src/patterns/dock/panes.rs
#	crates/ui-patterns/src/patterns/form_dialogs/dialog.rs
#	crates/ui-patterns/src/patterns/form_dialogs/dialog/stories.rs
#	crates/ui-patterns/src/patterns/form_dialogs/list_manager.rs
#	crates/ui-patterns/src/patterns/form_dialogs/list_manager/stories.rs
#	crates/ui-patterns/src/patterns/form_dialogs/mod.rs
#	crates/ui-patterns/src/patterns/form_dialogs/new_document.rs
#	crates/ui-patterns/src/patterns/form_dialogs/new_document/cards.rs
#	crates/ui-patterns/src/patterns/form_dialogs/new_document/details.rs
#	crates/ui-patterns/src/patterns/form_dialogs/param.rs
#	crates/ui-patterns/src/patterns/form_dialogs/pdf_export.rs
#	crates/ui-patterns/src/patterns/form_dialogs/pdf_export/stories.rs
#	crates/ui-patterns/src/patterns/form_dialogs/report.rs
#	crates/ui-patterns/src/patterns/form_dialogs/report/stories.rs
#	crates/ui-patterns/src/patterns/form_dialogs/rows.rs
#	crates/ui-patterns/src/patterns/form_dialogs/save_for_web.rs
#	crates/ui-patterns/src/patterns/form_dialogs/save_for_web/hosted.rs
#	crates/ui-patterns/src/patterns/form_dialogs/save_for_web/model.rs
#	crates/ui-patterns/src/patterns/form_dialogs/save_for_web/options.rs
#	crates/ui-patterns/src/patterns/form_dialogs/save_for_web/stories.rs
#	crates/ui-patterns/src/patterns/panels/palette.rs
#	crates/ui-patterns/src/patterns/panels/palette/stories.rs
#	crates/ui-patterns/src/patterns/preferences/document/model.rs
#	crates/ui-patterns/src/patterns/preferences/page.rs
#	crates/ui-patterns/src/patterns/preferences/window.rs
#	crates/ui-patterns/src/patterns/preferences/window/stories.rs
#	crates/ui-patterns/src/patterns/presets/browser.rs
#	crates/ui-patterns/src/patterns/presets/browser/stories.rs
#	crates/ui-patterns/src/patterns/presets/manager.rs
#	crates/ui-patterns/src/patterns/presets/mod.rs
#	crates/ui-patterns/src/patterns/presets/named.rs
#	crates/ui-patterns/src/patterns/presets/picker.rs
#	crates/ui-patterns/tests/it/docking/drop_session.rs
#	crates/ui-patterns/tests/it/docking/native.rs
#	crates/ui-patterns/tests/it/form_dialogs/hosted.rs
#	crates/ui-patterns/tests/it/form_dialogs/list_manager.rs
#	crates/ui-patterns/tests/it/form_dialogs/mod.rs
#	crates/ui-patterns/tests/it/form_dialogs/params.rs
#	crates/ui-patterns/tests/it/form_dialogs/save_for_web.rs
#	crates/ui-patterns/tests/it/panels/palette.rs
#	crates/ui-patterns/tests/it/presets/browser.rs
#	crates/ui-shell/src/shell/app_shell.rs
#	crates/ui-shell/src/shell/app_shell/stories.rs
#	crates/ui-shell/src/shell/mod.rs
#	crates/ui-shell/src/shell/start.rs
#	crates/ui-shell/src/shell/start/stories.rs
#	crates/ui-shell/tests/it/commands/mod.rs
#	crates/ui-shell/tests/it/shell/app_shell.rs
#	crates/ui-shell/tests/it/shell/mod.rs
#	crates/ui-widgets/src/bars/bar.rs
#	crates/ui-widgets/src/buttons/button.rs
#	crates/ui-widgets/src/buttons/face.rs
#	crates/ui-widgets/src/buttons/mod.rs
#	crates/ui-widgets/src/buttons/stories.rs
#	crates/ui-widgets/src/choice/mod.rs
#	crates/ui-widgets/src/choice/swatch.rs
#	crates/ui-widgets/src/choice/swatch/stories.rs
#	crates/ui-widgets/src/choice/swatch_table.rs
#	crates/ui-widgets/src/choice/swatch_table/stories.rs
#	crates/ui-widgets/src/display/text.rs
#	crates/ui-widgets/src/list/row.rs
#	crates/ui-widgets/src/list/row/paint.rs
#	crates/ui-widgets/src/list/stories.rs
#	crates/ui-widgets/src/list/view_stories.rs
#	crates/ui-widgets/src/menu/bar.rs
#	crates/ui-widgets/src/menu/item.rs
#	crates/ui-widgets/src/menu/search.rs
#	crates/ui-widgets/src/menu/stories.rs
#	crates/ui-widgets/src/pickers/mod.rs
#	crates/ui-widgets/src/pickers/reference_point.rs
#	crates/ui-widgets/src/pickers/reference_point/stories.rs
#	crates/ui-widgets/src/tabs/strip.rs
#	crates/ui-widgets/src/text/number.rs
#	crates/ui-widgets/src/text/number/stories.rs
#	crates/ui-widgets/src/tile_grid/grid.rs
#	crates/ui-widgets/tests/it/buttons.rs
#	crates/ui-widgets/tests/it/label/mod.rs
#	crates/ui-widgets/tests/it/label/tooltip.rs
#	crates/ui-widgets/tests/it/main.rs
#	crates/ui-widgets/tests/it/menu/bar.rs
#	crates/ui-widgets/tests/it/menu/mod.rs
#	crates/ui-widgets/tests/it/menu/rows.rs
#	crates/ui-widgets/tests/it/menu/search.rs
#	crates/ui-widgets/tests/it/pickers/select_list.rs
#	crates/ui-widgets/tests/it/text/mod.rs
2026-11-22 01:16:36 +07:00
bflatastic ee19084e8f keymap, kbd: use PressKind; restore DragRest; phosphor arrow-up/down as fill paths 2026-11-21 21:31:14 +07:00
bflatastic 743ed8e7f6 shortcuts-w3: net change of 1 commits
- shortcuts-w3: written from its sheet
2026-11-21 21:26:12 +07:00
bflatastic 5e06e0cace Contract stubs: refresh (i18n, keymap, behavior, font-catalog, platform, window, appkit, wayland, automation, dialogs, ui-contract, ui-widgets, ui-panels, ui-canvas, ui-patterns, color-ui, draw, pages, print, font-manager, text, layers, craft) 2026-11-21 19:03:27 +07:00
dotCooCoo 75e090b8a8 keymap: X11 global hotkeys keep each binding's grab and event id across layout changes
- A chord whose hotkey id a registered binding already uses on another key
  is refused as a duplicate, in register and replace.
- A Latin letter in the second group is grabbed only on a key that types no
  letter, digit or symbol in the first group; with US and French, Ctrl+A is
  refused instead of grabbing the US Q key.
- When the keyboard mapping cannot be read, unregister, clear and an empty
  replace keep the grabs for a later retry instead of releasing a key looked
  up in a mapping that may have changed; unregister returns the error.
- When the layout changes while grabs are released, the stuck grabs are
  tried once more in the new mapping, and a staying binding whose grab a
  release removed is grabbed again, or leaves the set when it cannot be.
2026-11-21 01:33:08 -08:00
dotCooCoo f92bdb1d1f keymap: global hotkeys keep up with keyboard layout changes
replace refuses every binding and leaves the set as it is when the X11
keyboard mapping cannot be read, so held chords keep working.

On X11 a removed chord whose key a layout change moved is released at
the key code it grabbed, through a hotkey that now leads there. A grab
no key leads to stays on a list that each later change retries, and its
hotkey is refused as Taken until then.

The core mapping is read as group 1, then group 2, then the AltGr
levels: with Russian and US, Ctrl+A grabs the key that types A, while
symbols outside group 1 levels 1 and 2 stay refused. A symbol the layout
types with Shift is bound as the keymap writes it (Ctrl+. on French
AZERTY grabs Ctrl+Shift), and Ctrl+Shift+. is refused.

On Windows the late release of a chord unregistered while held is
dropped, so it cannot end a newer hold of the same chord.
2026-11-21 00:49:09 -08:00
dotCooCoo d82d27bb93 keymap: Windows global hotkeys refuse Ctrl+Alt on keys AltGr types with
Windows reports AltGr as Ctrl+Alt, so a global Ctrl+Alt+E took the euro
sign from typing on German in every application. A Ctrl+Alt chord on a
letter, digit, symbol or Space key is now refused with the new
GlobalError::AltGr. The README lists the X11 and Windows refusals.
2026-11-21 00:02:23 -08:00
dotCooCoo ec1008eb53 keymap: X11 global hotkeys accept a level-2 symbol when the chord holds Shift
On French AZERTY . is Shift+; so Ctrl+Shift+. grabs that key with Shift.
A symbol at level 2 is now accepted when the chord holds Shift, and is
still refused without it.
2026-11-20 23:54:05 -08:00
dotCooCoo 1e69036098 keymap: X11 global hotkeys refuse AltGr-only keys and keys another binding grabs
global-hotkey's X11 backend grabs the first key code whose keysyms hold
the key's keysym. On German, Ctrl+[ therefore grabbed Ctrl+8, the key
that types [ with AltGr. A chord whose keysym that key types only at a
third or later level is now refused as Unbindable. Letters and digits
may be at level 2; other keys must be at level 1.

Two chords can also resolve to one key code and modifier set, such as
Ctrl+- and Ctrl+6 on French AZERTY. replace() and register() now refuse
the second one as Duplicate before it reaches the backend, so a failed
batch registration on X11 no longer unregisters the grab of a kept
binding while undoing the batch.
2026-11-20 23:48:26 -08:00
bflatastic 8bf05d8e46 Contract stubs: craft-i18n, craft-host, craft-theme, craft-keymap, craft-behavior, craft-platform, craft-window 2026-11-21 11:15:49 +07:00
dotCooCoo 750efe5d37 keymap: global hotkeys run commands while another application has the keyboard
The `global` feature adds `global::GlobalHotkeys`, which registers chords
with the operating system through the global-hotkey crate:
RegisterHotKey on Windows, a Carbon hotkey on macOS and a key grab on
the X11 root window on Linux and the BSDs. `poll` returns each press and
release with the command it runs, so a hold such as push-to-talk has a
matching release.

- `replace` leaves unchanged bindings registered, registers new ones
  in one request on X11 and reports each refused binding with its
  reason (taken by another application, a typing key without a
  modifier, a duplicate, more than 128).
- Wayland sessions, a missing X11 display, a stopped X11 key-grab
  thread and unsupported systems fail in `new` instead of accepting
  chords that never fire.
- Event queues are bounded; a dropped press goes with its release.
2026-11-20 15:38:41 -08:00
dotCooCoo c28c2d395f keymap: Mods::to_egui gives the modifiers an egui key event carries
Mods::from_egui reads egui's modifiers for a platform, but nothing went the
other way: Chord::to_egui_shortcut leaves mac_cmd unset, so it does not give
the Modifiers egui-winit reports for a key press on macOS. A test harness or
remote control that types a chord into egui had to fold the platform itself.

Mods::to_egui(platform) sets mac_cmd and command for cmd on macOS, and ctrl
and command for cmd or ctrl elsewhere. A test converts all 16 combinations
both ways on each platform and checks that a press built from a chord
matches that chord.
2026-11-20 10:32:12 -08:00
aiongg 47379d792c Chords, command refs and colours are plain data; the keymap generation is public 2026-11-20 18:16:52 +00:00
Martin Ball 576dcb3817 fw-rest: resolve the framework sync conflicts (up/next into area/ribbon-fw)
- Dialogs: ButtonPlace { Foot, Side, Body } beside the port's refusal notice and
  ChildDialog; every side_buttons caller (find, hyperlink, paragraph, list manager,
  form dialogs) takes button_place, keeping the port's held answers, close buttons
  and name check.
- Colour picker: upstream's fixed Full arrangement, CompareSwatch and warning module;
  the port's shown_model and tabbed Colors dialog kept (its buttons stand in the side
  column, the Full layout's in the picker's slot); the Compact layout shows the
  compare block beside its area when the host gives a compare colour; focus_on_open
  goes as upstream.
- Task bar: the grip is the bar's first member on one floating surface, for the task
  kind only; the selection kind and the close reason stay.
- Keymap: lookup_where's accept filter runs through upstream's winners().
- craft-gpu: upstream's provider-neutral crate, with the port's eframe start-up
  choices behind a startup feature (facade gpu-startup); duplicate facade row removed.
- Facade features, ATTRIBUTION, BMP density probe, margin story fit, theme icon-pack
  and dialog first-field trials: both sides kept; the clipboard presence code stays
  replaced by the port's offer modules.
2026-11-19 20:57:28 +00:00
Martin Ball 6dedbe4fe6 skeleton: merge up/next into area/ribbon-fw with conflict markers left in (land step 1) 2026-11-19 20:42:08 +00:00
Martin BallandClaude Opus 5.5 01dee65d91 fwstub-1: keymap rule 3 exception (lead ruling): with Shift held, a binding of the Shift-kept chord runs before the Shift-dropped one (German Ctrl+Shift+0 runs Ctrl+Shift+= Superscript, not Ctrl+= Subscript); recording, candidates and matches keep rule 3; layout docs; test
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 19:53:26 +00:00
Martin BallandClaude Opus 5.5 6f8bf4265a fwstub-1: a bound Alt chord's text is withheld only when a command bound to it is enabled (S-L177; Keymap::holders, commands::runs_now): a disabled one leaves the character typed, as Word's Option+Shift+- em dash; trial
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 19:48:07 +00:00
Martin BallandClaude Opus 5.5 eef70c8388 fwstub-1: a key press passes over a binding whose command is disabled where it lands (Keymap::lookup_where, Matcher::press_where; the key stage accepts enabled commands only), so the next binding of the chord runs; an app catalog replaces or drops a linked set's default chords (AppCatalog::replace_defaults) and sets the typing rule (AppCatalog::typing_rule); a bound Alt chord's withdrawn text is no text field's typing, so the field no longer holds the press (route::begin); trials
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-19 17:37:11 +00:00
Martin Ball 85dfb1ad83 ribbon-w5: net change of 4 commits
- ribbon-w5: finished by an agent
- ribbon-w5: finished by an agent
- ribbon-w5: review fixes (review-1)
- ribbon-w5: review fixes (review-1b)
2026-11-18 21:02:55 +00:00
aiongg 0392fc439d Commands: the gate answers each command once per frame
The board asked the app's gate again for every resolution: each reader
of a command, the measuring and the real run of each component, and the
re-resolution of every shown reader at the start of each pass. The gate
is a snapshot of what the app knew before the frame, so the board keeps
its answers for the frame and asks once per command. CommandRef::key_text
gives the key without allocating for a command without parameters; the
keymap's lookups and the board's answers use it.
2026-11-18 20:59:41 +00:00
aiongg 57ecf973e1 Keymap: shown chords from a table built when the bindings change
Keymap::shown_chord ran a lookup for each single-press binding of the
command, and Board::resolve calls it for every command it resolves, so
each frame repeated those lookups for every command row, tool and button.
The keymap works out each command's shown chord when it is built and
whenever its bindings change, and shown_chord reads the table. The lookup
and the table share one ranking (Keymap::winners), which replaces the
separate press_runs copy of it.
2026-11-18 20:43:24 +00:00
Martin Ball b21c69300c Contract stubs: craft-codepage craft-i18n craft-host craft-quit craft-theme craft-keymap craft-behavior craft-settings craft-platform 2026-11-18 08:01:14 +00:00
David Mann c78c49e2f7 Menus: collect the Help search's commands only while Help shows; shown chords without allocating
Two costs every frame paid, found in a profile of PhotoCraft on the
framework (storytold/photocraft#15493):

- `MenuBarUi::show` collected the Help search's entries (every row of
  every menu, with English labels) on every pass whenever the bar had a
  Help menu, open or not. `MenuHelp::built` takes a builder the bar runs
  only in a pass that shows the Help menu; `MenuHelp::new` keeps taking a
  ready list.
- `Keymap::shown_chord`, which every menu row, tooltip and button asks
  each pass, built the command's key string for every `find` and ran a
  full `lookup` per binding, cloning the winning commands only to look
  their keys up again. `find` now looks up a command without parameters
  by its id, and `press_runs` decides on catalog positions. Answers are
  unchanged; a new test covers tools sharing a chord (a cycle within a
  group, the first of two groups), which no test covered.

Measured in PhotoCraft (Windows 11, idle machine, three runs, together
with PhotoCraft's own storytold/photocraft#15496): UI pass with a pointer
over the canvas 8.7-11.3 ms -> 4.9-5.0 ms, during a menu hover
9.2-10.2 ms -> 6.7-7.1 ms.

Part of storytold/photocraft#15493.
2026-11-17 21:04:10 +01:00
aiongg 059d9b17d6 Tab after a press on a component toggles the panels in a canvas window: the focused stop keeps how focus reached it; focus_holds names a Tab that moves focus; typing lets only command chords and function keys fire 2026-11-17 08:03:41 +00:00
.CooCoo a50bf4a94c craft-ui: a combo box cut short shows its selected text in full on hover (#1207) 2026-11-16 21:37:09 -05:00
aiongg 2b8741d72c Shortcut import keeps only a command's main default key first, so a set's own main key and default alternates round-trip 2026-11-16 23:36:04 +00:00
aiongg cf3eee7427 Shortcut import keeps a command's default key first among the set's keys 2026-11-16 21:58:10 +00:00
aiongg bd254f1320 craft facade keeps its ai-agents feature; keymap docs name the kys depth limit, not a private constant 2026-11-16 20:15:00 +00:00
aiongg 63a4811416 cargo fmt 2026-11-16 14:34:57 +00:00
aiongg c9b63876a0 merge-fwb: FW8: .kys import reads with craft-xml's pull reader (DOCTYPE refused, depth 512, entry lines kept); roxmltree dropped 2026-11-16 12:42:57 +00:00
aiongg 4f5c57d86c tfix5-f10: a command shows a chord only where the keymap runs it (Keymap::shown_chord, holder); resolve, apply_keymap and the Mac layout read it; LayoutOptions::keys replaces extra_shortcuts 2026-11-16 00:34:11 +00:00
aiongg c8713d756a tfix3-f5: a tool command's key release fires it in the release phase (spring-loaded tools); framework tool pickers act on the press only 2026-11-15 18:58:20 +00:00