Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
1998
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 1998

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

Search the Archive

Re: Cell bracket <-> Inline



Hi Wouter,

I'm sorry, but it turns out that I told you the wrong file to modify.
When I tested out my changes, I did it in an X environment, and the
location of the file I changed was in the directory I told you. After
getting you message, I tried my changes at home, and of course they
didn't work. It turns out that the file you should modify is

SystemFiles/FrontEnd/TextResources/Windows/KeyEventTranslations.tr

I don't know why this file is located in both directories.

By the way, there are two places where keyboard shortcuts are defined,
in the file KeyEventTranslations.tr as well as MenuSetup.tr. I think
the definitions in MenuSetup.tr take precedence for multiply defined
shortcuts, so if you define a shortcut in KeyEventTranslations.tr and
it doesn't work, you may want to check the file MenuSetup.tr also to
make sure your new shortcut is not multiply defined. 

Let me know if the above doesn't help.

Carl Woll
Dept of Physics
U of Washington

On Sat, 24 Jan 1998, Wouter Meeussen wrote:

> hi Carl,
> 
> I'm puzzled by the Frontend's handling of these key events, and a bit wary
> of getting hopelessly lost when medling about in these things.
> On my machine, the insert as below doesn't work (tried it with Command and
> Control as modifiers).
> I have the impression that this part of the software isn't really compatible
> with the "Microsoft Win'95 PC" type keyboards.
> 
> I have achieved an andvantage though : if I walk the cursor down (in bracket
> selection) over a closed cell, it doesn't open up anymore. That's good, I
> wanted that effect! (what the Lord has closeth, no cursor movement shall
> openeth ..(;-))
> 
> Thanx for looking in to this,
> wouter.
> 
>         . . .
> 	Item[KeyEvent[Up], "MovePreviousLine"], 
> 	Item[KeyEvent[Down], "MoveNextLine"], 
> (* added 24/01/98 mail Carl Woll *)
> 	 Item[KeyEvent[Down, Modifiers->{Command}],
>       FrontEndExecute[{
>          FrontEnd`SelectionMove[FrontEnd`SelectedNotebook[],After,CellContents]
>       			}]  ],
> (* end new key event from cell bracket to in-line selection *)
> 	Item[KeyEvent[Left], "MovePrevious"], 
> 	Item[KeyEvent[Right], "MoveNext"], 
> 	Item[KeyEvent[Right, Modifiers -> {Option}], "MoveNextWord"], 
> 	Item[KeyEvent[Left, Modifiers -> {Option}], "MovePreviousWord"], 
>         . . .
> 
> At 12:38 21-01-98 -0800, C. Woll wrote:
> >Hi Wouter,
> >
> >A while ago you wanted to know if there was a way to go from cell bracket
> >selection to inline selection. I have one way to do this.
> >
> >Find the file KeyEventTranslations.tr which is located in the
> >SystemFiles/FrontEnd/TextResources directory. In this file you should have
> >something like
> >
> >EventTranslations[{
> >	Item[KeyEvent[...
> >}]
> >
> >The trick is to add new keyevents which will do what you want. For
> >example, I added the following:
> >
> >EventTranslations[{
> >   Item[KeyEvent[Down, Modifiers->{Command}],
> >      FrontEndExecute[{
> >         FrontEnd`SelectionMove[FrontEnd`SelectedNotebook[],After,CellContents]
> >      }]
> >   ],
> >   Item[KeyEvent[Up, Modifiers->{Command}],
> >      FrontEndExecute[{
> >
> FrontEnd`SelectionMove[FrontEnd`SelectedNotebook[],After,CellContents],
> >
> FrontEnd`SelectionMove[FrontEnd`SelectedNotebook[],Before,CellContents]
> >      }]
> >   ],
> >   Item[KeyEvent[".", Modifiers->{Command,Control}]
> >      FrontEndExecute[{
> >         FrontEnd`SelectionMove[FrontEnd`SelectedNotebook[],All,Cell],
> >      }]
> >   ],
> >   ...
> >}]
> >
> >For some reason, the command with 
> >
> >Before,CellContents
> >
> >doesn't do what you expect, so I needed to do a more complicated set of
> >instructions.
> >
> >After you made the above changes, Command-Up and Command-Down will take
> >you from cell bracket to inline, with Up taking you to the beginning of
> >the cell, and Down taking you to the end of the cell (this will also work
> >when the selector is inline), and Command-Control-. will take you from
> >inline selection to cell bracket selection. I used Command-Control-. since
> >the behavior I wanted was similar to Extend Selection (Control-.) but
> >Command-. was already taken (abort evaluation).
> >
> >Let me know if this does what you want.
> >
> >Carl Woll
> >Dept of Physics
> >U of Washington
> >
> >
> Dr. Wouter L. J. MEEUSSEN
> w.meeussen.vdmcc@vandemoortele.be
> eu000949@pophost.eunet.be
> 
> 




  • Prev by Date: Customizing your keyboard by creating new aliases
  • Next by Date: 1998 Mathematica Visiting Scholar Grant Applications
  • Prev by thread: Cell bracket <-> Inline
  • Next by thread: Re: Cell bracket <-> Inline