()
| 5 | export type Platform = "mac" | "linux" | "windows" | "unknown"; |
| 6 | |
| 7 | export function getPlatform(): Platform { |
| 8 | const platform = window.navigator.platform.toUpperCase(); |
| 9 | if (platform.indexOf("MAC") >= 0) { |
| 10 | return "mac"; |
| 11 | } else if (platform.indexOf("LINUX") >= 0) { |
| 12 | return "linux"; |
| 13 | } else if (platform.indexOf("WIN") >= 0) { |
| 14 | return "windows"; |
| 15 | } else { |
| 16 | return "unknown"; |
| 17 | } |
| 18 | } |
| 19 | |
| 20 | export function isMetaEquivalentKeyPressed({ |
| 21 | metaKey, |
no outgoing calls
no test coverage detected