Design a keyboard and mouse input system | Amazon Interview Question