Skip to content

Instantly share code, notes, and snippets.

@borissov
Last active May 8, 2024 01:57
Show Gist options
  • Save borissov/78fcb1e92b90be3a63aaa24814a99676 to your computer and use it in GitHub Desktop.
Save borissov/78fcb1e92b90be3a63aaa24814a99676 to your computer and use it in GitHub Desktop.
Caps Lock + HJKL on Ubuntu 18.04 LTS (Bionic Beaver)

Remap systemwide Caps + HJKL to arrow keys for Ubuntu 18.04 LTS (Bionic Beaver).

For US Layout

In file /usr/share/X11/xkb/symbols/us append in xkb_symbols "basic" scope before the closing bracket:

    //hjkl
    key <AC06> {        [         h, H, Left            ]       };
    key <AC07> {        [         j, J, Down            ]       };
    key <AC08> {        [         k, K, Up              ]       };
    key <AC09> {        [         l, L, Right           ]       };
    key <CAPS> { [ ISO_Level3_Shift ] }; 

For BG Layout

In file /usr/share/X11/xkb/symbols/bg append in xkb_symbols "phonetic" scope before the closing bracket:

  //hjkl
  key <AC06> {[ Cyrillic_ha, Cyrillic_HA, Left            ]       };
  key <AC07> {[ Cyrillic_shorti, Cyrillic_SHORTI, Down            ]       };
  key <AC08> {[ Cyrillic_ka, Cyrillic_KA, Up              ]       };
  key <AC09> {[ Cyrillic_el, Cyrillic_EL, Right           ]       };
  key <CAPS> { [ ISO_Level3_Shift ] };

for less and greater in bulgarian layout.

  //fix less & greater
  key <AB08> {[ comma, less, doublelowquotemark,    guillemotleft       ]};
  key <AB09> {[ period, greater, leftdoublequotemark,   guillemotright      ]};

Need reboot system.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment