From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Jan D." Newsgroups: gmane.emacs.devel Subject: Re: AltGr finger twisters documented? Date: Wed, 6 Jul 2005 10:38:25 +0200 Message-ID: References: <42CA7E70.7040308@student.lu.se> <0726706D-47B7-4BFC-A960-2C5EE59DA7B3@swipnet.se> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 (Apple Message framework v730) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: sea.gmane.org 1120640677 31118 80.91.229.2 (6 Jul 2005 09:04:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 6 Jul 2005 09:04:37 +0000 (UTC) Cc: Emacs Devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Jul 06 11:04:29 2005 Return-path: Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1Dq5o9-00042B-Qn for ged-emacs-devel@m.gmane.org; Wed, 06 Jul 2005 11:03:07 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dq5pR-0007f7-1J for ged-emacs-devel@m.gmane.org; Wed, 06 Jul 2005 05:04:25 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Dq5bF-0003kL-Dv for emacs-devel@gnu.org; Wed, 06 Jul 2005 04:49:45 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Dq5b9-0003jm-8o for emacs-devel@gnu.org; Wed, 06 Jul 2005 04:49:40 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Dq5WP-0003V8-2d for emacs-devel@gnu.org; Wed, 06 Jul 2005 04:44:48 -0400 Original-Received: from [195.54.107.70] (helo=mxfep01.bredband.com) by monty-python.gnu.org with esmtp (Exim 4.34) id 1Dq5We-00084J-AE for emacs-devel@gnu.org; Wed, 06 Jul 2005 04:45:00 -0400 Original-Received: from coolsville.localdomain ([83.226.180.210] [83.226.180.210]) by mxfep01.bredband.com with ESMTP id <20050706083834.GZNM26070.mxfep01.bredband.com@coolsville.localdomain>; Wed, 6 Jul 2005 10:38:34 +0200 In-Reply-To: Original-To: YAMAMOTO Mitsuharu X-Mailer: Apple Mail (2.730) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:40496 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:40496 >> 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 =20 patch for a while. Actually \ is on option-shift-7 so C-\ becomes =20 option-shift-ctrl-7, and M-C-\ is command-option-shift-ctrl-7. Not =20 so bad as it looks, because option, ctrl, shift and command are all =20 close to each other. Jan D. > Index: src/macterm.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > 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) ? =20 > cmdKey : optionKey) > > #define mac_window_to_frame(wp) (((mac_output *) GetWRefCon (wp))-=20= > >mFP) > =0C > --- 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))-=20= > >mFP) > =0C > *************** > *** 7537,7543 **** > result |=3D ctrl_modifier; > if (mods & macMetaKey) > result |=3D meta_modifier; > ! if (NILP (Vmac_command_key_is_meta) && (mods & macAltKey)) > result |=3D alt_modifier; > if (!NILP (Vmac_option_modifier) && (mods & optionKey)) { > Lisp_Object val =3D Fget(Vmac_option_modifier, = Qmodifier_value); > --- 7539,7545 ---- > result |=3D ctrl_modifier; > if (mods & macMetaKey) > result |=3D meta_modifier; > ! if (mods & macAltKey) > result |=3D alt_modifier; > if (!NILP (Vmac_option_modifier) && (mods & optionKey)) { > Lisp_Object val =3D 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 =3D macCtrlKey | macMetaKey | macAltKey; > ! > ! if (!NILP (Vmac_option_modifier)) > ! mask |=3D 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 =3D er.modifiers & 0xe600; > ! /* mask off option and command */ > ! int new_keycode =3D keycode | new_modifiers; > ! Ptr kchr_ptr =3D (Ptr) GetScriptManagerVariable =20 > (smKCHRCache); > ! unsigned long some_state =3D 0; > ! inev.code =3D 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 =3D er.modifiers & ~optionKey; > ! int new_keycode =3D keycode | new_modifiers; > Ptr kchr_ptr =3D (Ptr) GetScriptManagerVariable =20 > (smKCHRCache); > ! unsigned long some_state =3D 0; > inev.code =3D 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 =3D er.modifiers & ~mask; > ! /* mask off modifiers */ > ! UInt16 new_keycode =3D keycode | new_modifiers & 0xff00; > Ptr kchr_ptr =3D (Ptr) GetScriptManagerVariable =20 > (smKCHRCache); > ! UInt32 some_state =3D 0; > ! > inev.code =3D KeyTranslate (kchr_ptr, new_keycode, > &some_state) & 0xff; > } > > > _______________________________________________ > Emacs-devel mailing list > Emacs-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/emacs-devel >