* Mac: modifier key remapping revised [patch]
@ 2005-04-18 17:02 David Reitter
2005-05-02 17:56 ` Daniel Brockman
0 siblings, 1 reply; 7+ messages in thread
From: David Reitter @ 2005-04-18 17:02 UTC (permalink / raw)
[-- Attachment #1: Type: text/plain, Size: 1695 bytes --]
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 #2: mac-modifier-keys.new.patch --]
[-- Type: application/octet-stream, Size: 7917 bytes --]
Index: macterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macterm.c,v
retrieving revision 1.111
diff -r1.111 macterm.c
89,91c89,99
< /* Set of macros that handle mapping of Mac modifier keys to emacs. */
< #define macCtrlKey (NILP (Vmac_reverse_ctrl_meta) ? controlKey : \
< (NILP (Vmac_command_key_is_meta) ? optionKey : cmdKey))
---
> /* Set of macros that handle mapping of Mac modifier keys to emacs.
> If any of the newer-style mac_*_modifier variables is set, these macros are basically out of function,
> they just map to the normal keys - except for Meta, which is then (ESC or) command-control-option.
> */
>
> #define macOldModifierSetting ( NILP(Vmac_control_modifier) && NILP(Vmac_option_modifier) && NILP(Vmac_command_modifier) )
>
> #define macCtrlKey (macOldModifierSetting ? \
> (NILP(Vmac_reverse_ctrl_meta) ? controlKey : \
> (NILP(Vmac_command_key_is_meta) ? optionKey : cmdKey)) : \
> controlKey)
93,96c101,109
< #define macMetaKey (NILP (Vmac_reverse_ctrl_meta) ? \
< (NILP (Vmac_command_key_is_meta) ? optionKey : cmdKey) \
< : controlKey)
< #define macAltKey (NILP (Vmac_command_key_is_meta) ? cmdKey : optionKey)
---
>
> #define macMetaKey (macOldModifierSetting ? \
> (NILP(Vmac_reverse_ctrl_meta) ? \
> (NILP(Vmac_command_key_is_meta) ? optionKey : cmdKey) : controlKey) : \
> (cmdKey | controlKey | optionKey))
>
> #define macAltKey (macOldModifierSetting ? (NILP(Vmac_command_key_is_meta) ? cmdKey : optionKey) : optionKey)
>
> #define macCmdKey (cmdKey)
98a112
>
241c255
< static Lisp_Object Qalt, Qhyper, Qsuper, Qmodifier_value;
---
> static Lisp_Object Qalt, Qhyper, Qsuper, Qctrl, Qmeta, Qmodifier_value;
7195c7209,7210
< /* True if using command key as meta key. */
---
> /* True if using command key as meta key.
> Deprecated; only use if macOldModifierSetting evaluates to true. */
7197a7213,7215
> /* Modifier associated with the control key, or nil for normal behavior. */
> Lisp_Object Vmac_control_modifier;
>
7201c7219,7223
< /* True if the ctrl and meta keys should be reversed. */
---
> /* Modifier associated with the command key, or nil for normal behavior. */
> Lisp_Object Vmac_command_modifier;
>
> /* True if the ctrl and meta keys should be reversed.
> Deprecated; only use if macOldModifierSetting evaluates to true. */
7276,7284c7298,7313
< if (mods & macCtrlKey)
< result |= ctrl_modifier;
< if (mods & macMetaKey)
< result |= meta_modifier;
< if (NILP (Vmac_command_key_is_meta) && (mods & macAltKey))
< result |= alt_modifier;
< if (!NILP (Vmac_option_modifier) && (mods & optionKey)) {
< Lisp_Object val = Fget(Vmac_option_modifier, Qmodifier_value);
< if (!NILP(val))
---
>
> if (macOldModifierSetting) /* compatibility with old-style modifier keys */
> {
> if (mods & macCtrlKey)
> result |= ctrl_modifier;
> if (mods & macMetaKey)
> result |= meta_modifier;
>
> if ( NILP (Vmac_command_key_is_meta) && (mods & macAltKey) )
> result |= alt_modifier;
> } else
> {
> /* new-style modifier keys */
> if (!NILP (Vmac_option_modifier) && (mods & optionKey)) {
> Lisp_Object val = Fget(Vmac_option_modifier, Qmodifier_value);
> if (!NILP(val))
7286c7315,7335
< }
---
> } else { /* default behavior if modifier variable is not set */
> if (mods & macAltKey)
> result |= alt_modifier;
> }
> if (!NILP (Vmac_command_modifier) && (mods & cmdKey)) {
> Lisp_Object val = Fget(Vmac_command_modifier, Qmodifier_value);
> if (!NILP(val))
> result |= XUINT(val);
> } else { /* default behavior if modifier variable is not set: assign hyper*/
> if (mods & macCmdKey)
> result |= hyper_modifier;
> }
> if (!NILP (Vmac_control_modifier) && (mods & controlKey)) {
> Lisp_Object val = Fget(Vmac_control_modifier, Qmodifier_value);
> if (!NILP(val))
> result |= XUINT(val);
> } else { /* default behavior if modifier variable is not set */
> if (mods & macCtrlKey)
> result |= ctrl_modifier;
> }
> }
9059,9061c9108,9110
< if (er.modifiers & (controlKey |
< (NILP (Vmac_command_key_is_meta) ? optionKey
< : cmdKey)))
---
> if (er.modifiers & (controlKey |
> ((macOldModifierSetting && NILP (Vmac_command_key_is_meta)) ?
> optionKey : cmdKey)))
9078,9079c9127,9128
< else if (!NILP (Vmac_option_modifier)
< && (er.modifiers & optionKey))
---
> else if (!macOldModifierSetting
> && (er.modifiers & (optionKey | controlKey | cmdKey) ))
9081c9130
< /* When using the option key as an emacs modifier,
---
> /* When using a key as an emacs modifier,
9083,9084c9132,9138
< without the Mac option modifier applied. */
< int new_modifiers = er.modifiers & ~optionKey;
---
> without the Mac modifier applied.
>
> Could we do something like
> new_modifiers = er.modifiers & shiftKey
> instead?
> */
> int new_modifiers = er.modifiers & ~controlKey & ~optionKey & ~cmdKey;
9090,9092c9144,9146
< }
< else
< inev.code = er.message & charCodeMask;
---
> } else
> inev.code = er.message & charCodeMask;
>
9096c9150
<
---
>
9789a9844,9847
> Qctrl = intern ("ctrl");
> Fput (Qctrl, Qmodifier_value, make_number (ctrl_modifier));
> Qmeta = intern ("meta");
> Fput (Qmeta, Qmodifier_value, make_number (meta_modifier));
9839a9898,9900
> /* Deprecated variables to configure modifier key assignment.
> Retained for backward-compatibility. */
>
9842c9903,9904
< Otherwise the option key is used. */);
---
> Otherwise the option key is used. This variable is DEPRECATED.
> It is only in effect if all of the variables mac-*-modifier are nil. */);
9843a9906,9923
>
> DEFVAR_LISP ("mac-reverse-ctrl-meta", &Vmac_reverse_ctrl_meta,
> doc: /* Non-nil means that the control and meta keys are reversed. This is
> useful for non-standard keyboard layouts. This variable is DEPRECATED.
> It is only in effect if none of the variables mac-*-modifier is non-nil. */);
> Vmac_reverse_ctrl_meta = Qnil;
>
>
> /* Variables to configure modifier key assignment. */
>
> DEFVAR_LISP ("mac-control-modifier", &Vmac_control_modifier,
> doc: /* Modifier to use for the Mac control key. The value can
> be alt, hyper, or super for the respective modifier. If the value is
> nil then the key will act as the normal Mac control modifier. However, if all
> values of mac-{command|control|option}-modifier are nil, the deprecated
> default assignment determined by mac-command-key-is-meta and
> mac-reverse-ctrl-meta is used. */);
> Vmac_control_modifier = Qnil;
9848c9928,9931
< nil then the key will act as the normal Mac option modifier. */);
---
> nil then the key will act as the normal Mac option modifier. However, if all
> values of mac-{command|control|option}-modifier are nil, the deprecated
> default assignment determined by mac-command-key-is-meta and
> mac-reverse-ctrl-meta is used. */);
9851,9854c9934,9941
< DEFVAR_LISP ("mac-reverse-ctrl-meta", &Vmac_reverse_ctrl_meta,
< doc: /* Non-nil means that the control and meta keys are reversed. This is
< useful for non-standard keyboard layouts. */);
< Vmac_reverse_ctrl_meta = Qnil;
---
> DEFVAR_LISP ("mac-command-modifier", &Vmac_command_modifier,
> doc: /* Modifier to use for the Mac command key. The value can
> be alt, hyper, or super for the respective modifier. If the value is
> nil then the key will act as the normal Mac option modifier. However, if all
> values of mac-{command|control|option}-modifier are nil, the deprecated
> default assignment determined by mac-command-key-is-meta and
> mac-reverse-ctrl-meta is used. */);
> Vmac_command_modifier = Qnil;
[-- Attachment #3: Type: text/plain, Size: 142 bytes --]
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Mac: modifier key remapping revised [patch]
2005-04-18 17:02 Mac: modifier key remapping revised [patch] David Reitter
@ 2005-05-02 17:56 ` Daniel Brockman
2005-05-02 21:25 ` David Reitter
0 siblings, 1 reply; 7+ messages in thread
From: Daniel Brockman @ 2005-05-02 17:56 UTC (permalink / raw)
Cc: David Reitter
David Reitter <david.reitter@gmail.com> writes:
> 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.
This sounds sensible to me.
[snip]
> The attached patch implements this behavior, it applies against
> today's catch (of macterm.c).
Maybe try formatting your code according to the GNU coding standards,
and then resend your patch as a context diff. That might make more
people consider it.
--
Daniel Brockman <daniel@brockman.se>
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Mac: modifier key remapping revised [patch]
2005-05-02 17:56 ` Daniel Brockman
@ 2005-05-02 21:25 ` David Reitter
2005-05-03 4:56 ` Harald Maier
2005-05-03 15:28 ` Stefan Monnier
0 siblings, 2 replies; 7+ messages in thread
From: David Reitter @ 2005-05-02 21:25 UTC (permalink / raw)
Since Daniel Brockman suggested that I repost this patch in context
format, there we go. It applies to the current version. Steven Tamm
suggested a while ago that the 'fn' key (on Powerbook keyboards left of
the ctrl key) be included, and I think this would be a very neat idea
for someone to do.
Index: macterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macterm.c,v
retrieving revision 1.113
diff -c -r1.113 macterm.c
*** macterm.c 24 Apr 2005 06:06:39 -0000 1.113
--- macterm.c 2 May 2005 20:47:24 -0000
***************
*** 86,101 ****
#include "composite.h"
#include "coding.h"
! /* Set of macros that handle mapping of Mac modifier keys to emacs.
*/
! #define macCtrlKey (NILP (Vmac_reverse_ctrl_meta) ? controlKey : \
! (NILP (Vmac_command_key_is_meta) ? optionKey : cmdKey))
#define macShiftKey (shiftKey)
! #define macMetaKey (NILP (Vmac_reverse_ctrl_meta) ? \
! (NILP (Vmac_command_key_is_meta) ? optionKey : cmdKey) \
! : controlKey)
! #define macAltKey (NILP (Vmac_command_key_is_meta) ? cmdKey :
optionKey)
#define mac_window_to_frame(wp) (((mac_output *) GetWRefCon
(wp))->mFP)
\f
/* Non-nil means Emacs uses toolkit scroll bars. */
--- 86,115 ----
#include "composite.h"
#include "coding.h"
! /* Set of macros that handle mapping of Mac modifier keys to emacs.
! If any of the newer-style mac_*_modifier variables is set, these
macros are basically out of function,
! they just map to the normal keys - except for Meta, which is then
(ESC or) command-control-option.
! */
!
! #define macOldModifierSetting ( NILP(Vmac_control_modifier) &&
NILP(Vmac_option_modifier) && NILP(Vmac_command_modifier) )
!
! #define macCtrlKey (macOldModifierSetting ? \
! (NILP(Vmac_reverse_ctrl_meta) ? controlKey : \
! (NILP(Vmac_command_key_is_meta) ? optionKey : cmdKey)) : \
! controlKey)
#define macShiftKey (shiftKey)
!
! #define macMetaKey (macOldModifierSetting ? \
! (NILP(Vmac_reverse_ctrl_meta) ? \
! (NILP(Vmac_command_key_is_meta) ? optionKey : cmdKey) :
controlKey) : \
! (cmdKey | controlKey | optionKey))
!
! #define macAltKey (macOldModifierSetting ?
(NILP(Vmac_command_key_is_meta) ? cmdKey : optionKey) : optionKey)
!
! #define macCmdKey (cmdKey)
#define mac_window_to_frame(wp) (((mac_output *) GetWRefCon
(wp))->mFP)
+
\f
/* Non-nil means Emacs uses toolkit scroll bars. */
***************
*** 238,244 ****
/* The keysyms to use for the various modifiers. */
! static Lisp_Object Qalt, Qhyper, Qsuper, Qmodifier_value;
static Lisp_Object Qvendor_specific_keysyms;
--- 252,258 ----
/* The keysyms to use for the various modifiers. */
! static Lisp_Object Qalt, Qhyper, Qsuper, Qctrl, Qmeta,
Qmodifier_value;
static Lisp_Object Qvendor_specific_keysyms;
***************
*** 7113,7125 ****
/* Contains the string "reverse", which is a constant for mouse
button emu.*/
Lisp_Object Qreverse;
! /* True if using command key as meta key. */
Lisp_Object Vmac_command_key_is_meta;
/* Modifier associated with the option key, or nil for normal
behavior. */
Lisp_Object Vmac_option_modifier;
! /* True if the ctrl and meta keys should be reversed. */
Lisp_Object Vmac_reverse_ctrl_meta;
/* True if the option and command modifiers should be used to emulate
--- 7127,7147 ----
/* Contains the string "reverse", which is a constant for mouse
button emu.*/
Lisp_Object Qreverse;
! /* True if using command key as meta key.
! Deprecated; only use if macOldModifierSetting evaluates to true. */
Lisp_Object Vmac_command_key_is_meta;
+ /* Modifier associated with the control key, or nil for normal
behavior. */
+ Lisp_Object Vmac_control_modifier;
+
/* Modifier associated with the option key, or nil for normal
behavior. */
Lisp_Object Vmac_option_modifier;
! /* Modifier associated with the command key, or nil for normal
behavior. */
! Lisp_Object Vmac_command_modifier;
!
! /* True if the ctrl and meta keys should be reversed.
! Deprecated; only use if macOldModifierSetting evaluates to true. */
Lisp_Object Vmac_reverse_ctrl_meta;
/* True if the option and command modifiers should be used to emulate
***************
*** 7194,7210 ****
unsigned int result = 0;
if (mods & macShiftKey)
result |= shift_modifier;
! if (mods & macCtrlKey)
! result |= ctrl_modifier;
! if (mods & macMetaKey)
! result |= meta_modifier;
! if (NILP (Vmac_command_key_is_meta) && (mods & macAltKey))
! result |= alt_modifier;
! if (!NILP (Vmac_option_modifier) && (mods & optionKey)) {
! Lisp_Object val = Fget(Vmac_option_modifier, Qmodifier_value);
! if (!NILP(val))
result |= XUINT(val);
! }
return result;
}
--- 7216,7259 ----
unsigned int result = 0;
if (mods & macShiftKey)
result |= shift_modifier;
!
! if (macOldModifierSetting) /* compatibility with old-style
modifier keys */
! {
! if (mods & macCtrlKey)
! result |= ctrl_modifier;
! if (mods & macMetaKey)
! result |= meta_modifier;
!
! if ( NILP (Vmac_command_key_is_meta) && (mods & macAltKey) )
! result |= alt_modifier;
! } else
! {
! /* new-style modifier keys */
! if (!NILP (Vmac_option_modifier) && (mods & optionKey)) {
! Lisp_Object val = Fget(Vmac_option_modifier, Qmodifier_value);
! if (!NILP(val))
result |= XUINT(val);
! } else { /* default behavior if modifier variable is not set */
! if (mods & macAltKey)
! result |= alt_modifier;
! }
! if (!NILP (Vmac_command_modifier) && (mods & cmdKey)) {
! Lisp_Object val = Fget(Vmac_command_modifier, Qmodifier_value);
! if (!NILP(val))
! result |= XUINT(val);
! } else { /* default behavior if modifier variable is not set:
assign hyper*/
! if (mods & macCmdKey)
! result |= hyper_modifier;
! }
! if (!NILP (Vmac_control_modifier) && (mods & controlKey)) {
! Lisp_Object val = Fget(Vmac_control_modifier, Qmodifier_value);
! if (!NILP(val))
! result |= XUINT(val);
! } else { /* default behavior if modifier variable is not set */
! if (mods & macCtrlKey)
! result |= ctrl_modifier;
! }
! }
return result;
}
***************
*** 9029,9037 ****
}
else
{
! if (er.modifiers & (controlKey |
! (NILP (Vmac_command_key_is_meta) ? optionKey
! : cmdKey)))
{
/* This code comes from Keyboard Resource,
Appendix C of IM - Text. This is necessary
--- 9078,9087 ----
}
else
{
! if (er.modifiers & (controlKey |
! ((macOldModifierSetting &&
! NILP (Vmac_command_key_is_meta)) ?
! optionKey : cmdKey)))
{
/* This code comes from Keyboard Resource,
Appendix C of IM - Text. This is necessary
***************
*** 9048,9072 ****
inev.code = KeyTranslate (kchr_ptr, new_keycode,
&some_state) & 0xff;
}
! else if (!NILP (Vmac_option_modifier)
! && (er.modifiers & optionKey))
{
! /* When using the option key as an emacs modifier,
convert the pressed key code back to one
! without the Mac option modifier applied. */
! int new_modifiers = er.modifiers & ~optionKey;
int new_keycode = keycode | new_modifiers;
Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache);
unsigned long some_state = 0;
inev.code = KeyTranslate (kchr_ptr, new_keycode,
&some_state) & 0xff;
! }
! else
inev.code = er.message & charCodeMask;
inev.kind = ASCII_KEYSTROKE_EVENT;
}
}
!
#if USE_CARBON_EVENTS
inev.modifiers = mac_event_to_emacs_modifiers (eventRef);
#else
--- 9098,9127 ----
inev.code = KeyTranslate (kchr_ptr, new_keycode,
&some_state) & 0xff;
}
! else if (!macOldModifierSetting
! && (er.modifiers & (optionKey | controlKey | cmdKey) ))
{
! /* When using a key as an emacs modifier,
convert the pressed key code back to one
! without the Mac modifier applied.
!
! Could we do something like
! new_modifiers = er.modifiers & shiftKey
! instead?
! */
! int new_modifiers = er.modifiers & ~controlKey & ~optionKey &
~cmdKey;
int new_keycode = keycode | new_modifiers;
Ptr kchr_ptr = (Ptr) GetScriptManagerVariable (smKCHRCache);
unsigned long some_state = 0;
inev.code = KeyTranslate (kchr_ptr, new_keycode,
&some_state) & 0xff;
! } else
inev.code = er.message & charCodeMask;
+
inev.kind = ASCII_KEYSTROKE_EVENT;
}
}
!
#if USE_CARBON_EVENTS
inev.modifiers = mac_event_to_emacs_modifiers (eventRef);
#else
***************
*** 9760,9765 ****
--- 9815,9824 ----
#if TARGET_API_MAC_CARBON
init_required_apple_events ();
+ Qctrl = intern ("ctrl");
+ Fput (Qctrl, Qmodifier_value, make_number (ctrl_modifier));
+ Qmeta = intern ("meta");
+ Fput (Qmeta, Qmodifier_value, make_number (meta_modifier));
#if USE_CARBON_EVENTS
#ifdef MAC_OSX
init_service_handler ();
***************
*** 9810,9815 ****
--- 9869,9877 ----
#ifdef MAC_OSX
Fprovide (intern ("mac-carbon"), Qnil);
#endif
+ /* Deprecated variables to configure modifier key assignment.
+ Retained for backward-compatibility. */
+
staticpro (&Qreverse);
Qreverse = intern ("reverse");
***************
*** 9846,9864 ****
DEFVAR_LISP ("mac-command-key-is-meta", &Vmac_command_key_is_meta,
doc: /* Non-nil means that the command key is used as the Emacs
meta key.
! Otherwise the option key is used. */);
Vmac_command_key_is_meta = Qt;
DEFVAR_LISP ("mac-option-modifier", &Vmac_option_modifier,
doc: /* Modifier to use for the Mac alt/option key. The value can
be alt, hyper, or super for the respective modifier. If the value is
! nil then the key will act as the normal Mac option modifier. */);
Vmac_option_modifier = Qnil;
! DEFVAR_LISP ("mac-reverse-ctrl-meta", &Vmac_reverse_ctrl_meta,
! doc: /* Non-nil means that the control and meta keys are
reversed. This is
! useful for non-standard keyboard layouts. */);
! Vmac_reverse_ctrl_meta = Qnil;
DEFVAR_LISP ("mac-emulate-three-button-mouse",
&Vmac_emulate_three_button_mouse,
--- 9908,9952 ----
DEFVAR_LISP ("mac-command-key-is-meta", &Vmac_command_key_is_meta,
doc: /* Non-nil means that the command key is used as the Emacs
meta key.
! Otherwise the option key is used. This variable is DEPRECATED.
! It is only in effect if all of the variables mac-*-modifier are nil.
*/);
Vmac_command_key_is_meta = Qt;
+
+ DEFVAR_LISP ("mac-reverse-ctrl-meta", &Vmac_reverse_ctrl_meta,
+ doc: /* Non-nil means that the control and meta keys are
reversed. This is
+ useful for non-standard keyboard layouts. This variable is DEPRECATED.
+ It is only in effect if none of the variables mac-*-modifier is
non-nil. */);
+ Vmac_reverse_ctrl_meta = Qnil;
+
+
+ /* Variables to configure modifier key assignment. */
+
+ DEFVAR_LISP ("mac-control-modifier", &Vmac_control_modifier,
+ doc: /* Modifier to use for the Mac control key. The value can
+ be alt, hyper, or super for the respective modifier. If the value is
+ nil then the key will act as the normal Mac control modifier.
However, if all
+ values of mac-{command|control|option}-modifier are nil, the
deprecated
+ default assignment determined by mac-command-key-is-meta and
+ mac-reverse-ctrl-meta is used. */);
+ Vmac_control_modifier = Qnil;
DEFVAR_LISP ("mac-option-modifier", &Vmac_option_modifier,
doc: /* Modifier to use for the Mac alt/option key. The value can
be alt, hyper, or super for the respective modifier. If the value is
! nil then the key will act as the normal Mac option modifier. However,
if all
! values of mac-{command|control|option}-modifier are nil, the
deprecated
! default assignment determined by mac-command-key-is-meta and
! mac-reverse-ctrl-meta is used. */);
Vmac_option_modifier = Qnil;
! DEFVAR_LISP ("mac-command-modifier", &Vmac_command_modifier,
! doc: /* Modifier to use for the Mac command key. The value can
! be alt, hyper, or super for the respective modifier. If the value is
! nil then the key will act as the normal Mac option modifier. However,
if all
! values of mac-{command|control|option}-modifier are nil, the
deprecated
! default assignment determined by mac-command-key-is-meta and
! mac-reverse-ctrl-meta is used. */);
! Vmac_command_modifier = Qnil;
DEFVAR_LISP ("mac-emulate-three-button-mouse",
&Vmac_emulate_three_button_mouse,
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Mac: modifier key remapping revised [patch]
2005-05-02 21:25 ` David Reitter
@ 2005-05-03 4:56 ` Harald Maier
2005-05-03 6:50 ` David Reitter
2005-05-03 15:28 ` Stefan Monnier
1 sibling, 1 reply; 7+ messages in thread
From: Harald Maier @ 2005-05-03 4:56 UTC (permalink / raw)
Cc: emacs-devel
David Reitter <david.reitter@gmail.com> writes:
> Since Daniel Brockman suggested that I repost this patch in context
> format, there we go. It applies to the current version. Steven Tamm
> suggested a while ago that the 'fn' key (on Powerbook keyboards left
> of the ctrl key) be included, and I think this would be a very neat
> idea for someone to do.
The patch is not applicable. It looks that the mail tool added
additional line breaks. Please can you resend the patch. I like this
patch a lot.
Harald
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Mac: modifier key remapping revised [patch]
2005-05-03 4:56 ` Harald Maier
@ 2005-05-03 6:50 ` David Reitter
2005-05-03 17:19 ` Harald Maier
0 siblings, 1 reply; 7+ messages in thread
From: David Reitter @ 2005-05-03 6:50 UTC (permalink / raw)
Cc: emacs-devel
On 3 May 2005, at 05:56, Harald Maier wrote:
> The patch is not applicable. It looks that the mail tool added
> additional line breaks. Please can you resend the patch. I like this
> patch a lot.
http://homepages.inf.ed.ac.uk/dreitter/emacs/mac-modifier-keys.patch
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Mac: modifier key remapping revised [patch]
2005-05-02 21:25 ` David Reitter
2005-05-03 4:56 ` Harald Maier
@ 2005-05-03 15:28 ` Stefan Monnier
1 sibling, 0 replies; 7+ messages in thread
From: Stefan Monnier @ 2005-05-03 15:28 UTC (permalink / raw)
Cc: emacs-devel
> Since Daniel Brockman suggested that I repost this patch in context format,
> there we go. It applies to the current version. Steven Tamm suggested
> a while ago that the 'fn' key (on Powerbook keyboards left of the ctrl key)
> be included, and I think this would be a very neat idea for someone to do.
Sorry to bother you again, but he also suggested to follow the coding
convention, and I'd add: be careful that your patch doesn't get wrapped by
your email software.
The first part of the coding convention you have hopefully noticed is that
opening and closing braces are on their own line.
But admittedly, before bothering to post it again, maybe it'd be interesting
to see if the suggested change stands a chance of being accepted.
Stefan
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Mac: modifier key remapping revised [patch]
2005-05-03 6:50 ` David Reitter
@ 2005-05-03 17:19 ` Harald Maier
0 siblings, 0 replies; 7+ messages in thread
From: Harald Maier @ 2005-05-03 17:19 UTC (permalink / raw)
Cc: emacs-devel
David Reitter <david.reitter@gmail.com> writes:
> On 3 May 2005, at 05:56, Harald Maier wrote:
>
>> The patch is not applicable. It looks that the mail tool added
>> additional line breaks. Please can you resend the patch. I like this
>> patch a lot.
>
> http://homepages.inf.ed.ac.uk/dreitter/emacs/mac-modifier-keys.patch
Thank you, this version works fine.
Harald
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2005-05-03 17:19 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-18 17:02 Mac: modifier key remapping revised [patch] David Reitter
2005-05-02 17:56 ` Daniel Brockman
2005-05-02 21:25 ` David Reitter
2005-05-03 4:56 ` Harald Maier
2005-05-03 6:50 ` David Reitter
2005-05-03 17:19 ` Harald Maier
2005-05-03 15:28 ` Stefan Monnier
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).