From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Emanuel Berg Newsgroups: gmane.emacs.help Subject: Re: Caps Lock affects Ctrl+keys Date: Mon, 20 Jan 2014 18:23:30 +0100 Organization: Aioe.org NNTP Server Message-ID: <871u02tvqi.fsf@nl106-137-194.student.uu.se> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1390239012 9792 80.91.229.3 (20 Jan 2014 17:30:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 20 Jan 2014 17:30:12 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jan 20 18:30:20 2014 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1W5Ig0-0001IT-Jd for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Jan 2014 18:30:20 +0100 Original-Received: from localhost ([::1]:53882 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W5Ifz-00087S-Ss for geh-help-gnu-emacs@m.gmane.org; Mon, 20 Jan 2014 12:30:19 -0500 X-Received: by 10.15.10.201 with SMTP id g49mr8768375eet.1.1390238739935; Mon, 20 Jan 2014 09:25:39 -0800 (PST) X-FeedAbuse: http://nntpfeed.proxad.net/abuse.pl feeded by 78.192.65.63 Original-Path: usenet.stanford.edu!hk7no10081584wib.1!news-out.google.com!o10ni1351wia.0!nntp.google.com!proxad.net!feeder1-2.proxad.net!nntpfeed.proxad.net!news.muarf.org!news.ecp.fr!aioe.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 58 Original-NNTP-Posting-Host: /ZLK7EtDT1dvbkmVtWlLYw.user.speranza.aioe.org Original-X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:9CddnPyiZHPzT9CaXicVUjHzn3A= Mail-Copies-To: never Original-Xref: usenet.stanford.edu gnu.emacs.help:203246 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95514 Archived-At: Yuri Khan writes: >> No, the problem is in the Linux kernel emacs is by >> no means unique in this behavior. > > Kernel? I don't think so. xev(1) reports different > output when I press Ctrl+Shift+Z and Ctrl+Z with Caps > on. Firefox opens a new tab on Ctrl+T (and restores > the last closed tab on Ctrl+Shift+T), no matter if > Caps is on or off. Some information on this, see if you can figure it out: In keymaps(5), there is some information what to do with caps: > Which of the actions bound to a given key is taken > when it is pressed depends on what modifiers are in > effect at that moment. The keyboard driver supports > 9 modifiers. These modifiers are labeled (completely > arbitrarily) Shift, AltGr, Control, Alt, ShiftL, > ShiftR, CtrlL, CtrlR and CapsShift. Each of these > modifiers has an associated weight of power of two > according to the following table: > modifier weight > Shift 1 > AltGr 2 > Control 4 > Alt 8 > ShiftL 16 > ShiftR 32 > CtrlL 64 > CtrlR 128 > CapsShift 256 # swap control and caps keycode 58 = Control keycode 29 = Caps_Lock # always enable on caps, disable on either shift keycode 42 = Uncaps_Shift # left shift keycode 54 = Uncaps_Shift # right shift keycode 58 = Caps_On # caps Note: Get the keycodes with 'showkey', then update changes to the remap file with 'sudo loadkeys'. If 'showkey' complains it can't get access to the console it means you are running it for example in tmux, if so use 'sudo showkey' (every time) or 'sudo chmod u+s /usr/bin/showkey' to make it work ever since. With 'showkey -s', it doesn't seem to be possible to get what you describe. -- underground experts united: http://user.it.uu.se/~embe8573