You can pull off the key and/or put something under it, or tape over the contact (if it's a membrane keyboard and you don't mind opening it up).
How to lock laptop keyboard is a useful skill for anyone who wants to prevent accidental key presses, protect their work, or keep ...