emacs -nw and Alt key no longer simulates Esc key...
I upgraded a box from Mandraake 6.x to Debian testing recently and have noticed that when I run GNU Emacs in non-X mode (emacs -nw) the Alt key no longer maps to Esc like it used to. My .emacs file hasn't changed. Where can I look to figure out how to fix this? Thanks, Jeremy -- Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo! [EMAIL PROTECTED] | http://jeremy.zawodny.com/
Emacs and the ALT key.
Ok... I can't remember if this started when I installed 2.2, but I suppose it doesn't really matter. the ALT key (on my PC keyboard) doesn't seem to work in emacs.. It works in netscape -- and aside from that, I have absolutely no problems at all with anything... I remember using xmodmap when I used redhat to make the backspace key -- but I think that wont work here -- for some reason.. since somewhere I read that my version of X doesn't use that xmodmap thing.. Anyway -- any help would be appreciated. -abr
Re: Emacs and the ALT key.
On Wed, 12 May 1999, Allen B. Riddell wrote: the ALT key (on my PC keyboard) doesn't seem to work in emacs.. It works in netscape -- and aside from that, I have absolutely no problems at all with anything... Probably the Windows key (if you have one) is bound to the Meta keysym, which is what Emacs is looking for; I don't think Emacs uses the Alt keysym at all by default. If you don't have a Windows key, you need to move Meta to some other key of your choice. (Many people have the physical Alt key send both Alt and Meta keysyms, which is technically wrong but works nice in practice, since few apps use both keysyms. However, XEmacs insists on complaining about it every time you start up.) That said, I'm not sure how to do this without Xmodmap. Perhaps it will help to know what you're trying to achieve though. :-) Havoc
Re: Emacs and the ALT key.
I posted a lengthy description of how to deal with this back in August (the problem was introduced with hamm). I'll repost the content here: This problem has come up so many times since hamm started getting used that it almost merits its own HOWTO. What's happened is that you've upgraded X and now you are using the XKEYBOARD extension. As you've noticed, the ALT key now does ALT and the windows key is now the META key. I've argued several times that this is a bug since it changes behavior. Alas no one listens to this raving madman. Where's whatcha do (as root): sed -e 's/Alt_L/Foo_L/' -e 's/Alt_R/Foo_R/' /usr/lib/X11/xkb/symbols/us |\ sed -e 's/Meta_L/Alt_L/' -e 's/Meta_R/Alt_R/' |\ sed -e 's/Foo_L/Meta_L/' -e 's/Foo_R/Meta_R/' /usr/lib/X11/xkb/symbols/us.new mv /usr/lib/X11/xkb/symbols/us /usr/lib/X11/xkb/symbols/us.old mv /usr/lib/X11/xkb/symbols/us.new /usr/lib/X11/xkb/symbols/us (Now restart X and Things should work normally. Michael Symalla wrote: Dear Debian users, can anyone help me to let my Alt-key be the metakey in emacs? Now I am using the ESC key, which works fine but is not as comfortable as the ALT key. Thanks a lot. -- Bye Mitch -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null Havoc Pennington wrote: On Wed, 12 May 1999, Allen B. Riddell wrote: the ALT key (on my PC keyboard) doesn't seem to work in emacs.. It works in netscape -- and aside from that, I have absolutely no problems at all with anything... Probably the Windows key (if you have one) is bound to the Meta keysym, which is what Emacs is looking for; I don't think Emacs uses the Alt keysym at all by default. If you don't have a Windows key, you need to move Meta to some other key of your choice. (Many people have the physical Alt key send both Alt and Meta keysyms, which is technically wrong but works nice in practice, since few apps use both keysyms. However, XEmacs insists on complaining about it every time you start up.) That said, I'm not sure how to do this without Xmodmap. Perhaps it will help to know what you're trying to achieve though. :-) Havoc -- Unsubscribe? mail -s unsubscribe [EMAIL PROTECTED] /dev/null -- Jens B. Jorgensen [EMAIL PROTECTED]
Emacs and the ALT key.
Ok... I can't remember if this started when I installed 2.2, but I suppose it doesn't really matter. the ALT key (on my PC keyboard) doesn't seem to work in emacs.. It works in netscape -- and aside from that, I have absolutely no problems at all with anything... I remember using xmodmap when I used redhat to make the backspace key -- but I think that wont work here -- for some reason.. since somewhere I read that my version of X doesn't use that xmodmap thing.. Anyway -- any help would be appreciated. -abr
Re: emacs, X, and Alt key--SOLVED!
On Wed, 21 Jan 1998, Daniel Martin at cush wrote: Mark Phillips [EMAIL PROTECTED] writes: I, like Thomas Vaughan, have been having problems getting emacs to recognise the Alt key under X. (The system is a Toshiba laptop.) The `problem' is that the Alt keys aren't acting as the Meta keys - instead, your X is configured to have the Windows-Logo keys act as Meta. XFree86 does this if you tell it that you have a 104-key keyboard (the keyboards without these amusing keys are 101-key keyboards). Based on earlier correspondence with the original person who posted this problem, I think that XFree86 may now default to 104-key keyboard behavior unless you tell it otherwise. The laptop doesn't have meta keys or windows-logo keys. Anyway, there are two ways to fix this: 1) Tell XFree86 that you have a 101-key keyboard. ... XkbModelpc101 I did this, restarted X, and it didn't fix the problem. 2) Just force the Alt keys to act as Meta Add the following lines to the end of your /etc/X11/Xmodmap: keycode 64 = Alt_L Meta_L keycode 113 = Alt_R Meta_R This worked! Thanks for your help, all of you. Mark. __ _\/___\__/___Mark_Phillips___/ \__/_\__/--\__/[EMAIL PROTECTED]/ \__/HE___\__/--APTAIN/ \__/_\__/--\__/__/ /__To be is to do.__I. Kant___/ \__/__\__/___/ /__To do is to be.__A. Sartre_/ /__I am.God___/ /__Jesus did.___/ -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: emacs, X, and Alt key
I, like Thomas Vaughan, have been having problems getting emacs to recognise the Alt key under X. (The system is a Toshiba laptop.) Daniel Martin wrote: What is the result of the following commands: xmodmap xmodmap -pke | grep -E '64|11[356]' Here are the results: $ xmodmap xmodmap: up to 2 keys per modifier, (keycodes in parentheses): shift Shift_L (0x32), Shift_R (0x3e) lockCaps_Lock (0x42) control Control_L (0x25), Control_R (0x6d) mod1Alt_L (0x40), Alt_R (0x71) mod2Num_Lock (0x4d) mod3 mod4Meta_L (0x73), Meta_R (0x74) mod5Scroll_Lock (0x4e) $ xmodmap -pke | grep -E '64|11[356]' keycode 64 = Alt_L keycode 113 = Alt_R keycode 115 = Meta_L keycode 116 = Meta_R I can't see anything particularly wrong here - but then, I'm no expert. Is something not right? Peter Galbraith wrote: Run `xev' and press the Alt keys to find what keycode they generate I did this and got: KeyPress event, serial 21, synthetic NO, window 0x2c1, root 0x2a, subw 0x0, time 535084486, (-5,-23), root:(380,198), state 0x0, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES, XLookupString gives 0 characters: KeyRelease event, serial 21, synthetic NO, window 0x2c1, root 0x2a, subw 0x0, time 535084676, (-5,-23), root:(380,198), state 0x8, keycode 64 (keysym 0xffe9, Alt_L), same_screen YES, XLookupString gives 0 characters: Seems fine. No? Well I don't know what to do from here. Any ideas? Thanks, Mark. __ _\/___\__/___Mark_Phillips___/ \__/_\__/--\__/[EMAIL PROTECTED]/ \__/HE___\__/--APTAIN/ \__/_\__/--\__/__/ /__To be is to do.__I. Kant___/ \__/__\__/___/ /__To do is to be.__A. Sartre_/ /__I am.God___/ /__Jesus did.___/ -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: Using xmodmap to set the Alt and Meta keys (emacs, X, and Alt key)
Mark Phillips wrote: I, like Thomas Vaughan, have been having problems getting emacs to recognise the Alt key under X. (The system is a Toshiba laptop.) keycode 64 = Alt_L keycode 113 = Alt_R keycode 115 = Meta_L keycode 116 = Meta_R What does emacs say when you invoke describe-key: `C-h k Alt-x' `C-h k Meta-x' Do you *really* want an Alt key? Or do you want a Meta key? When Emacs has separate Alt and Meta keys, I think it doesn't use the Alt key as Meta anymore. You appear to have both available My keyboard has this bottom row; the keycode are as shown by the `xev' command: ++ +---+ +---+ +---+ +---+ +---+ ++ ++ |Ctrl| |Win| |Alt| | Space | |Alt| |Win| |Menu| |Ctrl| ++ +---+ +---+ +---+ +---+ +---+ ++ ++ keycode: 37115 64 113 116 117109 If XFree is setup correctly, then the `Windows' key (identified above as Win), are Meta keys and the Alt keys are really seen in Emacs as Alt keys. I use the Alt key to insert 8-bit characters, like é. The `Menu' key really works and is a synonym for `Meta-x' in Emacs (and pops up a buffer-specific menu in XEmacs). When XFree isn't properly set up, or gets confused for some reason, you can use `xmodmap ~/.Xmodmap' in some X initialisation file. Here's my ~/.Xmodmap file: --- clear Mod1 clear Mod2 clear Mod3 keycode 64 = Alt_L keycode 113 = Alt_R keycode 115 = Meta_L keycode 116 = Meta_R keycode 117 = Menu add Mod2 = Alt_L add Mod2 = Alt_R add Mod1 = Meta_L add Mod1 = Meta_R remove Lock = Caps_Lock keysym Caps_Lock = Hyper_L add Mod3 = Hyper_L keycode 22 = BackSpace --- In addition to setting Alt and Meta keys, I disable the silly Caps_Lock key and set a `Hyper' key so I can define more user keys in Emacs (Most people just set an extra Control key here). Also, I make sure to set the BackSpace key correctly. Hope this helps you and others, -- Peter Galbraith, research scientist [EMAIL PROTECTED] Maurice-Lamontagne Institute, Department of Fisheries and Oceans Canada P.O. Box 1000, Mont-Joli Qc, G5H 3Z4 Canada 418-775-0852 - FAX 418-775-0546 -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: Using xmodmap to set the Alt and Meta keys (emacs, X, and Alt key)
Peter S Galbraith writes: If XFree is setup correctly, then the `Windows' key (identified above as Win), are Meta keys and the Alt keys are really seen in Emacs as Alt keys. I use the Alt key to insert 8-bit characters, like é. The `Menu' key really works and is a synonym for `Meta-x' in Emacs (and pops up a buffer-specific menu in XEmacs). What is the 'correct' setup in XF86Config for a keyboard with windows keys? What Xkb* parameters need to changed from defaults and to what? Thanks, Brian -- Mechanical Engineering [EMAIL PROTECTED] Purdue University http://www.ecn.purdue.edu/~servis -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: emacs, X, and Alt key
Mark Phillips [EMAIL PROTECTED] writes: I, like Thomas Vaughan, have been having problems getting emacs to recognise the Alt key under X. (The system is a Toshiba laptop.) Daniel Martin wrote: What is the result of the following commands: xmodmap xmodmap -pke | grep -E '64|11[356]' Here are the results: $ xmodmap xmodmap: up to 2 keys per modifier, (keycodes in parentheses): shift Shift_L (0x32), Shift_R (0x3e) lockCaps_Lock (0x42) control Control_L (0x25), Control_R (0x6d) mod1Alt_L (0x40), Alt_R (0x71) mod2Num_Lock (0x4d) mod3 mod4Meta_L (0x73), Meta_R (0x74) mod5Scroll_Lock (0x4e) $ xmodmap -pke | grep -E '64|11[356]' keycode 64 = Alt_L keycode 113 = Alt_R keycode 115 = Meta_L keycode 116 = Meta_R I can't see anything particularly wrong here - but then, I'm no expert. Is something not right? The `problem' is that the Alt keys aren't acting as the Meta keys - instead, your X is configured to have the Windows-Logo keys act as Meta. XFree86 does this if you tell it that you have a 104-key keyboard (the keyboards without these amusing keys are 101-key keyboards). Based on earlier correspondence with the original person who posted this problem, I think that XFree86 may now default to 104-key keyboard behavior unless you tell it otherwise. Anyway, there are two ways to fix this: 1) Tell XFree86 that you have a 101-key keyboard. I wouldn't do this unless you actually do have a 101-key keyboard, as I'm uncertain whether or not XFree86 will then freak out when you accidentally hit one of the Win95 keys. It's probably still safe, but you might want do just go with solution (2) anyway. You can do this by editing /etc/X11/XF86Config - if you have something a group of lines that begins with 'section Keyboard', change that group of lines to read: Section Keyboard ProtocolStandard XkbRulesxfree86 XkbModelpc101 XkbLayout us EndSection Actually, if you already have such a section I'd leave it in place and just change the XkbModel line. If you don't have a us keyboard layout, then either re-run XF86Setup and choose your keyboard explicitly there, or use solution 2. You'll need to restart X for the changes to take effect. 2) Just force the Alt keys to act as Meta Add the following lines to the end of your /etc/X11/Xmodmap: keycode 64 = Alt_L Meta_L keycode 113 = Alt_R Meta_R Then either restart X or issue the command: xmodmap /etc/X11/Xmodmap Depending on how Emacs handles certain X events, you may need to exit Emacs and restart it. (I use Xemacs, which handles these events properly, and so don't know what Emacs does) (and before someone jumps in to say that the above lines will mean that you have to press Shift-Alt to use Meta, let me just point you to the xmodmap man page, q.v.) -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: emacs, X, and Alt key
Hi, Well it may not quite follow the discussion... I'm using XEmacs 20 and X-3.2.2 (hamm). I have the keyboard with Windows button neighbouring to ALT button. It works like ESC in XEmacs. May be it's good enough solution. The good thing is that I just followed whatever was the default in those X,XEmacs installations. The Keyboard Section in XF86Config is: Section Keyboard ProtocolStandard XkbKeymap xfree86(us) EndSection Sasha. -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: emacs, X, and Alt key
Hi Mark! I, like Thomas Vaughan, have been having problems getting emacs to recognise the Alt key under X. (The system is a Toshiba laptop.) I'm running a Toshiba Tecra 730CDT, and the Alt key in emacs under X works fine in combination with other keys without any special setup. What model is your laptop and what window manager are you using? One problem with fvwm2 it is the line in /etc/X11/fvwm2/system.fvwm2rc which breaks Meta-mouse: Mouse 0 W M move-and-raise-or-raiselower I fix it by adding this line to my ~/.fvwm2/post.hook: Mouse 0 W M - Meta-mouse is used in emacs for secondary selection. I will bring this up with the fvwm2 maintainer if this line is still in the hamm version. Kirk Hilliard P.S. I would rather use emacs -nw in an xterm than use emacs in its own window if it were not for secondary selection and mouse-yank-at-point. Put (setq mouse-yank-at-point t) in your ~/.emacs and give it a try. -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: emacs, X, and Alt key
Thomas E. Vaughan [EMAIL PROTECTED] writes: My problem is that *neither* `Alt' key is being interpreted as `Meta' by emacs. AfterStep's `Alt-Tab' combination works well enough to switch between windows. I have commented out two lines in my XF86config like that: # To set the LeftAlt to Meta, RightAlt key to ModeShift, # RightCtl key to Compose, and ScrollLock key to ModeLock: LeftAlt Meta RightAltModeShift #RightCtlCompose #ScrollLock ModeLock Works for me. Greetings, jtr -- Joachim Trinkwitzemail: [EMAIL PROTECTED] CIP-Pool Anglistik, Germanistik, phone: 0228-737565 Romanistik, Skandinavistik fax: 0228-737479 Rheinische Friedrich-Wilhelms-Universitaet Am Hof 1d, D-53113 Bonn, Germany -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: emacs, X, and Alt key
Thomas E. Vaughan [EMAIL PROTECTED] writes: I just installed Debian 1.3.1 on my Pentium-133 machine. I used dselect's FTP mode to install emacs-19.34, X, and AfterStep. My problem is that *neither* `Alt' key is being interpreted as `Meta' by emacs. AfterStep's `Alt-Tab' combination works well enough to switch between windows. I much prefer `Alt-x' to `Esc-x' as a means of entering an emacs command. But the `Alt' key is not functioning as `Meta'. Has anyone else seen this behavior? Surely it should not be the default behavior, but I have done very little customization and am inclined to suspect that it is. Yuck. I would appreciate any assistance. Thanks. Well, I have seen that behavior on my machine, but that's because I have a 104-key keyboard (with the three silly Win95 keys), and my Meta is the Windows logo key, rather than alt. Did you perhaps accidentally tell XF86Setup that you have a 104-key keyboard, not a 101-key one? What is the result of the following commands: xmodmap xmodmap -pke | grep -E '64|11[356]' -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: emacs, X, and Alt key
I used dselect's FTP mode to install emacs-19.34, X, and AfterStep. My problem is that *neither* `Alt' key is being interpreted as `Meta' by emacs. AfterStep's `Alt-Tab' combination works well enough to switch between windows. I much prefer `Alt-x' to `Esc-x' as a means of entering an emacs command. But the `Alt' key is not functioning as `Meta'. Has anyone else seen this behavior? Yes I have seen this behavior. My friend's laptop has the same problem. I have been trying to fix it but haven't been able to as of yet. I would be grateful if you could forward on to me any useful replies that you receive. Thanks, Mark. _/\___/~~\ /~~\_/~~\__/~~\__Mark_Phillips /~~\_/[EMAIL PROTECTED] /~~\HE___/~~\__/~~\APTAIN_ /~~\__/~~\ __ They told me I was gullible ... and I believed them! -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: emacs, X, and Alt key
My problem is that *neither* `Alt' key is being interpreted as `Meta' by emacs. AfterStep's `Alt-Tab' combination works well enough to switch between windows. Run `xev' and press the Alt keys to find what keycode they generate: For example, I get: keycode 113 (keysym 0xffea, Alt_R) keycode 64 (keysym 0xffe9, Alt_L) Then write a ~/.Xmodmap file (which `xmopmap' should run). Mine looks like: clear Mod1 clear Mod2 clear Mod3 keycode 64 = Alt_L keycode 113 = Alt_R keycode 115 = Meta_L keycode 116 = Meta_R keycode 117 = Menu add Mod2 = Alt_L add Mod2 = Alt_R add Mod1 = Meta_L add Mod1 = Meta_R remove Lock = Caps_Lock keysym Caps_Lock = Hyper_L add Mod3 = Hyper_L keycode 22 = BackSpace -- Peter Galbraith, research scientist [EMAIL PROTECTED] Maurice-Lamontagne Institute, Department of Fisheries and Oceans Canada P.O. Box 1000, Mont-Joli Qc, G5H 3Z4 Canada 418-775-0852 - FAX 418-775-0546 -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
emacs, X, and Alt key
I just installed Debian 1.3.1 on my Pentium-133 machine. I used dselect's FTP mode to install emacs-19.34, X, and AfterStep. My problem is that *neither* `Alt' key is being interpreted as `Meta' by emacs. AfterStep's `Alt-Tab' combination works well enough to switch between windows. I much prefer `Alt-x' to `Esc-x' as a means of entering an emacs command. But the `Alt' key is not functioning as `Meta'. Has anyone else seen this behavior? Surely it should not be the default behavior, but I have done very little customization and am inclined to suspect that it is. Yuck. I would appreciate any assistance. Thanks. -- Thomas E. Vaughan[EMAIL PROTECTED] 1634 S. Memphis St., Aurora, CO 80017(303) 750-7864 -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .