Open joehinkle11 opened 3 years ago
I think what you’re asking for is to allow keyboard control when an app uses SwiftUI as easily as KeyboardKit gives you when using UIKit. There would be two main parts needed for this:
UIKeyCommand
s. This needs two-way communication with the SwiftUI code to determine when key events are possible and to handle those events. The idea of exposing key command globally from one place is perfectly fine because that’s how the Mac menu bar works. You just need to be extra mindful of filtering commands correctly in canPerformAction
.List
, Form
, NavigationView
, stacks etc.Since it’s mostly just me working on KeyboardKit at the moment I have to pick where I spend my time. Realistically I don’t see myself reimplementing functionality in SwiftUI any time soon, but I’m very open to contributions in this area.
I know this is out there, but it would be really neat if it were possible to accomplish this with a SwiftUI modifier