Skip to content

Commit

Permalink
fix key recorder on macOS 15 arm
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj committed Sep 18, 2024
1 parent 46dc98b commit 0a6ddc3
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/config/keyrecorder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ struct RecordingOverlay: NSViewRepresentable {
func makeNSView(context: Context) -> NSView {
let view = KeyCaptureView()
view.coordinator = context.coordinator
// Not sure why macOS 15 arm needs this but x86 doesn't.
DispatchQueue.main.async {
view.window?.makeFirstResponder(view)
}
return view
}

Expand Down

0 comments on commit 0a6ddc3

Please sign in to comment.