Shared binding string, or a { mac, other } object.
The platform-specific binding string.
resolveBinding("mod+s"); // => "mod+s"
resolveBinding({ mac: "meta+s", other: "ctrl+shift+s" }); // => "meta+s" on macOS
export function resolveBinding(binding: KeyBinding): string {
if (typeof binding === "string") return binding;
return isMac() ? binding.mac : binding.other;
}
Resolves a platform-aware
KeyBindingdown to a single string for the current platform. Pass-through when already a string.