My web app has a feature where the user can hold Ctrl (Windows, ctrlKey
) or Cmd (Mac, metaKey
). I want to provide help text telling the user they can do this.
What's a reliable way to detect a Mac-like keyboard? Is navigator.platform.match(/mac/i)
safe enough?