MacOSX German Emacs keys

I've tried now up to 4 different Emacs on my german MacBook Air, and finally it looks like I can manage. Aquamacs is the best so far.

  1. xemacs my first choice as I use it everywhere else. looks awful, intolerable

  2. emacs-23.3 from ports +x11 in various flavors. Tried for 3 months. Together with TextMate, Padre, and even Eclipse. Eclipse was best and fastest, but I want an emacs as everywhere else.

  3. emacs-23.3 +cocoa patch Tried for one month.

  4. Emacs.App from ports Native cocoa patch, but german keys do not work. At all. /Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs

  5. Aquamacs This is it! Like my XEmacs on Windows and emacs on unices. See also http://www.emacswiki.org/emacs/AquamacsFAQ#toc5 And with the following key settings I can finally type my programs.

.emacs

(when (eq system-type 'darwin) 
    (global-set-key (kbd "M-7") "|")
    (global-set-key (kbd "M-8") "{")
    (global-set-key (kbd "M-9") "}")
    (global-set-key (kbd "M-ΓΌ") "[")
    (global-set-key (kbd "M-+") "]")
    (global-set-key (kbd "C--") "\\")

/Applications/Aquamacs.app/Contents/MacOS/Aquamacs

~/bin/edit

#!/bin/sh
#if test -n "$(pgrep Emacs)"; then
#  /Applications/MacPorts/Emacs.app/Contents/MacOS/bin/emacsclient $*
#else
#  /Applications/MacPorts/Emacs.app/Contents/MacOS/Emacs $*
#fi
if test -n "$(pgrep Aquamacs)"; then
  /Applications/Aquamacs.app/Contents/MacOS/bin/emacsclient $*
else
  /Applications/Aquamacs.app/Contents/MacOS/Aquamacs $*
fi

The Problem

On the german keyboard there are no easy accessible {} | \ [] keys.

With native Cocoa apps you can use KeyRemap4MacBook and select some settings from "For German" to reach these keys.

Emacs, even Cocoa apps such the last three, bypasses the hooks. But with the .emacs workarounds and Aquamacs I can now live with it.

Leave a comment

About Reini Urban

user-pic Working at cPanel on B::C (the perl-compiler), p2, types, parrot, B::Generate, cygwin perl and more guts (LLVM, jit, optimizations).