Prevent keys captured by script from being used as menu shortcuts
Code tidy
Merge pull request #3671 from ctrlaltdavid/20107

CR for Job #20107 - Keys p and h and some control keys wont override