CMD & control keys swap in ubuntu

后端 未结 6 1696
生来不讨喜
生来不讨喜 2021-02-02 02:09

I have an Apple keyboard with a cmd key which I\'m trying to swap with the control key.

From googleing the problem and searching across the forum I came with a several s

6条回答
  •  孤街浪徒
    2021-02-02 02:42

    Depending of your desktop you can find easier or harder solutions for this.

    If you have Gnome:

    Just open Tweak tool, go to: Typing tab, and choose: Ctrl is mapped to Win keys in Alt/Win key behavior and you are done, is not perfect but works well.

    If you have unity or other flavor you need to use Xmodmap, edit your ~/.Xmodmap with this:

    remove control = Control_L
    remove mod4 = Super_L Super_R
    
    keysym Control_L = Super_L
    keysym Super_L = Control_L
    keysym Super_R = Control_L
    
    add control = Control_L Control_R
    add mod4 = Super_L Super_R
    

    then add this next line to ~/.profile file and log in again.

    xmodmap .Xmodmap 
    

    I wrote this How To about this, maybe can help someone. https://chrissmejia.com/howto/swaps-the-ctrl-and-cmd-keys-in-ubuntu/

提交回复
热议问题