minor addition to keyboard handler code (no functionality change)