Cat owners know that these creatures constantly try to jump on the table and send some inappropriate message in the work chat. Some laptop models even have a special keyboard lock button. But you can also use a software solution.
CatLock is a free, open-source utility that allows you to lock the keyboard with a hotkey press.

The utility itself doesn't have many settings: you can enable and disable notifications and adjust the dimming level.
Speaking of which, when you press Ctrl+L, the monitor screen will dim, and the keyboard will be locked. The only way to unlock it is by pressing a mouse button.