If you want to clean a spill without shutting down the pc, then you can simply disable the keyboard mouse button to avoid false clicks, keypress etc.
Sometimes you may want to restrict children or toddlers from touching your mouse, keyboard or sensitive touchpad and do something wrong while you’re away.
Softwares to Lock Keyboard, Mouse on Shortcut Keypress
# Toddler Keys (link) : It is a useful tool for parents that allows you to lock your computer keyboard, CD drive doors and power-off button.
When the keyboard is used it will display images and play sounds every time a key is pressed, thereby preventing access to the desktop and applications, while adding some entertainment value for the kid.
You can select the images and sounds to be used by copying them to the Toddler Keys folder. To exit the locked screen, just type the word QUIT.
# Child Proof (link) : Child Proof is a program that protect your computer from children by accident pressing wrong buttons or key.
It hides all windows, the toolbar at the bottom and the desktop and replaces it by a toolbar with programs you allow your child to execute.This avoids most problems when small children use the your PC.
Lock User Screen in Windows
If you have a passwords protected user account in windows then press [windows key] + L takes you to the welcome login screen.
The mouse or keyboard hardly have any uses. You can even remove shut down option at welcome screen.