added functions for home and end key