archlinux 改键

在这里插入代码片# archlinux 改键

1. 需求

  • 单独Capslock 等于 esc
  • Capslock + h,j,k,l = left,down,up,right.
  • Capslock + i,o = home,end
  • Capslock + d,u = pagedown,pageup

这里我们使用keyd这个项目来进行我们的改建

2. 安装

  • yay
yay -S keyd-git

这个提供AUR,使用archlinux系列可以快速安装。

git clone https://aur.archlinux.org/keyd-git.git
cd keyd-git
makepkg -si

3. 配置

默认配置文件位置在: /etc/keyd/default.conf

查看可以使用的按键 keyd -l

more information please see

  • leftmeta - 就是super

注意这个按键是我本人专属,不一定适合你哦!

[ids]

*

[main]

capslock = overload(capslock_layer,esc)

# map menu to control
compose = layer(control)

[control]

1 = A-1
2 = A-2
3 = A-3
4 = A-4
5 = A-5
6 = A-6
7 = A-7
8 = A-8
9 = A-9
0 = A-0
f = right
b = left
p = up
n = down
m = enter
h = backspace
#a = home
e = end
; = `
q = ~
[ = esc

[control+shift]

k = macro(home S-end S-right delete)
n = C-S-n
f = C-f
b = C-S-b
p = C-S-p
n = C-S-n
m = C-S-m
h = C-S-h
a = C-S-a
e = C-S-e

1 = A-S-1
2 = A-S-2
3 = A-S-3
4 = A-S-4
5 = A-S-5
6 = A-S-6
7 = A-S-7
8 = A-S-8
9 = A-S-9
0 = A-S-0

[capslock_layer]

h = M-h
j = M-j
k = M-k
l = M-l
i = home
o = end
u = pageup
d = pagedown
q = M-q
# vim like word motion
w = C-right
b = C-left
# w = C-w
# b = C-b
# capslock as ctrl key
a = C-a
e = C-e
f = C-f
r = C-r
p = C-p
t = C-t
y = C-y
z = C-z
# switch Tab
# s = C-tab
s = C-s
# copy & paste
c = C-c
v = S-insert
# x = S-delete
x = C-x
# remap fn
1 = f1
2 = f2
3 = f3
4 = f4
5 = f5
6 = f6
7 = f7
8 = f8
9 = f9
10 = f10
- = f11
= = f12
; = `
n = backspace
m = delete
# Rest your left little thumb
g = enter
# enter = leftmouse
enter = M-enter
# navigation back and forward
, = mouse1
. = mouse2
left = mouse1
right = mouse2
[ = C-home
] = C-end

第一次使用 sudo systemctl enable keyd
后面每次更新 sudo systemctl restart keyd

这个时候,我们就能愉快的玩耍了。

根据应用改建

很多时候,我们不同的应用需要使用不同的快捷键,刚好,这个keyd,可以设置不同应用

首先,我们先将自己使用的用户加入到keyd这个组

usermod -aG keyd <user>

这里的user是自己登录的账号名
好了,立马重启,不重启这个设置是不能生效的!!!

然后我们建立一个目录 ~/.config/keyd,

我们 vim app.conf

这是我的配置:

[google-chrome]

control.a = macro(home)
control.w = macro(C-left C-delete)
control.k= macro(S-end S-right delete)
control.u = macro(S-home S-left delete)

[icalingua]

control.a = macro(home)
control.w = macro(C-left C-delete)
control.k= macro(S-end S-right delete)
control.u = macro(S-home S-left delete)

更多信息请看:https://github.com/rvaiya/keyd/blob/master/docs/keyd-application-mapper.scdoc

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值