Fixing keystrokes-related failing tests on Mac OS

This PR fixes 2 failing tests on Mac OS, due to different keystrokes on this operating system.