updates plug with all sorts of awesome improvements

This commit is contained in:
2026-11-09 13:09:09 +01:00
parent a92d6f8871
commit 3afdb6d67f
553 changed files with 22780 additions and 13155 deletions
+2 -2
View File
@@ -1,7 +1,7 @@
import AppKit
import Carbon.HIToolbox
/// The system-wide ⌘P that shows or hides Plak from any app; no Accessibility permission needed.
/// The system-wide ⌘N that shows or hides Plak from any app; no Accessibility permission needed.
final class GlobalShortcut {
private let onPress: @MainActor () -> Void
private var hotKey: EventHotKeyRef?
@@ -18,7 +18,7 @@ final class GlobalShortcut {
return noErr
}, 1, &pressed, Unmanaged.passUnretained(self).toOpaque(), &handler)
let id = EventHotKeyID(signature: OSType(0x506C_616B), id: 1)
RegisterEventHotKey(UInt32(kVK_ANSI_P), UInt32(cmdKey), id, GetApplicationEventTarget(), 0, &hotKey)
RegisterEventHotKey(UInt32(kVK_ANSI_N), UInt32(cmdKey), id, GetApplicationEventTarget(), 0, &hotKey)
}
deinit {