fix end key in terminal