Major refactor of Character.keyHandler.