Ubuntu交换ctrl与win键

在/home/目录下建立文件.Xmodmap文件,填入:

1
2
3
4
5
6
remove Mod4 = Super_L
remove Control = Control_L
keysym Control_L = Super_L
keysym Super_L = Control_L
add Mod4 = Super_L
add Control = Control_L

如果想将左ctrl和左alt交换位置,则为:

1
2
3
4
5
6
remove mod1 = Alt_L 
remove control = Control_L
keysym Control_L = Alt_L
keysym Alt_L = Control_L
add mod1 = Alt_L
add control = Control_L

然后在Startup Applications Preferences中添加项目,指令填

1
/usr/bin/xmodmap /home/.Xmodmap