Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I use xmodmap to set my right alt key as a mode_switch key that allows me to type international characters. However, that means I don't have a meta key to use with emacs. What do I need to put in my .Xmodmap file to set my right control key to whatever emacs sees as the meta key (keeping my left control as is)?
Yes, but would emacs see a difference? It is the default value of what your emacs currently sees, I don't know if it will work but it is worth a try.
Edit: Nevermind me, I'm just a little slow today.
xmodmap -e "keysym Control_R = Control_R Meta_L"
something to that effect...I wouldn't recommend trying that code, read this instead. That appears to work for me. I got that code from the xmodmap listing, just typing xmodmap. I don't know, though, I'm in over my head, I don't use emacs (I use vi) so I can't test it
% cat ~/.Xmodmap
!Right Alt key is used to Meta key
keysym Mode_switch = Escape
keysym Meta_R = Escape
Just another option, since it might be easier to migrate to Alt on the same side, rather than Control on the other side. HTH
Last edited by flower.Hercules; 10-02-2005 at 12:22 PM.
Hmm, it gives errors when I try the lines above, but I looked through the documentation some more and tried something else. It looks like the key code for Control_R is 97. I put the following in .Xmodmap:
keycode 97 = Meta_L
However, Control_R continues to be treated as a control key. I tried playing with the values of mod1, mod4, etc., but nothing seemed to work. It seems like the problem is with what emacs will consider a Meta key, but I can't figure out anything that will make this work. Any other ideas?
You're welcome, and I'm inviting you to learn more
That solution accomplished more than I'd done before, but still doesn't quite work. The problem is, I have Fluxbox set up to have mod1 be the modifier used in most key bindings. If I make your changes and then do Ctrl-t, it is interpreted as what I normally do as Alt-t (also bound to mod1), which opens a terminal window. The way I understood it from poking around online, emacs just needs a key to be designated Meta without having any modifier bindings to work, but it doesn't seem to for me.
Well, you could put the left alt key in mod3 (it is empty in my xmodmap) and replace all mod1's in your Fluxbox configuration with mod3, that shouldn't change any functionality, just how it works under the hood, it's a patch job; I haven't given up I will see what I can come up with.
Edit: However, you may like this solution better...I hope it doesn't bugger anything else, Emacs, when it came about, as you've probably read, heavily used meta-keys, some keyboards didn't have them, so the author added the ability to use the Escape key...so
The problem with the escape solution is that, when using that method, you press and release escape, then press the key, rather than the normal method of doing keystrokes. I'll try rearranging all the modifiers though and see if that does the trick.
I knew it couldn't be that simple However, the binding of Control_R to Escape does seem to work as a Keystroke pressing Control_R and A returns me to the first line of the working paragraph; this is as far as my Emacs knowledge goes, do you have a specific keystroke that you are using that gives you faulty behavior?
Last edited by flower.Hercules; 10-02-2005 at 08:36 PM.
I moved all the modifiers around and Control_R now acts as escape. If I just press Control_R, "ESC-" appears at the bottom of the screen. I've been trying C-v and M-v, but M-v won't work unless I release Control_R before pressing v (that is, it's acting as escape, not meta).