better cfg

This commit is contained in:
Junkui Zhang 2025-08-27 03:03:12 +08:00
parent a03f7e9b48
commit 8ea76710db

View file

@ -87,12 +87,12 @@ pub fn default_settings() -> Cow<'static, str> {
#[cfg(target_os = "macos")]
pub const DEFAULT_KEYMAP_PATH: &str = "keymaps/default-macos.json";
#[cfg(target_os = "linux")]
pub const DEFAULT_KEYMAP_PATH: &str = "keymaps/default-linux.json";
#[cfg(target_os = "windows")]
pub const DEFAULT_KEYMAP_PATH: &str = "keymaps/default-windows.json";
#[cfg(not(any(target_os = "macos", target_os = "windows")))]
pub const DEFAULT_KEYMAP_PATH: &str = "keymaps/default-linux.json";
pub fn default_keymap() -> Cow<'static, str> {
asset_str::<SettingsAssets>(DEFAULT_KEYMAP_PATH)
}