tyrasd / overpass-turbo

A web based data mining tool for OpenStreetMap using the Overpass API.
https://overpass-turbo.eu
Other
891 stars 129 forks source link

On MacOS cmd + H is hijacking default OS behaviour. #656

Open platlas opened 9 months ago

platlas commented 9 months ago

Problem: on MacOS cmd + H is system-wide shortcut for hiding focused window. While using overpass-turbo in Firefox[1] this shortcut opens site's help popup instead of hiding window.

It is happening probably because of this line of code: https://github.com/tyrasd/overpass-turbo/blob/eb216aa08b06590a4efc4e10d6a25140d53fcf70/js/ide.ts#L2532 event.metaKey represents ⌘ Command key on MacOS. In case of Mac it is not necessary to use cmd here since Mac do have ctrl key as well - so help dialog can be still opened with ctrl + H. However I'm not sure how removing event.metaKey from this condition would influence other operating systems.

[1]: This does not occur in Safari browser since Safari prevents use of default shorcuts by website.

brunnerpaul commented 6 months ago

Same issue here, reproduced on MacOS with Brave, Firefox, Chrome. Would be a great to resolve this conflict with the "hide browser window" shortcut.