From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Pascal J. Bourguignon" Newsgroups: gmane.emacs.help Subject: Re: Strange characters produced by M-x in emacs -nw Date: Sat, 21 Sep 2013 18:14:31 +0200 Organization: Informatimago Message-ID: <87y56q40ew.fsf@informatimago.com> References: <87r4cnmlxf.fsf@newsguy.com> <5D24468E-2A38-4F4C-AD14-9A1401683124@Web.DE> <8738oz5uh4.fsf@newsguy.com> <20130920172847.GA30192@hysteria.proulx.com> <87li2rmegr.fsf@newsguy.com> <87fvsz5faj.fsf@informatimago.com> <87wqmb5ebj.fsf@newsguy.com> <877gea5w1a.fsf@informatimago.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1379780415 26942 80.91.229.3 (21 Sep 2013 16:20:15 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 21 Sep 2013 16:20:15 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat Sep 21 18:20:19 2013 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 1VNPut-0007oY-Eo for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Sep 2013 18:20:19 +0200 Original-Received: from localhost ([::1]:60820 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VNPus-0005M0-V8 for geh-help-gnu-emacs@m.gmane.org; Sat, 21 Sep 2013 12:20:18 -0400 Original-Path: usenet.stanford.edu!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 93 Original-X-Trace: individual.net P5cBohz2ufX5uVVS6rqJ6AvPp0mptwxE84CEpqF7nhQLvoqSPn Cancel-Lock: sha1:OGM4ODAzM2UzN2E5YzYxMGRmZDBkZDA4YzAxOGE0NTM4ZGY0ODBhNA== sha1:5SUr0B+wPSW10Jb7M/qKjPprNSU= Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9 033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR mV+hO/VvFAAAAABJRU5ErkJggg== X-Accept-Language: fr, es, en User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Original-Xref: usenet.stanford.edu gnu.emacs.help:201228 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:93497 Archived-At: Harry Putnam writes: > "Pascal J. Bourguignon" writes: > >> Harry Putnam writes: >> >>> "Pascal J. Bourguignon" writes: >>> >>>> Stefan Monnier writes: >>>> >>>>>> | mod1 Alt_L (0x40), Alt_R (0x6c), Meta_L (0xcd) >>>>> >>>>> This might be a source of problems: try to remap your Meta_L key to >>>>> Alt_L as follows: >>>>> >>>>> xmodmap -e 'keysym Meta_L = Alt_L' >>>> >>>> No, instead map Meta_L to a free keycode! >>>> Don't confuse Alt and Meta Combine them! >>>> Bind A-M-x and others to some useful command! >>> >>> What about some examples? >> >> Yes, I'm posting my .xmodmap each week… >> >> ! >> ! This is an `xmodmap' input file for the DasKeyboard 3 >> ! >> ! Bus 008 Device 005: ID 04d9:2013 Holtek Semiconductor, Inc. >> ! >> ! PC 105 keys, wide Delete, wide Enter. >> ! > > Don't mean to sound like an ingrate but that is just plain over my > head. > > What part of that makes the switch you spoke of? Can it be done with > a simple 1-2 line xmodmap command. Mostly. But since there's a finite number of keys on a keyboard in general, rebinding a key has consequences and you may want to shift the old function on a new key etc. Also, the keycode while often similar from one keyboard to the other, are often different notably on the modifier keys. So you will have to use xev(1), to find out the keycodes of the keys you want to bind to the symbols, then map them to symbols: keycode 37 = Multi_key keycode 133 = Alt_L keycode 64 = Meta_L keycode 65 = space space digitspace digitspace keycode 108 = Meta_R keycode 134 = Mode_switch keycode 135 = Hyper_R keycode 105 = Control_R ! It's on the Print/Sys_Req key: keycode 127 = Super_R Super_R then you must map the symbols of the modifier keys to the modifier byte: clear Shift clear Lock clear Control clear Mod1 clear Mod2 clear Mod3 clear Mod4 clear Mod5 !!! In order of bits: add Shift = Shift_L Shift_R add Lock = Caps_Lock add Control = Control_L Control_R add Mod1 = Num_Lock add Mod2 = Alt_L Alt_R Mode_switch add Mod3 = Meta_L Meta_R add Mod4 = Super_L Super_R add Mod5 = Hyper_L Hyper_R and that's it. Notice how alt and meta are different modifiers. -- __Pascal Bourguignon__ http://www.informatimago.com/