I write a lot of blog posts and record a fair number of introductions and tutorials.
Recently, I discovered a tool that makes this super easy to do in Ubuntu: it’s called Screenkey.
I stumbled upon it while reading this blog post, which points to a Spanish Linux blog called Atareao.
Normally, you would have to build it from source following the instructions on the Screenkey GitHub page, but if you’re an Ubuntu user, you’re in luck: the folks at Atareao have already created a PPA package repository with a nicely bundled copy of Screenkey that even includes a system tray icon that works in recent versions of Ubuntu (I tested on 22.04).
Simply install with:
sudo add-apt-repository ppa:atareao/atareao
sudo apt install screenkey
And you’re done! Start it like you would any other Ubuntu app: by opening up the applications menu and searching for “screen”. It should come right up. Stop it using the tray icon in the upper right-hand corner of your desktop (seeing all your key presses can be quite annoying when you’re writing an email).