One simple way to avoid that is by using an anti-static mat, which helps discharge built-up electricity before it becomes a problem.
A flat surface that a keyboard or other electronic device can rest on or a person can stand on in order to discharge static electricity. The mat is either grounded or treated in such a manner that ...