Respond to key events like tab and return in SwiftUI on the Mac

I have a view with multiple text fields, like this:

Code Block
struct ContentView2: View {
    @State var text1 = ""
    @State var text2 = ""
    var body: some View {
        VStack {
            TextField("", text: $text1)
            TextField("", text: $text2)
        }
    }
}


When running on the Mac, the tab, enter, and arrow keys each perform actions to navigate in/among the fields.

I would like these keys to be ignored by the TextField and instead trigger my own functions. Is this possible in SwiftUI?