keyboard management moved to separate file