Detect platform - Mac or Windows

We are working on keyboard commands in our app and need detect whether the user has a Mac (and uses the Command key) or Windows (and uses the CTRL key). The Zoom App user agent masks which platform they are on. Is there another method we can use to detect whether the user is on a Mac?

@bridger Try using window.navigator.platform: