Skip to content

chore(deps): update KeyboardShortcuts to 3.0.1 - #203

Merged
jsattler merged 1 commit into
mainfrom
chore/update-keyboardshortcuts-3.0.1
Aug 30, 2026
Merged

jsattler merged 1 commit into
mainfrom
chore/update-keyboardshortcuts-3.0.1

Conversation

@jsattler

Copy link
Copy Markdown
Owner

Updates KeyboardShortcuts from 2.4.0 to 3.0.1 (major).

Breaking changes in 3.0 — and why they don't affect us

Upstream made exactly two breaking changes:

  • Name#defaultShortcut renamed to Name#initialShortcut
  • the Name default: parameter renamed to initial:

This project uses neither. The full usage surface is:

  • BetterCapture/Model/KeyboardShortcutNames.swift:11-13 — plain Self("..."), no default: argument
  • BetterCapture/AppDelegate.swift:40,46,52KeyboardShortcuts.onKeyUp(for:)
  • BetterCapture/View/SettingsView.swift:45,49,50KeyboardShortcuts.Recorder(_:name:)

So this is a dependency-only change: no Swift source is modified.

Also worth noting

3.0 fixes two things relevant to a menu bar app:

  • NSMenuItem#setShortcut(for:) no longer overrides a hardcoded key equivalent when no global shortcut is set
  • a false menu item conflict when reassigning an existing shortcut

3.0.1 fixes a release-build crash with the Swift 6.3 compiler. We're on Swift 6.2 so we weren't hit by it, but it removes a landmine for the next toolchain bump.

Toolchain

3.0 ships as a swift-tools-version:6.2 package and enables defaultIsolation(MainActor.self), NonisolatedNonsendingByDefault and InferIsolatedConformances for its own target. It requires Xcode 26, which .github/workflows/pull-request.yml already pins (XCODE_VERSION: '26.0'). The app target itself still builds at SWIFT_VERSION = 5.0, and the new isolation defaults produced no diagnostics at our call sites.

Verification

  • xcodebuild build -configuration Debug — succeeded, no new warnings
  • xcodebuild build -configuration Release — succeeded (checked explicitly given the 3.0.1 release-codegen fix)
  • xcodebuild test — 144 tests in 11 suites passed
  • swiftlint lint — 14 warnings, identical to main

Recording and triggering the three global shortcuts should still get a manual smoke test before merge.

The 3.0 breaking changes rename 'Name#defaultShortcut' to
'initialShortcut' and the 'Name' 'default:' parameter to 'initial:'.
Neither is used here, so no source changes are required.

Raises the package requirement to upToNextMajorVersion(3.0.1).
KeyboardShortcuts 3.0 ships as a Swift 6.2 package using
defaultIsolation(MainActor.self), which Xcode 26 (already required by
the CI workflow) supports.
@jsattler jsattler self-assigned this Aug 30, 2026
@jsattler
jsattler merged commit 7b7d4c6 into main Aug 30, 2026
3 checks passed
@jsattler
jsattler deleted the chore/update-keyboardshortcuts-3.0.1 branch August 30, 2026 19:07
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