Some approaches are discussed in this question on StackOverflow. Original references to these go to Szabolcs's webpage and a MathGroup posting by Mr.Wizard.
To summarize, you copy the file: $InstallationDirectory/SystemFiles/FrontEnd/TextResources/Macintosh/KeyEventTranslations.tr
to $UserBaseDirectory/
(with the same directory tree) and add the following modifications after EventTranslations[{
in the file:
Item[KeyEvent["[", Modifiers -> {Control}],
FrontEndExecute[{
FrontEnd`NotebookWrite[FrontEnd`InputNotebook[],
"\[LeftDoubleBracket]", After]
}]],
Item[KeyEvent["]", Modifiers -> {Control}],
FrontEndExecute[{
FrontEnd`NotebookWrite[FrontEnd`InputNotebook[],
"\[RightDoubleBracket]", After]
}]],
Item[KeyEvent["]", Modifiers -> {Control, Command}],
FrontEndExecute[{
FrontEnd`NotebookWrite[FrontEnd`InputNotebook[],
"\[LeftDoubleBracket]", After],
FrontEnd`NotebookWrite[FrontEnd`InputNotebook[],
"\[RightDoubleBracket]", Before]
}]],
These provide the following shortcuts:
〚
using Ctrl+[
〛
using Ctrl+]
〚〛
using Ctrl+Cmd+]
Replace Command
with Alt
for Windows/Linux and modify the paths above accordingly.
You can also try Andrew Moylan's suggestion, in the same post, but I haven't tried it.
KeyEventTranslations.tr
file to add my own shortcuts. $\endgroup$NotebookWrite[FrontEnd
InputNotebook[],"[LeftDoubleBracket]", After]}]] $\endgroup$