Re: What is the ESC sequence for the "Matching Double Brakets"? From
- To: mathgroup at smc.vnet.net
- Subject: [mg113089] Re: What is the ESC sequence for the "Matching Double Brakets"? From
- From: Gianluca Gorni <gianluca.gorni at uniud.it>
- Date: Tue, 12 Oct 2010 13:50:50 -0400 (EDT)
On 11/ott/2010, at 11.28, 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?
>>
>> I remember that before when one moved the mouse over one of those
>> things, then the ESC sequence would show up at he bottom of the palette.
>>
>> (Just noticed that some do show the ESC sequence in the ballon help that
>> comes up when the mouse is over them, but some do not. The ballon help
>> only shows the name, but not the ESC sequence as well. Strange).
>>
>> thanks
>> --Nasser
>
>
> 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
> --
> _________________________________________________________________
> Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de
I tried to adapt your KeyEvent to get "matching double quotes"
on my Macintosh system:
Item[KeyEvent["\"",Modifiers->{Command,Shift}],
FrontEndExecute[{FrontEnd`NotebookWrite[FrontEnd`SelectedNotebook[],
"\"\"",After],
FrontEndToken["MovePrevious"]}]]
but it does not seem to work. What am I doing wrong?
Gianluca