[racket] Alt/Option key as meta on Mac

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Aug 15 11:12:26 EDT 2010

There's not currently a way to map Option to Meta.

The main obstacle in the current implementation is the way that keyword
events are decoded. When the Command key is pressed, the GUI layer asks
for interpretations of the event with and without considering the
Option key --- so that Cmd-Option-P can be recognized that way, for
example, instead of only as Cmd-Option-<pi>. When just Option is
pressed, though, currently the GUI layer doesn't ask for alternates.
The reason for not asking with just Option has something to do with the
behavior of key sequences, such as Option-e followed by e to get
<e-with-accent>.

We're in the process of rewriting the GUI layer on top of Cocoa, and
that will solve the main problem; Cocoa's event object provides an
unmodified interpretation (along with the normal one) for each key
event. Since we're hoping to move to the GUI rewriting within a few
months, I'd prefer to wait until then to try to add support for Option
as Meta.

At Thu, 12 Aug 2010 16:28:49 -0400, Charles Rich wrote:
> Hi, I tried searching the archives for an answer, but without success:
> 
> Ss there a way to make the alt/option key on a Mac function
> as an Emacs meta key?   The current default is for the cmd/apple key
> to be the meta key, which is not the same as the default for Emacs
> (Aquamacs) on the Mac.
> 
> If I turn that off the option under Editing > General, the meta
> functionality does not switch to the alt/option key.   I also tried
> playing with the Enable Keybindings in Menus option, but that did not
> seem to have an effect.
> 
> Thanks, -CR
> 
> -- 
> Dr. Charles Rich, Professor of Computer Science
> Interactive Media and Game Development
> Worcester Polytechnic Institute, Fuller Laboratories B25b
> 100 Institute Road, Worcester, MA 01609-2280
> 
> Email: rich at wpi.edu   Phone: 508-831-5945   Fax: 508-831-5776
> Home: http://www.cs.wpi.edu/~rich
> _________________________________________________
>   For list-related administrative tasks:
>   http://lists.racket-lang.org/listinfo/users


Posted on the users mailing list.