Results 1 to 4 of 4

Thread: How do I switch cntrl and capsoff automatically on startup

  1. #1
    Join Date
    Dec 2005
    Beans
    35

    How do I switch cntrl and capsoff automatically on startup

    Hi all,

    How do I switch the cntrl and caps keys automatically on startup? Right now I have to pull up a shell to do it each time as an alias command that I've put in my .bashrc.

  2. #2
    Join Date
    Dec 2005
    Beans
    35

    Re: How do I switch cntrl and capsoff automatically on startup

    saw on another forum that this might do the trick

    Code:
    xmodmap -e "remove lock = Caps_Lock
    but what file would I put this in so that it would run automatically at boot?

  3. #3
    Join Date
    Dec 2005
    Beans
    35

    Re: How do I switch cntrl and capsoff automatically on startup

    Ok, here's the solution to my problem which has worked for me and should probably work for you two

    first, I create a file in my home directory.
    Code:
    echo setxkbmap -option ctrl:swapcaps >> capsoff
    Then Start menu > System > Preferences > Startup Applications

    The selection box pops up and click the `add' button.
    Then you can click the `browse' button and select the `capsoff' file from the list of files in your home directory. When you restart, your `control' and `cap-lock' keys should be switched.

    Great for emacs users, once you get used to it!

    If you would like to still be able to switch back to use the caps-lock key for it, paste the following into the commandline:

    echo alias capstoggle='setxkbmap -option ctrl:swapcaps' >> ~/.bashrc

    This will now be a permanent alias.

    Then you should be able to switch to between the two different keymaps at will by typing at the command line:

    capstoggle
    Last edited by frootstripe; November 28th, 2011 at 03:39 PM.

  4. #4
    Join Date
    Apr 2006
    Beans
    370

    Re: How do I switch cntrl and capsoff automatically on startup

    You can do this from the keyboard layout settings in GNOME as well: 'Options' -> 'Ctrl key position'

Tags for this Thread

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
  •