refactored input into simple polling interface for keyboard manager