updates plug with all sorts of awesome improvements
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user