From: pjb@informatimago.com (Pascal J. Bourguignon)
To: help-gnu-emacs@gnu.org
Subject: Re: emacs displaying backslash incorrectly
Date: Tue, 07 Sep 2010 15:50:56 +0200 [thread overview]
Message-ID: <87y6bdek73.fsf@kuiper.lan.informatimago.com> (raw)
In-Reply-To: 4cde6a89-8b15-4841-a777-a1dca63dcd9c@11g2000yqq.googlegroups.com
lraae <lcraae@gmail.com> 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/
next prev parent reply other threads:[~2010-09-07 13:50 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-07 12:46 emacs displaying backslash incorrectly lraae
2010-09-07 13:42 ` Tim X
[not found] ` <fopo86l6f9l4i9ieor4iigp95a8i3lun2k@4ax.com>
2010-09-13 7:20 ` lraae
2010-09-07 13:50 ` Pascal J. Bourguignon [this message]
2010-09-08 2:24 ` Jason Rumney
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y6bdek73.fsf@kuiper.lan.informatimago.com \
--to=pjb@informatimago.com \
--cc=help-gnu-emacs@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).