Show keyboard on button action

How to show the keyboard for textfield on ToolbarItem(placement: .keyboard)?

I have a button and it's action I want is to show the keyboard. On top of which is

ToolbarItem(placement: .keyboard) {
HStack{
Button(...)
TextField("", text: $bindingText)
                                .textFieldStyle(RoundedBorderTextFieldStyle())
                                .keyboardType(.numberPad)
                                .multilineTextAlignment(.trailing)
 } 
}

I know keyboard shows with a textfield focused. How though to show the keyboard for ToolbarItem(placement: .keyboard) Textfield if can't show it without showing the keyboard?

Replies

How about using isFocused modifier?

[https://developer.apple.com/documentation/swiftui/environmentvalues/isfocused)

I have tried but as the visw isn’t yet in view setting its focus state remains false.