modified keyboard to make it smoother