How do I control a SwiftUI TextField with a game controller?

I've coded a text-adventure game in SwiftUI. (My game has no graphics or sound effects.)

My app already supports keyboard navigation; I would like to add support for game controllers on iPhone. I can't figure out how to do it. I especially can't see any way to allow controller users to enter text in a TextField.

I've read https://developer.apple.com/documentation/gamecontroller/supporting-game-controllers and it's all about button events. There's no reference to SwiftUI at all in that documentation, or any input-method editing at all. The only mention of "keyboard" is about treating the keyboard itself as if it were a game controller providing button events.

How do I implement this?

How do I control a SwiftUI TextField with a game controller?
 
 
Q