在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):Clipy/KeyHolder开源软件地址(OpenSource Url):https://github.com/Clipy/KeyHolder开源编程语言(OpenSource Language):Swift 93.7%开源软件介绍(OpenSource Introduction):KeyHolderRecord shortcuts in macOS, like Alfred App. UsageCocoaPods
Carthage
ExampleSet default key combo. let recordView = RecordView(frame: CGRect.zero)
recordView.tintColor = NSColor(red: 0.164, green: 0.517, blue: 0.823, alpha: 1)
let keyCombo = KeyCombo(doubledModifiers: .command)
recordView.keyCombo = keyCombo Some delegate methods func recordViewShouldBeginRecording(_ recordView: RecordView) -> Bool
func recordView(_ recordView: RecordView, canRecordShortcut keyCombo: KeyCombo) -> Bool
func recordView(_ recordView: RecordView, didChangeKeyCombo keyCombo: KeyCombo?)
func recordViewDidEndRecording(_ recordView: RecordView) Or you can use closures. let recordView = RecordView(frame: CGRect.zero)
recordView.didChange = { keyCombo in
guard let keyCombo = keyCombo else { return } // Clear shortcut
// Changed new shortcut
} DependenciesThe source code is dependent on hotkey library. How to Build
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论