clear functions for keyboard switching