Search code examples
macosemacskeyboardterminal

OS X Terminal: Meta key + alt functionality at the same time


Is there a way to use an alt / option key as a meta key but still be able to use it to make some characters which need it?

For example, in my local keyboard layout:

  • @ is alt + 2
  • \ is alt + shift + 7
  • | is alt + 7
  • etc.

So, if I set alt as a meta key, I can't make those characters anymore. On the other hand, using "press esc, release esc, press a key" to make meta key sequences makes my hands hurt.

Any Emacs users with international keyboards who have solved this, please give any tips you might have! :)

Edit:

It appears that I can set alt as a meta key and then add these kind of settings in inputrc: "\e2": "@" This works in the bash shell but it still won't work with Emacs though, so no good.


Solution

  • Think about using a full featured Emacs for Mac OS X. I use Carbon Emacs but I believe others (say Aqua Emacs or X11 Emacs) would do the trick.

    If you insist on using Emacs in a terminal you can use the C-x 8 prefix as a compose key. Try C-x 8 C-h to get a list of possibilities.

    See http://www.emacswiki.org/emacs/EmacsForMacOS