Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Bind double-[ to keyboard shortcut

  • To: mathgroup at smc.vnet.net
  • Subject: [mg106233] Re: Bind double-[ to keyboard shortcut
  • From: Peter Breitfeld <phbrf at t-online.de>
  • Date: Tue, 5 Jan 2010 01:49:50 -0500 (EST)
  • References: <hhshqn$ks1$1@smc.vnet.net>

"perdalum at gmail.com" wrote:

> In a previous installation of Mathematica, I had (on a Mac) Command-
> Alt-8 bound to the character representing double-[ for use in list
> indexing.
>
> I lost this setup in an upgrade and now I cannot create this
> customization again :-(
>
> Anyone know of what I'm talking?
>
> Thanks in advance!
>
> ..Per
>

To achieve this I change the file
/Applications/Mathematica.app/SystemFiles/FrontEnd/TextRessources/
 Macitosh/KeyEventTranslations.tr

Add the following to this file: (BE CAREFUL, ALWAYS MAKE A COPY OF THIS
FILE BEFORE EDITING IT, IF YOU MADE A MISTAKE, MATHEMATICA WILL NOT WORK
ANY MORE)

Item[KeyEvent["<",Modifiers->{Control}],
      FrontEndExecute[{FrontEnd`NotebookWrite[FrontEnd`SelectedNotebook[],
        "\[LeftDoubleBracket]\[RightDoubleBracket]",After],
              FrontEndToken["MovePrevious"]}]]

Now Ctrl+ <  will bring up the opening and closing double-brackets with
the Cursor placed in between.

I changed the other parentheses, brackets and braces the some way, e.g.

Item[KeyEvent["("],
      FrontEndExecute[{FrontEnd`NotebookWrite[FrontEnd`SelectedNotebook[],
        "()",After], FrontEndToken["MovePrevious"]}]]

-- 
_________________________________________________________________
Peter Breitfeld, Bad Saulgau, Germany -- http://www.pBreitfeld.de


  • Prev by Date: Re: bar chart ticks not placed well?
  • Next by Date: Re: Re: algebraic numbers
  • Previous by thread: Re: Bind double-[ to keyboard shortcut
  • Next by thread: Re: Bind double-[ to keyboard shortcut