Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
linux: Fix wrong keys are reported when using German layout (#31193)
张小白ee4e43f1b6b3
diff --git a/crates/gpui/src/platform/linux/x11/client.rs b/crates/gpui/src/platform/linux/x11/client.rsindex a59825b292f..4565570f20f 100644--- a/crates/gpui/src/platform/linux/x11/client.rs+++ b/crates/gpui/src/platform/linux/x11/client.rs@@ -840,6 +840,14 @@ impl X11Client {state.xkb_device_id,)};+ let depressed_layout = xkb_state.serialize_layout(xkbc::STATE_LAYOUT_DEPRESSED);+ let latched_layout = xkb_state.serialize_layout(xkbc::STATE_LAYOUT_LATCHED);+ let locked_layout = xkb_state.serialize_layout(xkbc::ffi::XKB_STATE_LAYOUT_LOCKED);+ state.previous_xkb_state = XKBStateNotiy {+ depressed_layout,+ latched_layout,+ locked_layout,+ };state.xkb = xkb_state;}Event::XkbStateNotify(event) => {