From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: pjb@informatimago.com (Pascal J. Bourguignon) Newsgroups: gmane.emacs.help Subject: Re: emacs displaying backslash incorrectly Date: Tue, 07 Sep 2010 15:50:56 +0200 Organization: Informatimago Message-ID: <87y6bdek73.fsf@kuiper.lan.informatimago.com> References: <4cde6a89-8b15-4841-a777-a1dca63dcd9c@11g2000yqq.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: dough.gmane.org 1291862220 18671 80.91.229.12 (9 Dec 2010 02:37:00 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 9 Dec 2010 02:37:00 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Dec 09 03:36:56 2010 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.69) (envelope-from ) id 1PQWNM-00075G-87 for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Dec 2010 03:36:56 +0100 Original-Received: from localhost ([127.0.0.1]:39400 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PQWNL-0005bt-AA for geh-help-gnu-emacs@m.gmane.org; Wed, 08 Dec 2010 21:36:55 -0500 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 81 Original-X-Trace: individual.net /nT3Fdpp9W3aMBPDLy2TcgKaXIDlRlqzvpWWh6U7POm4MeS5QC Cancel-Lock: sha1:ZDFkMzRjZDhhOGJiNjYwY2IxZjYzNTBlY2U5YjJlZWJjZjdiMWMyYQ== sha1:Lu0qhf1PRNZSXoLmOyStkgNTao8= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en X-Disabled: X-No-Archive: no User-Agent: Gnus/5.101 (Gnus v5.10.10) Emacs/23.2 (gnu/linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:181192 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:76490 Archived-At: lraae writes: > Hi, I have a weird problem which I can't seem to find anything about > on the web: When I type a backslash, emacs displays it as a capital W > with a double strikethrough. > > This is Emacs 23.1.1 on Linux Fedora 12 (2.6.32.19-163.fc12.i686.PAE). > > I tried "emacs -q" to run without startup file, but the problem > remains. This is a school administered computer, so I don't have root > access. > > Hope someone might have an idea how to proceed in solving this. It may be because your terminal (or X window) is configured to send ₩ (Korean Won) when you type that key. Or perhaps emacs has a keyboard translation translating \ to ₩. Or perhaps \ is bound to a function inserting ₩. Or perhaps you've activated an input method such that when you type \ you get ₩. Since you get the same with emacs -q, it may be configured so in the site initialization files. Try again with emacs -Q to avoid those. If it's X windows that's sending ₩, you may check first what key code correspond to you backslash key with xev: M-x shell RET xev RET When typing the backspace key in xev window, you should get something like the following in the shell buffer: KeyPress event, serial 27, synthetic NO, window 0x2400001, root 0x15e, subw 0x0, time 395774908, (1101,528), root:(1101,528), state 0x0, keycode 51 (keysym 0x5c, backslash), same_screen YES, XLookupString gives 1 bytes: (5c) "\" XmbLookupString gives 1 bytes: (5c) "\" XFilterEvent returns: False KeyRelease event, serial 27, synthetic NO, window 0x2400001, root 0x15e, subw 0x0, time 395774972, (1101,528), root:(1101,528), state 0x0, keycode 51 (keysym 0x5c, backslash), same_screen YES, XLookupString gives 1 bytes: (5c) "\" XFilterEvent returns: False (You may type C-c C-c in the shell buffer to kill xev). On my keyboard, the keycode of the backslash key is 51 (decimal). It is translated to the keysym backslash (#x5c = ascii code for '\'), which would be what my emacs would receive. You can check the whole keycode->keysym translation map with: M-x shell RET xmodmap -pke RET To reset the mapping of a key code you can use: M-x shell RET xmodmap -e 'keycode 51 = backslash bar' assuming your backspace key has the keycode 51. Notice that keycodes depend on the keyboard hardware. You could keep around various custom xmodmap files, one per keyboard model you use, and load them with: M-x shell RET xmodmap ~/rc/xmodmap-daskeyboard-3 RET or whatever. -- __Pascal Bourguignon__ http://www.informatimago.com/