# Fix an issue where xkb defined hotkeys for arrows would not work \(\#34823\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/19ab1eb79258759e3ee0fef7017d259345b912e6)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 19ab1eb79258759e3ee0fef7017d259345b912e6

Requested commit: 19ab1eb79258759e3ee0fef7017d259345b912e6

Commit: 19ab1eb79258759e3ee0fef7017d259345b912e6

Tree: e06d329355cb3a73325e868d5d14a33db7e493c8

Author: Sergei Surovtsev

Committer: GitHub

## Message

````
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>
````

## Parents

- [722a05bc21aaa451908e208c674a45f0b1139b1c](https://git.cafe/gitcafe/zed/commit/722a05bc21aaa451908e208c674a45f0b1139b1c?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/19ab1eb79258759e3ee0fef7017d259345b912e6?format=markdown)
