I'm having difficulty getting the soft keyboard to automatically show up in a Kotlin Multiplatform with Compose Desktop app on a Windows 10 device set in tablet mode on a Pipo touch screen computer. I can't tell yet if this is a Windows 10 settings problem or a problem in my development.
Here is one of the TextField components. What's wanted is when the user clicks on it, the keyboard pulls up.
var stationName by remember { mutableStateOf(TextFieldValue("")) }
TextField(
label = { Text("Enter Computer Station name") },
value = stationName,
singleLine = true,
onValueChange = { stationName = it }
)
I checked some resources to see if I have the right Windows 10 settings. This includes going to Settings -> Devices -> Typing -> "Automatically show the touch keyboard in windowed apps when there's no keyboard attached to your device" set to Yes.
Any advice to resolve this?
What worked is that I used this solution as suggested following the link from @PhilDukhov.
For posterity, in Kotlin it came out to: