Re: What is the ESC sequence for the "Matching Double Brakets"? From
- To: mathgroup at smc.vnet.net
 - Subject: [mg113048] Re: What is the ESC sequence for the "Matching Double Brakets"? From
 - From: "Nasser M. Abbasi" <nma at 12000.org>
 - Date: Tue, 12 Oct 2010 04:25:35 -0400 (EDT)
 - References: <i8s5be$90r$1@smc.vnet.net> <i8ulcq$p0l$1@smc.vnet.net>
 - Reply-to: nma at 12000.org
 
On 10/11/2010 2:28 AM, Peter Breitfeld wrote:
> "Nasser M. Abbasi" wrote:
>
>> Mathematica Experts;
>>
>> What is the ESC key stroke combination to enter the "Matching double
>> brackets" into my notebook?
>>
>> I can't find the ESC sequence for this. Are these documented somewhere?
>>
>
> The escape sequences are esc[[esc  and esc]]esc. But you I prefer to
> add a keystroke for that. I use "Ctrl<" to produce the opening and
> closing double bracket and to position the cursor between the brackets.
>
> To do that, open the Mathematica file KeyEventTranslations.tr in an
> editor and add this code:
>
>    Item[KeyEvent["<",Modifiers->{Control}],
>        FrontEndExecute[{FrontEnd`NotebookWrite[FrontEnd`SelectedNotebook[],
>          "\[LeftDoubleBracket]\[RightDoubleBracket]",After],
>                FrontEndToken["MovePrevious"]}]]
>
> WARNING: Be careful when changing this file. Make a copy of it before
> altering. If you made an error (e.g. missing a comma) Mathematica will
> not start.
>
>
> // Peter
Thanks Peter;
I tried the above, but did not do what is expected. I did not get the
   [[ ]]
created in notebook.
This is what I did :
on windows, I edited
C:\Program Files\Wolfram 
Research\Mathematica\7.0\SystemFiles\FrontEnd\TextResources\Windows\KeyEventTranslations.tr
and copied what you have above to the bottom of file (made sure no 
typos, and commas betweem last item is there ok, etc..
Saved the file, started Mathematica.
I also tried having "x" in place of "<", so I can it just
         CTRL X
to make [[ ]] since it is faster than CTRL < (no need to hit SHIFT key 
to reach "<"), but again, it did notthing. When I hit CTRL x nothing 
happens on the screen.
Windows 7, 64 bit, Mathematica version 7.0
--Nasser