I recently got a laptop with a touchscreen, and I'm running Ubuntu 19.10. The on-screen keyboard comes up when I focus a textbox with the touchscreen, and I usually don't want it to. However, this laptop (a Lenovo Yoga) can be folded back to turn into a tablet, and in those cases I do want the OSK's auto-show behavior.
I'd like to write a script to toggle the auto-show behavior on and off. The Block Caribou GNOME extension comes up a lot in these discussions, but it doesn't fit my use-case because it's not something I can turn on and off from a script (and even if I could it's a bit rube-goldbergy).
Is there some sort of command I can run to toggle the auto-show behavior? Note that I don't want a command that shows/hides the OSK, I want to enable/disable the auto-show behavior.