本帖最后由 孤不冷cing 于 2022-8-14 10:49 编辑
想看我最终配置内容的,置项在第二层了。
存在问题有写,并且这个配置对终端及vim不生效。
可能这些问题只对我的电脑存在,想试的可以试试
我在win上用capslock+习惯了,觉得很好用,所以就上网琢磨linux下的映射,了解到了xmodmap,想自己简单实现几个自己最常用的快捷组合键
xmodmap.config内容如下,是按网上写的。
右边是修改后的keycode和keysym
现状是从右边看确实修改了,但是实际并没有任何效果
xmodmap.config内容
clear lock
clear mod1
clear mod3
clear mod4
clear mod5
add mod1 = Alt_L Alt_R
add mod3 = Hyper_L Hyper_R
add mod4 = Super_L Super_R
add mod5 = ISO_Level3_Shift
keycode 66 = Mode_switch Caps_Lock NoSymbol NoSymbol
! swap backspace and caps+w
keycode 25 = w W BackSpace BackSpace
! swap delete and caps+r
keycode 27 = r R Delete Delete
! swap up and caps+e
keycode 26 = e E Up Up
! swap down and caps+d
keycode 40 = d D Down Down
! swap left and caps+s
keycode 39 = s S Left Left
! swap right and caps+f
keycode 41 = f F Right Right
! swap esc and caps+q
keycode 24 = q Q Escape Escape
! swap home and caps+u
keycode 30 = u U Home Home
! swap end and caps+p
keycode 33 = p P End End
! swap enter and caps+space
!keycode 65 = space space enter enter
输入xmodmap -pke查看的部分内容
keycode 23 = Tab ISO_Left_Tab Tab ISO_Left_Tab
keycode 24 = q Q Escape Escape
keycode 25 = w W BackSpace BackSpace
keycode 26 = e E Up Up
keycode 27 = r R Delete Delete
keycode 28 = t T t T
keycode 29 = y Y y Y
keycode 30 = u U Home Home
keycode 31 = i I i I
keycode 32 = o O o O
keycode 33 = p P End End
keycode 34 = bracketleft braceleft bracketleft braceleft
keycode 35 = bracketright braceright bracketright braceright
keycode 36 = Return NoSymbol Return
keycode 37 = Control_L NoSymbol Control_L
keycode 38 = a A a A
keycode 39 = s S Left Left
keycode 40 = d D Down Down
keycode 41 = f F Right Right
keycode 42 = g G g G
keycode 43 = h H h H
keycode 44 = j J j J
keycode 45 = k K k K
keycode 46 = l L l L
期望
想实现图中注释的几个基本内容,不是交换,只是想让这几个组合按键能能具有相同的效果,原本的按键功能保持不变
例如:按住caps + w可以向上移动光标,并且上箭头还具有向上移动光标的功能
能解释一下xmodmap怎么用的吗,网上的我越看越糊涂,连keycode和keysym都分不清了。我不知道他们都是啥意思了,也不知道xmodmap在干什么
参考这两个教程
Xmodmap (简体中文)
https://www.cnblogs.com/yinheyi/p/10146900.html
下面这个我试过了,可以用 $ cat .Xmodmap
clear lock
clear control
clear shift
! caps <--> ctrl_l
keycode 66 = Control_L NoSymbol Control_L
keycode 37 = Caps_Lock NoSymbol Caps_Lock
! esc <--> "`~"
keycode 49 = Escape NoSymbol Escape
keycode 9 = grave asciitilde grave asciitilde
! space <--> ctrl_r
keycode 65 = Control_R NoSymbol Control_R
keycode 105 = space NoSymbol space
! back_space <--> shift_r
keycode 62 = BackSpace BackSpace BackSpace BackSpace
keycode 22 = Shift_R NoSymbol Shift_R
add lock = Caps_Lock
add control = Control_L Control_R
add shift = Shift_L Shift_R
|