LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-08-2011, 10:00 PM   #1
Ubunoob001
Member
 
Registered: Feb 2010
Location: New Orleans, LA
Distribution: Mint 16 RC, Elementary OS Luna, Crunchbang
Posts: 166

Rep: Reputation: 17
Smile reset default keymap, then switch Ctrl>>Capslock (not working)


So I'm running through an Emacs tutorial and I was trying to figure out how to exchange CTRL and CAPSLOCK.

1. From the Emacs Wiki, i saw
Code:
As super-user:

  $ loadkeys emacs
  $ echo "loadkeys emacs" >> /etc/rc.d/rc.local
so, maybe stupidly I tried this. Which seems to have changed nothing.

so then I try
Code:
loadkeys -d
to try and get back to the default. Which doesn't seem to work.

so then thinking i should reset everything, try to go in /usr/share/kbd/keymaps/i386/qwerty and do
Code:
loadkeys defkeymap.map.gz
(gosh I hope that's the default).

Finally, I go into /etc/X11 and edit xorg.conf-vesa to uncomment
Code:
# If you'd like to switch the positions of your capslock and
# control keys, use:
#
    Option     "XkbOptions"    "ctrl:swapcaps"
and restart.

To no avail...maybe I have made a mess. But could someone please suggest the best way to change the caps and control? thanks!
 
Old 01-09-2011, 03:41 PM   #2
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.0
Posts: 1,158
Blog Entries: 29

Rep: Reputation: 129Reputation: 129
Here's what I do:

First, take the text attachment, get rid of the .txt part of the file name, and compress it as a gzipped file. The final file should be a gzip-compressed file called, "emacs3.map.gz."

This file makes the CAPS-Lock key a CTRL key.

Then, make or modify (I think it's already included in Slackware) an rc.keymap file like below:

Code:
#! /bin/sh
# /etc/rc.d/rc.keymap
#
# Load the keyboard map. More maps are in /usr/share/kbd/keymaps.
#
# modified for colorized screen messages and local needs

#source /etc/functions-colors

# Tell the viewers what's going to happen.
echo -e "$Setting the keyboard map:"

if [ -x /usr/bin/loadkeys ]; then
 /usr/bin/loadkeys emacs3.map.gz
 #/usr/bin/loadkeys us.map
fi
Then make it executable.

As root, run /etc/rc.d/rc.keymap and you're good to go, in a terminal.

If you want to swap CAPS-Lock and CTRL in an X-windows session, it's another process. KDE has a setting in its preferences to do that, and that's what I do.

Regards,
Attached Files
File Type: txt emacs3.map.txt (2.1 KB, 9 views)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
keymap and keyboard repeat rate is reset by pm-suspend, so HAL does not work (!) rusma Linux - Newbie 2 04-22-2010 12:14 PM
loading default keymap failured larrysz Linux - Newbie 10 09-09-2009 12:51 AM
Modify default keymap in DOSEMU jensen123 Linux - Software 0 07-31-2009 08:31 AM
KDE 3.5.9 - Konqueror - keyboard shortcuts ctrl+, and ctrl+. sometimes stop working bhy Linux - Desktop 1 07-26-2008 11:48 AM
Gateway server is not working and Capslock and Scrolllock keys are blinking. aronnok Linux - General 0 11-27-2007 07:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 04:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration