• You are not logged in.

    Move control key on emacs and GNU/Linux

    • Started by trombonechamp
    • 4 Replies:
    • Reputation: 0
    • Registered: 01-Jul-2010
    • Posts: 1

    Hello!  I recently decided to switch to Colemak, however I am having a problem with emacs.  In the past, I had my alt keys mapped to ctrl keys, and my windows key mapped to alt.  (It was an option in the KDE i18n section.)  This allowed me to access ctrl in emacs with my thumb.  However, after switching to a Colemak layout, my computer decided to remap the right alt (the one I usually use) to this dead-key AltGr garbage.  Is there any way to make my alt key act like a ctrl key again?

    Thanks,

    Offline
    • 0
    • Reputation: 214
    • From: Viken, Norway
    • Registered: 13-Dec-2006
    • Posts: 5,361

    As long as you persist in your pointlessly belligerent practice of referting to the useful (and to me even quite necessary) AltGr key as 'garbage', see how much help you'll get from me... bigot.

    However, I will answer your question: Yes. Yes, there is.

    *** Learn Colemak in 2–5 steps with Tarmak! ***
    *** Check out my Big Bag of Keyboard Tricks for Win/Linux/TMK... ***

    Offline
    • 0
    • Reputation: 0
    • Registered: 09-Oct-2009
    • Posts: 23

    You should stop relying on the tools of your desktop environment (KDE) and learn to use setxkbmap and xmodmap.
    Read the manpages.

    ``Common sense is nothing more than a deposit of prejudices laid down by the mind before you reach eighteen.''
    ~ Albert Einstein

    Offline
    • 0
    • Reputation: 23
    • From: Belgium
    • Registered: 26-Feb-2008
    • Posts: 482

    The Colemak layout maps the Alt_R key to ISO_Level3_Shift (which is the AltGr functionality switching to a 3rd "plane" of the keyboard layout), and that probably overrules any options you set via KDE or setxkbmap (which basically make the same calls to X11).  Two options:

    - locate your X11 symbols directory, edit the "us" file and comment out the following line in the Colemak section: include "level3(ralt_switch)"
    - use xmodmap to override specific keys after the standard keymaps have been loaded (by KDE or setxkbmap).  untested but it will look like:

    keysym Alt_R = Control_R
    add Control = Control_R
    Offline
    • 0
    • Reputation: 0
    • Registered: 03-Jul-2009
    • Posts: 189
    DreymaR said:

    ... the useful (and to me even quite necessary) AltGr key ...

    DreymaR, do you have Alt on both sides of your keyboard, or Alt on the left side and AltGr on the right one?

    Dvorak typist here.  Please take my comments with a grain of salt.

    Offline
    • 0