ZIm/crates/workspace/src
张小白 f0ef3110d3
gpui: Introduce PlatformKeyboardLayout trait for human-friendly keyboard layout names (#29049)
This PR adds a new `PlatformKeyboardLayout` trait with two methods:
`id(&self) -> &str` and `name(&self) -> &str`. The `id()` method returns
a unique identifier for the keyboard layout, while `name()` provides a
human-readable name. This distinction is especially important on
Windows, where the `id` and `name` can be quite different. For example,
the French layout has an `id` of `0000040C`, which is not
human-readable, whereas the `name` would simply be `French`. Currently,
the existing `keyboard_layout()` method returns what's essentially the
same as `id()` in this new design.

This PR implements the `name()` method for both Windows and macOS. On
Linux, for now, `name()` still returns the same value as `id()`.

Release Notes:

- N/A
2025-04-19 22:23:03 +08:00
..
persistence chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
dock.rs workspace: Do not call set_active when deserializing a dock if that dock was not visible (#27852) 2025-04-01 16:33:52 +00:00
history_manager.rs History manager (#26369) 2025-04-11 21:34:51 +00:00
item.rs debugger: Style debugger tabs (#28572) 2025-04-11 15:33:36 +02:00
modal_layer.rs Fix the feedback modal (#26793) 2025-03-14 17:55:52 -04:00
notifications.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
pane.rs pane: Fix double or invisible borders in tab bar (#29061) 2025-04-18 22:32:22 +05:30
pane_group.rs Debugger UI: Dynamic session contents (#28033) 2025-04-07 23:22:09 +02:00
persistence.rs toolchain: Respect currently focused file when querying toolchains (#28875) 2025-04-16 19:05:57 +02:00
searchable.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
shared_screen.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
status_bar.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
tasks.rs Set up Rust debugger code runner tasks (#27571) 2025-03-29 02:10:40 -04:00
theme_preview.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
toast_layer.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
toolbar.rs Allow buffer search in project search (#23819) 2025-01-31 00:13:46 -07:00
workspace.rs gpui: Introduce PlatformKeyboardLayout trait for human-friendly keyboard layout names (#29049) 2025-04-19 22:23:03 +08:00
workspace_settings.rs workspace: Implement Extended Terminal Option (#26211) 2025-04-11 16:18:36 +00:00