1 2 3 4 5 6 7 8 9 10 11
#[inline] pub fn platform_cmd_shortcut(key: &str) -> String { #[cfg(target_os = "macos")] { format!("⌘{key}") } #[cfg(not(target_os = "macos"))] { format!("Ctrl+{key}") } }