Re: Re: Hotkeys - redefine
- To: mathgroup at smc.vnet.net
- Subject: [mg77532] Re: [mg77505] Re: Hotkeys - redefine
- From: John Fultz <jfultz at wolfram.com>
- Date: Tue, 12 Jun 2007 01:21:43 -0400 (EDT)
- Reply-to: jfultz at wolfram.com
On Mon, 11 Jun 2007 04:20:12 -0400 (EDT), 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 Excellent advice, except that the above examples should use FrontEnd`InputNotebook[] isntead of FrontEnd`SelectedNotebook[]. Sincerely, John Fultz jfultz at wolfram.com User Interface Group Wolfram Research, Inc.