ZIm/crates/gpui/src
Sergei Surovtsev 19ab1eb792
Fix an issue where xkb defined hotkeys for arrows would not work (#34823)
Addresses
https://github.com/zed-industries/zed/pull/34053#issuecomment-3096447601
where custom-defined arrows would stop working in Zed.

How to reproduce:

1. Define custom keyboard layout

```bash
cd /usr/share/X11/xkb/symbols/
sudo nano mykbd
```

```
default partial alphanumeric_keys
xkb_symbols "custom" {

    name[Group1]= "Custom Layout";

    key <AD01> { [ q,  Q,  Escape,     Escape      ] };
    key <AD02> { [ w,  W,  Home,       Home        ] };
    key <AD03> { [ e,  E,  Up,         Up          ] };
    key <AD04> { [ r,  R,  End,        End         ] };
    key <AD05> { [ t,  T,  Tab,        Tab         ] };

    key <AC01> { [ a,  A,  Return,     Return      ] };
    key <AC02> { [ s,  S,  Left,       Left        ] };
    key <AC03> { [ d,  D,  Down,       Down        ] };
    key <AC04> { [ f,  F,  Right,      Right       ] };
    key <AC05> { [ g,  G,  BackSpace,  BackSpace   ] };

    // include a base layout to inherit the rest
    include "us(basic)"
};
```

2. Activate custom layout with win-key as AltGr

```bash
setxkbmap mykbd -variant custom -option lv3:win_switch
```

3. Now Win-S should produce left arrow, Win-F right arrow
4. Test whether it works in Zed

Release Notes:

 - linux: xkb-defined hotkeys for arrow keys should behave as expected.

---------

Co-authored-by: Conrad Irwin <conrad.irwin@gmail.com>
2025-07-21 17:16:44 -06:00
..
app gpui: Add use state APIs (#34741) 2025-07-19 01:27:54 +00:00
elements gpui: Round scroll_max to two decimal places (#34832) 2025-07-21 22:24:33 +02:00
keymap Update keymap context binding behavior of > and ! (#34664) 2025-07-18 09:25:18 -06:00
platform Fix an issue where xkb defined hotkeys for arrows would not work (#34823) 2025-07-21 17:16:44 -06:00
text_system Improve terminal rendering performance (#33345) 2025-07-08 09:05:01 -06:00
window gpui: Improve window.prompt to support ESC with non-English cancel text on macOS (#29538) 2025-05-30 15:26:27 +00:00
action.rs gpui: Reduce manual shifting & other minor improvements (#34407) 2025-07-15 16:39:33 +02:00
app.rs collab: Add screen selector (#31506) 2025-07-21 13:44:51 +02:00
arena.rs chore: Bump Rust version to 1.88 (#33439) 2025-06-26 20:54:19 +02:00
asset_cache.rs gpui: Relax AssetLogger trait bounds (#29450) 2025-04-29 12:43:54 -07:00
assets.rs chore: Bump Rust edition to 2024 (#27800) 2025-03-31 20:55:27 +02:00
bounds_tree.rs gpui: Optimize the ordering update in the BoundsTree (#31025) 2025-05-30 08:23:27 -07:00
color.rs gpui: Reduce manual shifting & other minor improvements (#34407) 2025-07-15 16:39:33 +02:00
colors.rs gpui: Add a standard text example (#30747) 2025-05-16 17:35:44 +02:00
element.rs gpui: Add use state APIs (#34741) 2025-07-19 01:27:54 +00:00
executor.rs Add a test for remote tool use by the agent (#30289) 2025-05-08 16:53:04 -04:00
geometry.rs Migrate to schemars version 1.0 (#33635) 2025-06-30 21:07:28 +00:00
global.rs Eliminate GPUI View, ViewContext, and WindowContext types (#22632) 2025-01-26 03:02:45 +00:00
gpui.rs gpui: Add tab focus support (#33008) 2025-07-20 16:38:54 -07:00
input.rs Implement character index for point (#23989) 2025-02-04 20:15:43 +00:00
inspector.rs Add a live Rust style editor to inspector to edit a sequence of no-argument style modifiers (#31443) 2025-05-26 17:43:57 +00:00
interactive.rs gpui: Simplify Action macros + support doc comments in actions! (#33263) 2025-06-24 04:34:51 +00:00
key_dispatch.rs gpui: Simplify Action macros + support doc comments in actions! (#33263) 2025-06-24 04:34:51 +00:00
keymap.rs Update keymap context binding behavior of > and ! (#34664) 2025-07-18 09:25:18 -06:00
path_builder.rs Revert "gpui: Improve path rendering & global multisample anti-aliasing" (#34722) 2025-07-18 16:03:08 +00:00
platform.rs collab: Add screen selector (#31506) 2025-07-21 13:44:51 +02:00
prelude.rs Sketch in a table for the keybindings UI (#32436) 2025-06-30 19:25:11 -04:00
scene.rs Revert "gpui: Improve path rendering & global multisample anti-aliasing" (#34722) 2025-07-18 16:03:08 +00:00
shared_string.rs Migrate to schemars version 1.0 (#33635) 2025-06-30 21:07:28 +00:00
shared_uri.rs Rework loading images from files (#7088) 2024-01-30 11:26:02 -05:00
style.rs Add a live Rust style editor to inspector to edit a sequence of no-argument style modifiers (#31443) 2025-05-26 17:43:57 +00:00
styled.rs Add a live Rust style editor to inspector to edit a sequence of no-argument style modifiers (#31443) 2025-05-26 17:43:57 +00:00
subscription.rs gpui: Replace Mutex with RefCell for SubscriberSet (#30907) 2025-05-19 11:08:04 +02:00
svg_renderer.rs gpui: Use static keyword with LazyLock when loading system fonts (#34555) 2025-07-18 12:35:38 +02:00
tab_stop.rs gpui: Add tab focus support (#33008) 2025-07-20 16:38:54 -07:00
taffy.rs chore: Bump taffy to 0.5.1 (#34817) 2025-07-21 15:43:51 +02:00
test.rs Add seed argument to #[gpui::test] attribute macro (#26764) 2025-03-14 13:40:02 -03:00
text_system.rs Improve terminal rendering performance (#33345) 2025-07-08 09:05:01 -06:00
util.rs chore: Bump Rust version to 1.88 (#33439) 2025-06-26 20:54:19 +02:00
view.rs Add initial element inspector for Zed development (#31315) 2025-05-23 23:08:59 +00:00
window.rs gpui: Add tab focus support (#33008) 2025-07-20 16:38:54 -07:00