LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] Swapping caps lock and control

[ILUG] Swapping caps lock and control

Paul Jakma paul at clubi.ie
Mon May 30 13:44:22 IST 2005


On Mon, 30 May 2005, Niall O Broin wrote:

> Option "XkbOptions" "ctrl:swapcaps"
>
> in my xorg.conf but it behaves VERY oddly - when the box is at the 
> kdm prompt, the keys are swapped, but as soon as I've logged into 
> KDE they are unswapped again. Any ideas?

Go into your GNOME preferences and open the keyboard preferences 
dialogue. oh wait..

Personally, i have following in ~/.bashrc:

# got X?
if [ -n "${DISPLAY}" ] ; then
         # check XKB swapcaps setting, set if not
         if ! ( eval setxkbmap -print | grep swapcaps > /dev/null ) ; 
then
                  setxkbmap -option ctrl:swapcaps
         fi
fi
if [ -x /sbin/consoletype -a -x /bin/loadkeys ] \
    && /sbin/consoletype > /dev/null -a -f /etc/sysconfig/keyboard ; 
then
         . /etc/sysconfig/keyboard
         /bin/loadkeys << EOF
include "/lib/kbd/keymaps/i386/qwerty/${KEYTABLE}.map.gz"
keycode  58 = Control
keycode  29 = Caps_Lock
EOF
fi

Note the console thing is /not/ permanent, unless you undo it with 
logout script. The X thing will work remotely (eg if you borrow 
someone's machine and ssh home).

regards,
-- 
Paul Jakma	paul at clubi.ie	paul at jakma.org	Key ID: 64A2FF6A
Fortune:
He who despairs over an event is a coward, but he who holds hopes for
the human condition is a fool.
 		-- Albert Camus



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


Maintained by the ILUG website team. The aim of Linux.ie is to support and help commercial and private users of Linux in Ireland. You can display ILUG news in your own webpages, read backend information to find out how. Networking services kindly provided by HEAnet, server kindly donated by Dell. Linux is a trademark of Linus Torvalds, used with permission. No penguins were harmed in the production or maintenance of this highly praised website. Looking for the Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!
RSS Version
Powered by Dell