Refactored keyboard and mouse control into a component and system