This question can be found a couple of times on the Internet, but the solutions aren't satisfactory.
I have a laptop with touchscreen, and whenever I use the touch screen the on screen keyboard pops up, despite the fact that the laptop has a built in keyboard and I have an external keyboard connected as well. So the only situation I would want this to show up is when I'm using the computer in tablet mode with no external keyboard connected. I guess there'd be a script for that, but in the meantime I'd rather just get rid of it altogether or have it show up only on demand. There is a button for that in the Universal access menu - but even when it's off, the keyboard pops up when I start using the touch screen. When the option is on, the keyboard is permanently present.
I still haven't figured out for sure which application it is - it appears to be caribou. The most common suggestion I could find is to just un-install it. Unfortunately that removes task-gnome-desktop, which I'd like to keep. Another suggestion is to just rename the executable or make it an empty file. Unfortunately that doesn't remove the keyboard, possibly it isn't caribou after all.
So, does anyone know how I permanently disable the on-screen keyboard or make it appear only in the scenarios that I have described?
It doesn't even obey my layout settings.