fix #1282 fixing keystrokes-related failing tests on Mac OS

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