I am actually kind of ok with the long-press idea, as there are very few apps I use that don’t handle hiding/showing the OSK properly. Those apps are generally either Chromium/Electron based apps, or Qt based apps like PureMaps.
Pretty much everything else, I wouldn’t even need to bother with the long-press much.
I am more likely to accidentally bump the OSK button with my thumb, the way it is now.
Of course though, exposing this as a setting, even if only a gsetting
option, would be a good move.