You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Not author, but you can use the code in an init() of a view (or app) directly, just make sure, as was pointed in another issue, to make the hotkey reference a class variable.
Looks like this in the App :
struct MyApp: App {
let hotKey: HotKey
init() {
// Setup hot key for ⌥⌘R
hotKey = HotKey(key: .r, modifiers: [.command, .option])
hotKey.keyDownHandler = {
print("Pressed at \(Date())")
}
}
...
}
Do you plan to support SwiftUI (or even extend the documentation, how to integrate into SwiftUI)?
The text was updated successfully, but these errors were encountered: