gpui: Refactor PlatformKeyboardLayout (#29653)

Release Notes:

- N/A
This commit is contained in:
张小白 2025-04-30 16:17:26 +08:00 committed by GitHub
parent edda386827
commit 074b6965e2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 131 additions and 106 deletions

View file

@ -1,4 +1,5 @@
mod app_menu;
mod keyboard;
mod keystroke;
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
@ -63,6 +64,7 @@ use strum::EnumIter;
use uuid::Uuid;
pub use app_menu::*;
pub use keyboard::*;
pub use keystroke::*;
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
@ -1679,11 +1681,3 @@ impl From<String> for ClipboardString {
}
}
}
/// A trait for platform-specific keyboard layouts
pub trait PlatformKeyboardLayout {
/// Get the keyboard layout ID, which should be unique to the layout
fn id(&self) -> &str;
/// Get the keyboard layout display name
fn name(&self) -> &str;
}