Added hack for single-key shortcuts on Mac

Single-key shortcuts don't work as expected on Mac. See this explanation:

http://thebreakfastpost.com/2014/06/03/single-key-menu-shortcuts-with-qt5-on-osx/

To fix the problem, a hack introduced in that article is implemented.