Files
hoppscotch/packages/hoppscotch-app/src/helpers/platformutils.ts
Andrew Bastin 8b300fab5d feat: migrate to vue 3 + vite (#2553)
Co-authored-by: amk-dev <akash.k.mohan98@gmail.com>
Co-authored-by: liyasthomas <liyascthomas@gmail.com>
2022-09-29 10:55:21 +05:30

12 lines
271 B
TypeScript

export function isAppleDevice() {
return /(Mac|iPhone|iPod|iPad)/i.test(navigator.platform)
}
export function getPlatformSpecialKey() {
return isAppleDevice() ? "⌘" : "Ctrl"
}
export function getPlatformAlternateKey() {
return isAppleDevice() ? "⌥" : "Alt"
}