linux: Fix wrong keys are reported when using German layout (#31193)
Part of #31174 Because the keyboard layout parameter wasn’t set correctly, characters don’t show up properly when using the German layout at launch. To reproduce: Switch to the German layout, launch Zed, and press the `7` key. it should output `7`, but instead it outputs `è`. Release Notes: - N/A
This commit is contained in:
parent
d61e1e24a7
commit
ee4e43f1b6
1 changed files with 8 additions and 0 deletions
|
@ -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) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue