We split the history handling form the key handling. So we could handle the direction key even if the history is disabled. As a "side effect", I also remove the unnecessary "use_history" bit.