I'm very happy to report that I found a solution to the problem: keyd
. It's amazing.
Instructions on the github project are crystal clear, but I'll leave some instructions below for Arch Users
yay -S keyd
sudo systemctl enable keyd && sudo systemctl start keyd
Now you can configure the /etc/keyd/default.conf
file to your hearts desire. keyd
is very feature rich, check the man page to see everything you can do. You can even add layers to your keyboard. Very sweet.
My personal configuration so far (I will definitely expand it later when I bump into more problems)
[ids]
*
[main]
' = oneshotm(apostrophe, ')
[apostrophe]
a = a
b = macro(space backspace apostrophe space b)
c = macro(backspace G-,)
d = macro(space backspace apostrophe space d)
e = e
f = macro(space backspace apostrophe space f)
g = macro(backspace apostrophe space g)
h = macro(space backspace apostrophe space h)
i = i
j = macro(space backspace apostrophe space j)
k = macro(backspace apostrophe space k)
l = macro(backspace apostrophe space l)
m = macro(backspace apostrophe space m)
n = macro(backspace apostrophe space n)
o = o
p = macro(space backspace apostrophe space p)
q = macro(space backspace apostrophe space q)
r = macro(backspace apostrophe space r)
s = macro(backspace apostrophe space s)
t = macro(backspace apostrophe space t)
u = u
v = macro(space backspace apostrophe space v)
w = macro(backspace apostrophe space w)
x = macro(space backspace apostrophe space x)
y = macro(backspace apostrophe space y)
z = macro(backspace apostrophe space z)
After editing /etc/keyd/default.conf
make sure you run sudo keyd reload