Detail a bit more how to cutomize xkb keymappings

apiraino 2020-11-08 17:27:36 +01:00
parent e9adc6a7c5
commit 3a953078a2

34
Home.md

@ -171,9 +171,39 @@ input "type:keyboard" { # or input <identifier>
}
```
#### xmodmap equivalent
#### Load a modified custom xkb keymap (xmodmap equivalent)
See [#4250](https://github.com/swaywm/sway/issues/4250)
See [#4250](https://github.com/swaywm/sway/issues/4250#issuecomment-711222006)
If you just want to change just a couple of keymappings, you can create your own by overriding the keymappings of your usual layout.
```
input type:keyboard {
# Modified programmer Dvorak. File at ~/.xkb/symbols/dvp_alt_gr_remapped_to_super
xkb_layout "dvp_alt_gr_remapped_to_super"
# Capslock key should work as escape key
# See /usr/share/X11/xkb/rules/xorg.lst for options
xkb_options caps:escape
repeat_delay 250
repeat_rate 45
}
```
The entirety of `~/.xkb/symbols/dvp_alt_gr_remapped_to_super`:
```
default partial alphanumeric_keys
xkb_symbols "basic" {
include "us(dvp)"
name[Group1] = "Modified programmer Dvorak";
key <RALT> { [ Super_L, Super_R ] };
};
```
The full documentation on how to override keymappings is available [at this link](https://www.charvolant.org/doug/xkb/html/node5.html). Here a [slightly digested version](https://git.sr.ht/~jman/dotfiles/tree/refs/heads/master/xkb/README.md) with a practical commented example.
#### Libinput config options