Refactored logic. Able to press two keys now.