Implement bounding box for mouse and keyboard