Results 1 to 7 of 7

Thread: Switching the Alt and Ctrl keys

  1. #1
    Join Date
    Sep 2009
    Location
    Canada, Montreal QC
    Beans
    1,809
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Switching the Alt and Ctrl keys

    Hello,
    I am feeling uncomfortable with the Ctrl key far to my left and I almost never use my Alt key.
    So I was wondering if there is any way to reverse them?
    I heard about xmodmap but I an sure how to use it.

    Thank you.
    I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones.
    Freedom is measured in Stallmans.
    Projects: gEcrit

  2. #2
    Join Date
    Jun 2009
    Location
    0:0:0:0:0:0:0:1
    Beans
    5,169
    Distro
    Kubuntu

    Re: Switching the Alt and Ctrl keys

    maybe system -> preferences -> keyboard -> click options button
    Laptop: ASUS A54C-NB91 (Storage: WD3200BEKT + MKNSSDCR60GB-DX); Desktop: Custom Build - Images included; rPi Server
    Putting your Networked Printer's scanner software to shame PHP Scanner Server
    I frequently edit my post when I have the last post

  3. #3
    Join Date
    Sep 2009
    Location
    Canada, Montreal QC
    Beans
    1,809
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Switching the Alt and Ctrl keys

    I go to Ctrl key position and all I see is Right Ctrl as Right Alt.

    I need the left ones or both sides.
    I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones.
    Freedom is measured in Stallmans.
    Projects: gEcrit

  4. #4
    Join Date
    Jan 2011
    Beans
    1,151

    Re: Switching the Alt and Ctrl keys

    save the file
    use
    Code:
    xmodmap filename
    Code:
    ! left
    remove Control = Control_L
    remove Mod1 = Alt_L
    keysym Control_L = Alt_L
    keysym Alt_L = Control_L
    add Control = Control_L
    add Mod1 = Alt_L
    
    ! right
    remove Control = Control_R
    remove Mod1 = Alt_R
    keysym Control_R = Alt_R
    keysym Alt_R = Control_R
    add Control = Control_R
    add Mod1 = Alt_R
    this is just a quick solution. If keep swapping keys when you log out and loggin.

    if you want a more perment solution

    post the output of
    Code:
    xmodmap -pke | grep -i "alt\|control"
    
    xmodmap
    Last edited by idoitprone; June 16th, 2011 at 06:43 PM.

  5. #5
    Join Date
    Sep 2009
    Location
    Canada, Montreal QC
    Beans
    1,809
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Switching the Alt and Ctrl keys

    Thank you. It was exactly what I needed.
    I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones.
    Freedom is measured in Stallmans.
    Projects: gEcrit

  6. #6
    Join Date
    Jan 2011
    Beans
    1,151

    Re: Switching the Alt and Ctrl keys

    there always a problem with loggin out and loggin in, unless you only run it manually

  7. #7
    Join Date
    Sep 2009
    Location
    Canada, Montreal QC
    Beans
    1,809
    Distro
    Ubuntu 11.10 Oneiric Ocelot

    Re: Switching the Alt and Ctrl keys

    I will put it in my .xsession to be run every time my computer boots...
    I know not with what weapons World War III will be fought, but World War IV will be fought with sticks and stones.
    Freedom is measured in Stallmans.
    Projects: gEcrit

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •