Repository navigation
fix: let ⌘V, ⌘C, ⌘X and ⌘A work in Settings text fields - #261
Merged
Merged
Conversation
StableBar is an accessory app with no main menu, and AppKit sends these shortcuts to text fields only through the main menu's key equivalents. Give the app a hidden Edit menu with Cut, Copy, Paste and Select All. ⌘Z stays with the Undo and Redo buttons in Settings. Closes #258
|
🎉 This PR is included in version 0.7.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This was referenced Nov 16, 2026
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.
Problem
⌘V, ⌘C, ⌘X and ⌘A do nothing in Settings text fields, so a token can't be pasted into Packages → Sources… → Add source…; only right-click → Paste works. StableBar is an accessory app with no main menu, and AppKit routes these shortcuts to text fields only through the main menu's key equivalents. Closes #258.
Changes
EditMenu.swiftbuilds a main menu with one Edit menu: Cut (⌘X), Copy (⌘C), Paste (⌘V) and Select All (⌘A), each sent to the first responder. An accessory app never shows its menu bar, so nothing visible changes.StableBarApp.swift:applicationDidFinishLaunchinginstalls it asNSApp.mainMenu.No configuration properties change, so decoding, layers, editing, docs and examples don't apply.
Testing
swift test --filter "editMenu|ThemeTrial|BarEditing": the neweditMenuGivesTextFieldsTheClipboardShortcutstest checks that the menu maps exactly ⌘X, ⌘C, ⌘V and ⌘A tocut:,copy:,paste:andselectAll:and leaves ⌘Z free. The XCTest suites that createAppDelegatepass (66 tests).Merging
One commit; any merge method works.
Claude Opus 5.5 via Claude Code