From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ken Newsgroups: gmane.emacs.help Subject: How can I make my caps lock key act like a control key? Date: Wed, 16 Jul 2008 02:53:10 -0400 Message-ID: <487D9AD6.2060709@speakeasy.net> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1216191233 24871 80.91.229.12 (16 Jul 2008 06:53:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 16 Jul 2008 06:53:53 +0000 (UTC) To: Help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jul 16 08:54:40 2008 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KJ0uN-0003vE-SJ for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Jul 2008 08:54:40 +0200 Original-Received: from localhost ([127.0.0.1]:51011 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJ0tV-00056b-Fh for geh-help-gnu-emacs@m.gmane.org; Wed, 16 Jul 2008 02:53:45 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KJ0tH-00056M-3c for help-gnu-emacs@gnu.org; Wed, 16 Jul 2008 02:53:31 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KJ0tF-00056A-Je for Help-gnu-emacs@gnu.org; Wed, 16 Jul 2008 02:53:30 -0400 Original-Received: from [199.232.76.173] (port=36849 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KJ0tF-000567-HM for Help-gnu-emacs@gnu.org; Wed, 16 Jul 2008 02:53:29 -0400 Original-Received: from mx20.gnu.org ([199.232.41.8]:21456) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1KJ0tF-0001iZ-5M for Help-gnu-emacs@gnu.org; Wed, 16 Jul 2008 02:53:29 -0400 Original-Received: from mail6.sea5.speakeasy.net ([69.17.117.8]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KJ0tC-0001jF-Sg for Help-gnu-emacs@gnu.org; Wed, 16 Jul 2008 02:53:27 -0400 Original-Received: (qmail 12642 invoked from network); 16 Jul 2008 06:53:24 -0000 Original-Received: from dsl093-011-017.cle1.dsl.speakeasy.net (HELO [192.168.0.26]) (gebser@[66.93.11.17]) (envelope-sender ) by mail6.sea5.speakeasy.net (qmail-ldap-1.03) with AES256-SHA encrypted SMTP for ; 16 Jul 2008 06:53:24 -0000 User-Agent: Thunderbird 2.0.0.0 (X11/20070326) X-Enigmail-Version: 0.95.6 OpenPGP: id=45796D04 X-detected-kernel: by mx20.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:55625 Archived-At: This is more a Linux systems question than an emacs problem. But hopefully no one here will be too offended. As with most things unix and, more, linux, there's a number of ways. What I've done is swapped Control and CapsLock in the system file where they are initially defined, in /usr/share/kbd/keymaps/i386/qwerty/. Depending upon your machine (uname -m) and how it's set up, the file you want to look at might be in a different directory. On some Linuxes you can find the file with "cat /etc/defkeymap.name". If this works for you, then you should just be able to hand edit /etc/defkeymap.map... it should be obvious what editing needs to be done. If I'm remembering correctly, you'd just want to change the line beginning keycode 58 = to read "Control" instead of "Caps_Lock". Alternatively, you could make a copy of your preferred keyboard map in or around /usr/share/kbd/keymaps/i386/qwerty/ (naming it, say, nocapslock.map), edit that file in the same sort of way as above, and then write in nocapslock.map into /etc/defkeymap.map. Because these are a system files, the key(s) are swapped for anyone using this machine without X (which, for all practical purposes on my system, is just myself). There's other ways to do what you want... query a search engine for them if you're interested in alternative, probably more doctrinaire methods. hth. Hi, I am having trouble mapping my caps lock key to control key in my linux shell(NOT X). I want both the control and caps lock keys to act like control keys. I've tried using loadkeys and I'm not getting errors, but I can't get it to work. I've used dumpkeys to get a keymap, edited the map to where both the caps lock and control keys have the same key code (58 i think). I then load this map with loadkeys and there are no errors but nothing happens. I tried opening a new shell just in case and still no changes have occurred. Help on this issue would be appreciated. Thanks, -- View this message in context: http://www.nabble.com/How-can-I-make-my-caps-lock-key-act-like-a-control-key--tp18469011p18469011.html Sent from the Emacs - Help mailing list archive at Nabble.com.