MathGroup Archive 2007

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

Search the Archive

Re: Re: Hotkeys - redefine


Thank you: it was the FrontEnd`NotebookWrite... expression and the After 
that I didn't know about.

You say not to create any other .tr files in the same directory.  But 
without any apparent ill effects I kept there, with the name 
OriginalKeyEventTranslations.tr,  a copy of the original 
KeyEventTranslations.tr (and likewise for MenuSetup.tr, which I had also 
modified by adding something).  Perhaps Mathematica is reading all these 
files but with no ill effect since the modified versions only add commands?

Szabolcs wrote:
> Murray Eisenberg wrote:
>> What, exactly, does one enter in KeyEventTranslations.tr?  I've tried 
>> each of the following (I think), but each gives an error:
>>
>>    Item[KeyEvent["[", Modifiers -> {Control}], LeftDoubleBracket]
>>    Item[KeyEvent["[", Modifiers -> {Control}], "LeftDoubleBracket"]
>>    Item[KeyEvent["[", Modifiers -> {Control}], "\[LeftDoubleBracket]"]
>>
> 
> Find the line
> EventTranslations[{
> 
> and enter the following right after it:
> 
> Item[KeyEvent["[", Modifiers -> {Control}], 
> FrontEndExecute[{FrontEnd`NotebookWrite[FrontEnd`SelectedNotebook[], 
> "\[LeftDoubleBracket]", After]}]],
> 
> Item[KeyEvent["]", Modifiers -> {Control}], 
> FrontEndExecute[{FrontEnd`NotebookWrite[FrontEnd`SelectedNotebook[], 
> "\[RightDoubleBracket]", After]}]],
> 
> Make sure that you do not create any other files with the extension .tr 
> in that directory, otherwise this may not work (I made this mistake when 
> I backed up the file).
> 
> Szabolcs
> 

-- 
Murray Eisenberg                     murray at math.umass.edu
Mathematics & Statistics Dept.
Lederle Graduate Research Tower      phone 413 549-1020 (H)
University of Massachusetts                413 545-2859 (W)
710 North Pleasant Street            fax   413 545-1801
Amherst, MA 01003-9305


  • Prev by Date: Bare Bones Backup Button
  • Next by Date: Slide presentation examples (v6)
  • Previous by thread: Re: Hotkeys - redefine
  • Next by thread: Re: Re: Hotkeys - redefine