Keyd - Keyboard Re-Mapping

Linux
Keyboard
Published

January 12, 2023

Modified

March 7, 2024

keyd 1 …key remapping daemon for Linux

Installation

File Description
keyd-install 2 Script to build & install keyd

Manual …from source code:

pushd $(mktemp -d /tmp/$USER-keyd-XXXXXX)
git clone https://github.com/rvaiya/keyd && cd keyd
make && sudo make install
sudo systemctl enable --now keyd
popd
rm -rf /tmp/$USER-keyd-* 
  • …read the log file sudo journalctl -eu keyd
  • …configuration in /etc/keyd and /usr/share/keyd
  • …executables keyd* in /usr/bin
  • …documentation /usr/share/doc/keyd

Configuration

Special key sequence backspace+escape+enter should cause keyd to terminate

File Description
keyd.sh 3 Script to configure keyd
default.conf 4 keyd configuration file

Configuration in /etc/keyd/default.conf

  • sudo systemctl reload keyd after changes…
  • …use capslock to access a dedicated layer on the keyboard
  • …bring back function keys not present on keyboards smaller then 75%
  • …make backtick and tilde more accessible close to the home row
[ids]

*

[main]

capslock = layer(capslock)

[capslock:C]

# function keys missing on small keyboards
1 = f1
2 = f2
3 = f3
4 = f4
5 = f5
6 = f6
7 = f7
8 = f8
9 = f9
0 = f10
- = f11
= = f12

# vim-style arrow keys
h = left
j = down
k = up
l = right

# typically inconvenient
space = backspace
q = ~
w = `
e = \
r = |

# copy&paste in Linux terminals
d = C-S-c
f = C-S-v