本页还没有译文
本页 10 段还没译成Deutsch,下面显示的是英文原文。detectPlatform
还没翻译译自英文(tanstack.com)本页 10 段都还没译
function detectPlatform(): "mac" | "windows" | "linux";Defined in: platform.ts:18
Detects the current platform based on browser navigator properties.
Used internally to resolve platform-adaptive modifiers like 'Mod' (Command on Mac, Control elsewhere) and for platform-specific hotkey formatting.
Returns
"mac" | "windows" | "linux"
The detected platform: 'mac', 'windows', or 'linux'
Remarks
Defaults to 'linux' in SSR environments where navigator is undefined
Example
const platform = detectPlatform() // 'mac' | 'windows' | 'linux'
const modifier = resolveModifier('Mod', platform) // 'Meta' on Mac, 'Control' elsewhereAI 翻译查看英文原文