Unable to use hardware keyboard in Xcode 12 live previews

I am unable to use the hardware keyboard to enter text in text fields when using Xcode 12 live previews.

Same issue with all preview devices. Running on macOS 10.15.5.

Is there an option I am missing or a workaround for this?

Code Block
import SwiftUI
struct ContentView: View {
@State private var text = ""
var body: some View {
Form {
TextField("Write something", text: $text)
}
}
}
struct ContentView_Previews: PreviewProvider {
static var previews: some View {
ContentView()
}
}

Answered by Developer Tools Engineer in 617822022
Howdy,

I am sorry to hear you are having issues using Xcode Previews. You have run in to a known issue that we hope to address in future release. The only known workaround is to use an on-device preview instead of the live version in the canvas.
Accepted Answer
Howdy,

I am sorry to hear you are having issues using Xcode Previews. You have run in to a known issue that we hope to address in future release. The only known workaround is to use an on-device preview instead of the live version in the canvas.
Keyboard input in Xcode Previews works again as of Xcode 12 Beta 2!

Hey, just got the exact same issue with xcode 13.2 live preview on iMac running macOS 12.1.

Can't find similar issues reported on the forums. Am I the only one getting this issue ? Is there a known fix or workaround ?

I am on Xcode Version 13.2.1 (13C100) and I am not able to use my hardware keyboard to input into the SwiftUI preview forms in the live version of the canvas. If I run the iOS Simulator I can use my physical keyboard without issue. Is this a known issue again, or something that I need to do on my end to make it work?

I have the same problem in Xcode Version 13.2.1 (13C100), i have trying many ways but non results .

It's a known bug, hope Apple will fix it soon ...

Unable to use hardware keyboard in Xcode 12 live previews
 
 
Q