emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Mac: modifier key remapping revised [patch]


From: David Reitter
Subject: Mac: modifier key remapping revised [patch]
Date: Mon, 18 Apr 2005 18:02:59 +0100

Hi,

the current state of affairs makes it difficult to map the standard Mac modifier keys (Ctrl, Option, Command) to Emacs modifiers.

At this point, the default is that the command key is Meta, but by setting mac-command-key-is-meta to nil, one can map Option to Meta. An additional variable, mac-reverse-ctrl-meta, allows to swap Ctrl and (whatever is) Meta. Finally, a patch introduced in November last year allows us to map Option to whatever (e.g. Hyper or Meta) via the variable mac-option-modifier.

This is complicated, and in effect does not allow me to map, for example Command to Hyper, which makes a lot of sense if you want to assign something to Command-X, without overriding M-x (or A-x) and without consequences for the choice of Option.

Therefore I suggest to a) deprecate mac-command-key-is-meta and mac-reverse-ctrl-meta, and b) introduce mac-control-modifier and mac-command-modifier which allow, analogous to the recent mac-option-modifier, free mapping of the modifier keys.

All of a sudden, the modifier key business becomes simple and straightforward:

(setq mac-option-modifier 'meta)
(setq mac-control-modifier 'ctrl)
(setq mac-command-modifier 'hyper)

In order to preserve backwards-compatibility, the two deprecated variables remain in effect unless at least one of the above mac-*-modifier variables is set to non-nil. Problems should only occur if somebody uses the old mac-option-modifier in combination with the deprecated variables; but the option variable has been introduced only recently and hasn't seen significant uptake yet (google it!).

The attached patch implements this behavior, it applies against today's catch (of macterm.c).

Attachment: mac-modifier-keys.new.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]