Fixed single-key shortcuts on Mac

Single-key shortcuts in Qt do not work on Mac, as described here:

http://thebreakfastpost.com/2014/06/03/single-key-menu-shortcuts-with-qt5-on-osx/

A fix is described in the same article, which has been implemented here.