在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):soffes/HotKey开源软件地址(OpenSource Url):https://github.com/soffes/HotKey开源编程语言(OpenSource Language):Swift 98.0%开源软件介绍(OpenSource Introduction):HotKeySimple global shortcuts in macOS. HotKey wraps the Carbon APIs for dealing with global hot keys to make it easy to use in Swift. HotKey, along with Color, were created for use in Contrast, a macOS app for checking designs for accessible color combinations. InstallationCarthageFor installation with Carthage, simply add the following to your github "soffes/HotKey" Swift Package ManagerFor installation with Swift Package Manager, simply add the following to your .package(url: "https://github.com/soffes/HotKey", from: "0.1.2") CocoaPodsFor installation with CocoaPods, simply add the following to your pod 'HotKey' UsageSimply initialize a // Setup hot key for ⌥⌘R
let hotKey = HotKey(key: .r, modifiers: [.command, .option]) This is a convenice initializer that creates a Now you can set the hotKey.keyDownHandler = {
print("Pressed at \(Date())")
} You can also implement You don’t need to think about when handlers are registered and unregistered. This all happens automatically based on the ThanksHotKey was heavily inspired by PTHotKey. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论