In Ubuntu 18.04 and higher, Gnome’s built-in screen keyboard can be enabled via universal access menu.
However, it only triggers automatically in Gnome Activities and Application menu, nowhere else. See the bug. Though it’s marked as fixed, I still have the problem in my laptop.
For those have the same issue, you can install the previous Ubuntu 16.04’s default
onboard screen keyboard utility in Ubuntu 18.04 as a workaround.
Open Ubuntu Software, search for and install
onboard as well as onboard settings.
Once installed, launch the utility from Gnome application menu.
In onboard settings, set up auto-show, layout, theme, etc and enjoy!