emacs keymap: how to swap right alt and right control for virtual terminal ?
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.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
emacs keymap: how to swap right alt and right control for virtual terminal ?
My emacs 23 is running on Ubuntu 10.04 and I am very a emacs primer. Please tell me:
in virtual terminals, how can I remap keys to swap the right alt key and the right ctrl key automatically every time the machine starts up? Thank you.
My current hack is as following:
1:
When I start up my system every time, I run this bash script.
#!/bin/bash -
if [ -f ~/.xmodmaprc/xmodmaprc_R ];
then
xmodmap ~/.xmodmaprc/xmodmaprc_R
emacs -q -bg lightgreen -fg black -fh -fw 2> /dev/null
fi
2:
And my ~/.xmodmaprc/xmodmaprc_R file is like this.
!
! swap Alt_R and Control_R
!
remove mod1 = Alt_R
remove control = Control_R
keysym Control_R = Alt_R
keysym Alt_R = Control_R
add mod1 = Alt_R
add control = Control_R
By the way, I know how to swap CapsLK and Ctrl on the left side of keyboard in this way:
Open /etc/kdb/remap file in Ubuntu 10.04 and append below 2 lines to this file. And in this way I can swap Caps_Lock and Control in virtual terminal.
s/keycode *58 = Caps_Lock/keycode 58 = Control/;
s/keycode *29 = Control/keycode 29 = Caps_Lock/;
But how to swap Alt and Ctrl on the right side?
Last edited by hillgreen; 01-14-2011 at 06:48 AM.
Reason: To specify it.
I think you need to watch out for clicking the "Report" button instead of "Quote" the button. Your report of xandercage17's post only makes sense if it was an accident. Furthermore, I looked at the posted links & they seem appropriate. If they don't work for you, please be more specific about how & why they don't work for you, that would help us refine our suggestions for you.
Note & warning
I haven't used Emacs since the CP/M version on my Kaypro 10 in 1984.
xandercage17,
What portion of your post did you want to make Silver?
Thanks for fixing the "silver thing"
Last edited by archtoad6; 01-16-2011 at 07:36 AM.
Reason: no new post needed
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.