Skip to content

feat: add Ctrl+V shortcut for FileMaker paste#191

Merged
fuzzzerd merged 1 commit intomasterfrom
fuzzz/global-ctrl-v-paste
Apr 23, 2026
Merged

feat: add Ctrl+V shortcut for FileMaker paste#191
fuzzzerd merged 1 commit intomasterfrom
fuzzz/global-ctrl-v-paste

Conversation

@fuzzzerd
Copy link
Copy Markdown
Owner

Summary

The Edit menu has long advertised Ctrl+V for "Paste from FileMaker" via InputGesture, but no actual KeyBinding existed, so the shortcut didn't fire. Bind it at the Window level. Avalonia processes the focused control's KeyDown first and only routes to the Window's KeyBindings when the event is unhandled — so text inputs (TextBox, AvaloniaEdit TextEditor) keep their normal Ctrl+V text-paste, and the shortcut only fires when focus is outside an editable field.

PasteFileMakerClipData already gracefully no-ops with a "No FileMaker clips found on clipboard" status when the clipboard contains no Mac-* formats, so misfires are harmless.

Also auto-select the most recently pasted clip so the editor opens to it and the list scrolls to it (Avalonia's ListBox.AutoScrollToSelectedItem is on by default). Before this, a successful paste appended the clip to the bottom of the list with no visual confirmation.

MockClipboardService.GetFormatsAsync was hardcoded to return Array.Empty<string>(), which made paste-related tests impossible. Now it surfaces the keys held in ClipboardData — small change that unblocks the new test.

Bind Ctrl+V at the Window level to PasteFileMakerClipData. Avalonia
processes the focused control's KeyDown first and only routes to the
Window's KeyBindings when the event is unhandled, so text inputs
(TextBox, AvaloniaEdit) keep their normal text-paste behavior and the
shortcut only fires when focus is outside an editable field.

After paste, select the most recently added clip so the editor opens to
it and the list scrolls to it (ListBox.AutoScrollToSelectedItem). Without
this, a successful paste sent the clip to the bottom of the list with no
visual confirmation.

Improve MockClipboardService.GetFormatsAsync to surface the keys it
holds, which unblocks paste-related tests.
@fuzzzerd fuzzzerd force-pushed the fuzzz/global-ctrl-v-paste branch from 8bf69f4 to 2e1e59c Compare April 23, 2026 23:34
@fuzzzerd fuzzzerd enabled auto-merge (rebase) April 23, 2026 23:34
@github-actions
Copy link
Copy Markdown

Test Results

✔️ Tests 1156 / 1156 - passed in 11.4s
✔️ Coverage 78.15% - passed with 70% threshold
📏 13119 / 15331 lines covered 🌿 4514 / 7231 branches covered
🔍 click here for more details

✏️ updated for commit 2e1e59c

@fuzzzerd fuzzzerd merged commit 308d7b5 into master Apr 23, 2026
6 checks passed
@fuzzzerd fuzzzerd deleted the fuzzz/global-ctrl-v-paste branch April 23, 2026 23:38
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.

1 participant