Commit Graph
61 Commits
Author SHA1 Message Date
aiongg 332a4456dd Merge #186: keymap: Keyboard Shortcuts dialog, named shortcut sets and the shortcut editor
# Conflicts:
#	crates/keymap/src/lib.rs
2026-10-24 02:29:57 +00:00
aiongg 135981286f keymap: a layout switch forgets what letter positions typed, and Layout::forget_letters does so on request 2026-10-23 08:03:27 +00:00
aiongg 5050d5dead Merge remote-tracking branch 'ao/craft-keymap' into keymap-layout-rule 2026-10-23 08:02:46 +00:00
aiongg 0ccb6a9304 keymap: ForeignSet is non_exhaustive and built with ForeignSet::new, with_name and with_truncated 2026-10-23 07:19:55 +00:00
aiongg b43a39df65 keymap ui: the failed-change test sets the import's truncated count 2026-10-21 18:14:58 +00:00
aiongg 3c8c3309a0 Merge branch 'craft-keymap' into keymap-ui 2026-10-21 18:14:23 +00:00
aiongg 8ce872938f keymap: a failed import change keeps its shortcuts when a later change frees room
The cleanup after an import could remove a chord from a command whose own change had failed, once a later change freed an overrides entry. That command now keeps its bindings, and the change that would have taken its chord is dropped and reported, as when the removal itself fails.
2026-10-21 18:14:21 +00:00
aiongg 315af428c7 keymap: a key whose Latin layout character is no letter runs no letter binding
The suite's egui reports, per key pressed, the character it types on the
Latin layout shortcuts follow (InputState::latin_layout_char). A letter
makes the press that letter; any other character means the key has no
Latin letter, so egui's position fallback no longer turns it into one: on
Dvorak + Russian the key that types й is Dvorak's ', not Ctrl+Q. Without a
report (crates.io egui) the key's position still decides.
2026-10-21 18:05:18 +00:00
aiongg cec769a889 keymap: on layouts that are not Latin, take the letter the toolkit reports
The suite's egui-winit reports a letter key on a layout that is not Latin
as the Latin layout's letter, so on Dvorak + Russian the с key is
Dvorak's J. resolve takes that letter before the key's position; with
crates.io egui the letter is the position, as before.
2026-10-21 17:23:16 +00:00
aiongg 1a0e7e7bbf keymap: learn nothing from presses while right Alt is held
egui-winit reports AltGr with neither Ctrl nor Alt, so AltGr text read as plain
typing: German AltGr+M (µ) marked the layout as not Latin and Ctrl+Z resolved
by position as Ctrl+Y. µ, ª and º no longer count as a sign of another script.
2026-10-21 06:08:30 +00:00
aiongg 9c75eda598 keymap: block the position fallback only at positions seen typing something else
AZERTY's Ctrl+Shift+E works before an e has been typed.
2026-10-21 05:49:41 +00:00
aiongg d0acf36588 keymap: Shift presses egui reports as their position run nothing on moved layouts
Dvorak's ⇧, types <, which egui has no key for, so egui reports the
press as W and Ctrl+Shift+, ran Ctrl+Shift+W. Once typing shows the
layout's letters are not on QWERTY positions, such a press resolves to
nothing unless the position is known to type its own letter.
2026-10-21 05:47:51 +00:00
aiongg 86248331bb keymap: read presses by the keyboard layout
Matching, the recorder and labels share one rule (craft-libs#198, track 4):
letters by the layout's Latin letter, or by position on layouts that are not
Latin; digits as typed, else by position; punctuation as typed, without the
Shift the layout needs for it. Layout holds whether the layout is Latin and
its characters at punctuation positions, reported by the platform or learned
from typing. KeyInput holds what the toolkit reports for one press, so a
toolkit that knows the virtual-key code, the macOS command table or the
Shift level can pass it on.
2026-10-21 04:57:06 +00:00
aiongg f9a65e813f keymap ui: the chip-click test uses the node's rect as is 2026-10-20 21:42:25 +00:00
aiongg 5a8f119a70 keymap ui: test that one pointer click on another row's chip records 2026-10-20 21:30:40 +00:00
aiongg a03f6ab0c3 keymap ui: app errors in the dialog, and the reader's dropped entries
DialogState::show_error shows an app's message under the table until the
user dismisses it (a new Dismiss button on every message) or the next
action replaces it. ForeignSet::truncated carries the entries the app's
reader dropped; plan counts them in ImportReport::truncated, which the
import review shows.
2026-10-20 21:05:56 +00:00
aiongg 636fc8b850 keymap: import-only paths on Bindable
Bindable::import_paths (with_import_path) are read by import matching
like menu paths, and make no areas or groups in the dialog, so a tool's
["Tools", label] path no longer shows a Tools Menu entry.
2026-10-20 20:59:43 +00:00
aiongg d9b1a89950 Merge branch 'craft-keymap' into keymap-ui
# Conflicts:
#	.github/workflows/keymap.yml
#	crates/keymap/README.md
#	crates/keymap/src/egui.rs
2026-10-20 16:01:22 +00:00
aiongg b778a764af keymap: format the profiles test 2026-10-20 15:52:45 +00:00
aiongg f501cae73b keymap: settle the public API before release
Outcome, ConflictMode, ProfileError and Options are non_exhaustive, with Options::with for
options built in one expression. Profiles keeps its fields private behind active() and sets(),
lists the sets loading dropped in problems(), and stores a format version (a store without one
reads as version 1).
2026-10-20 15:49:51 +00:00
aiongg 60daca3770 keymap: name the selected row to screen readers, announce conflicts and messages, and make group headers and key caps Tab stops 2026-10-20 15:46:56 +00:00
aiongg 9aaf9dfd38 keymap: format, and keep the dispatcher's Default clear of clippy's derive lint 2026-10-20 15:46:00 +00:00
aiongg 6d96b4f684 keymap: mark public enums and report structs that will grow non_exhaustive 2026-10-20 15:29:50 +00:00
aiongg ad79cbcf31 keymap: translate shortcut parse errors and give translators whole sentences with placeholders 2026-10-20 15:29:42 +00:00
aiongg 501e2cf1fc keymap: while typing, text-editing chords go to the text field unless an active context binds them 2026-10-20 15:21:54 +00:00
aiongg 423524c1bc keymap: clipboard chords with more modifiers run their bindings with clipboard events off 2026-10-20 15:18:05 +00:00
aiongg 5160611bad keymap: while typing, a Ctrl+Alt press runs unless it typed text in the frame 2026-10-20 15:11:46 +00:00
aiongg fd2386b2ba keymap: hold the set row, table and edit actions while a prompt or the import review is open
Switching sets closes an open prompt, deleting a set reloads only when it was the active one, and
deleting the last set with no built-ins loads no overrides.
2026-10-20 15:10:58 +00:00
aiongg f4b04e4ad1 keymap: a double press needs both presses in the same panel 2026-10-20 15:09:01 +00:00
aiongg 0039a5c866 keymap: report Changed after a Cancel that undid edits, so apps rebuild their menus 2026-10-20 15:08:46 +00:00
aiongg 056a709d0f keymap: refuse scope names with outer whitespace, which binding text trims 2026-10-20 15:08:43 +00:00
aiongg 2abdcd53ab keymap: give Tab back to focus navigation after the New Shortcut field or Search by key records 2026-10-20 15:07:36 +00:00
aiongg 29ee24ab51 Merge branch 'craft-keymap' into keymap-ui 2026-10-20 06:32:28 +00:00
aiongg 9b0182a3e0 keymap: a held web clipboard key with repeats off leaves its clipboard events in place 2026-10-20 04:18:35 +00:00
aiongg 4674ab7c85 keymap: use US spelling in the shortcuts dialog 2026-10-20 03:28:24 +00:00
aiongg cf9e10a90a Merge branch 'craft-keymap' into keymap-ui
# Conflicts:
#	crates/keymap/README.md
#	crates/keymap/src/lib.rs
2026-10-20 03:26:15 +00:00
aiongg 890660444c keymap: use US spelling 2026-10-20 03:24:56 +00:00
aiongg 5e29e70b46 Merge branch 'craft-keymap' into keymap-ui
# Conflicts:
#	crates/keymap/src/egui.rs
2026-10-20 02:42:51 +00:00
aiongg 75a42cb95f keymap: an import change that cannot take a chord from another command leaves both commands as they were 2026-10-20 02:41:01 +00:00
aiongg 1b329b9422 keymap: a web clipboard press takes its clipboard event and the pasted text with it 2026-10-20 02:39:41 +00:00
aiongg 488db9e3df Merge branch 'craft-keymap' into keymap-ui 2026-10-20 00:49:07 +00:00
aiongg 3ef24a785b keymap: egui::platform gives the browser's operating system on the web 2026-10-20 00:49:05 +00:00
aiongg baaf3061b0 keymap: run the pseudo-locale dialog test once per direction, each at one width 2026-10-19 21:40:29 +00:00
aiongg d0c8d3d0c7 Merge branch 'craft-keymap' into keymap-ui
# Conflicts:
#	crates/keymap/README.md
#	crates/keymap/src/lib.rs
2026-10-19 21:40:28 +00:00
aiongg c519b7a856 keymap: split crowded_chords_stay_fast into a small cap test and an ignored worst-case timing test 2026-10-19 21:37:38 +00:00
aiongg 0b34fdb152 keymap: split the hostile import test into a fast cap test and an ignored worst-case timing test 2026-10-19 21:35:24 +00:00
aiongg 093238b065 keymap: rename refuses a name another set holds in a different case 2026-10-19 13:14:15 +00:00
aiongg d67d96e9bb keymap: shortcuts dialog right-to-left layout, long-label truncation, pseudo-locale test and README 2026-10-19 12:03:23 +00:00
aiongg 94eacba872 keymap: on-screen keyboard pane, fixed-row labels and read-only mode
The keyboard pane (Options::keyboard) draws a US ANSI layout under the
table and detail pane, coloured by who holds each key with the toggled
and held modifiers, lists the clicked key's shortcuts and assigns key and
modifiers to the selected command. Fixed rows always report a label, with
"Now used by" when a command took their key. A read-only dialog has no
set row, keeps Summarize in the footer and closes with shortcuts.close.
2026-10-19 12:03:23 +00:00
aiongg d2b9f91838 keymap: shortcuts dialog sets, import review and summary
Set row with picker, New Set (based on current shortcuts or a set),
Rename, Delete, Save, Revert Set, Export, Import and Summarize; actions
that do not fit go into a More menu. The foreign import review lists
what will change, suggestions to pick, unmatched, unreadable,
approximated and matched-without-change entries, then the report of
skipped, taken and failed changes with Copy Report. ui::summary writes
the shortcut summary as HTML and plain text.
2026-10-19 12:03:23 +00:00