Sort of fixed keyboard speed issue, and also added variable speed