Are you talking about physically locking your keyboard? There are hard plastic covers that you can buy, but that is going a little overboard...
If you can use the lock command or logout if it is a telnet session which might be even better than lock.
I don't really understand you need to restrict physical access. Even I am not that paranoid!