Added sorting so that platform specific keys will get added first
Use Array.some instead of forEach
Minor cleanup
Changed sorting logic base on feedback
Merge pull request #4305 from WebsiteDeveloper/Issue-4265

Fix for Issue 4265: Mac: KeyBindingManager displays errant error message