Women in Technology

Hear us Roar

Subject:   Emacs: Meta-Control, how to do it in Terminal?
Date:   2006-11-23 21:27:14
From:   fluxion
Response to: Emacs: Meta-Control, how to do it in Terminal?

A very kind person wrote this:

I found a way to switch which key Mac OS X recognizes as meta. First, uncheck the “Use the system keyboard layout” option in X11 preferences. Then, create the file ~/.Xmodmap and insert the following six lines:

clear Mod1
clear Mod2
keycode 63 = Mode_switch
keycode 66 = Meta_L
add Mod1 = Meta_L
add Mod2 = Mode_switch

It clears the keymappings for alt and escape and then reassigns them to the reverse of what they were before. Restart X11 and it should pick up the changes.

source: http://snier.com/archives/2006/10/05/redefine-the-x11-meta-key-in-mac-os-x/

Full Threads Oldest First

Showing messages 1 through 4 of 4.

  • Emacs: Meta-Control, how to do it in Terminal?
    2007-09-02 15:03:00  Antonio666 [View]

    I don't think that the question was about anything under X11... It's about Terminal.app, which is not an X11 application.

    I also have been very frustrating by its inability to send the Control+Meta combination. As far as I can tell, there isn't a *single* terminal emulator that runs under OSX capable of sending it. My everyday work requires me to use a console emacs through an ssh connection, so being able to type it is very important. (The alternative is to a highly unergonomic need to press ESC every other keystroke!).

    If anyone figures out a fix, I'd *love* to hear it!



    [In the meantime, I'll try that X11 trick. It might be the next best thing...]

    • Emacs: Meta-Control, how to do it in Terminal?
      2007-10-05 02:19:56  aguest [View]

      You can try pressing "Esc" then Control-anotherkey, it's cumbersome but should work.

      If you look with Google you should find some config examples where are redefine a lot (all?) of terminal keys combinations (and the equivalent binding inside Emacs), but i don't recall if Meta-Control could be flawlessly integrated...
      • Emacs: Meta-Control, how to do it in Terminal?
        2008-06-18 19:47:35  denalilumma [View]

        Hi There,

        You need to configure the mac 'terminal' application so the 'alt / option' key sends 'meta'. In order to do this, go to:

        Terminal > Preferences > Settings > Keyboard

        and select the 'Use option as meta key' checkbox at the bottom of the window.

        I hope that helps,

        • Emacs: Meta-Control, how to do it in Terminal?
          2009-01-26 17:49:12  chompx [View]

          Dude. You rock. Thx.