Well, GNU/Linux in many flavors, FreeBSD, Solaris, MacOSX (but there
I have no idea how to get C-\).
As for Mac OS X/Carbon, could you test if you can type C-\ with "Ctrl
+ [the key combination for '\']" with the following patch?
It seems to work fine on initial testing. I'll run Emacs with this
patch for a while. Actually \ is on option-shift-7 so C-\ becomes
option-shift-ctrl-7, and M-C-\ is command-option-shift-ctrl-7. Not
so bad as it looks, because option, ctrl, shift and command are all
close to each other.
Jan D.
Index: src/macterm.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/macterm.c,v
retrieving revision 1.120
diff -c -r1.120 macterm.c
*** src/macterm.c 4 Jul 2005 16:06:33 -0000 1.120
--- src/macterm.c 6 Jul 2005 00:13:57 -0000
***************
*** 93,99 ****
#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)
--- 93,101 ----
#define macMetaKey (NILP (Vmac_reverse_ctrl_meta) ? \
(NILP (Vmac_command_key_is_meta) ? optionKey : cmdKey) \
: controlKey)
! #define macAltKey (NILP (Vmac_command_key_is_meta) ? \
! (NILP (Vmac_command_key_is_meta) ? cmdKey : optionKey) \
! : 0)
#define mac_window_to_frame(wp) (((mac_output *) GetWRefCon (wp))-
>mFP)
***************
*** 7537,7543 ****
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);
--- 7539,7545 ----
result |= ctrl_modifier;
if (mods & macMetaKey)
result |= meta_modifier;
! if (mods & macAltKey)
result |= alt_modifier;
if (!NILP (Vmac_option_modifier) && (mods & optionKey)) {
Lisp_Object val = Fget(Vmac_option_modifier, Qmodifier_value);
***************
*** 9479,9487 ****
}
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
--- 9481,9492 ----
}
else
{
! EventModifiers mask = macCtrlKey | macMetaKey | macAltKey;
!
! if (!NILP (Vmac_option_modifier))
! mask |= optionKey;
!
! if (er.modifiers & mask)
{
/* This code comes from Keyboard Resource,
Appendix C of IM - Text. This is necessary
***************
*** 9490,9513 ****
It also does not translate correctly
control-shift chars like C-% so mask off shift
here also */
! int new_modifiers = er.modifiers & 0xe600;
! /* mask off option and command */
! 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 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;
}
--- 9495,9506 ----
It also does not translate correctly
control-shift chars like C-% so mask off shift
here also */
! EventModifiers new_modifiers = er.modifiers & ~mask;
! /* mask off modifiers */
! UInt16 new_keycode = keycode | new_modifiers & 0xff00;
Ptr kchr_ptr = (Ptr) GetScriptManagerVariable
(smKCHRCache);
! UInt32 some_state = 0;
!
inev.code = KeyTranslate (kchr_ptr, new_keycode,
&some_state) & 0xff;
}
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel
_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel