我在/Applications/Mathematica.app/SystemFiles/FrontEnd/TextResources/Macintosh/KeyEventTranslations.tr 中添加了以下内容,可让我输入带有组合键的双括号。您可以通过修改文件(在您的操作系统上的任何位置)来执行相同的操作。我首先从Szabolcs's 网站here 了解到这一点。他那里有其他数学相关的东西可能对你有帮助。
添加的命令有:
-
〚 与 Ctrl+[
-
〛 使用 Ctrl+]
-
〚〛 使用 Ctrl+Alt+]
KeyEventTranslations.tr 文件中列出的等效项是:
修饰符可以是“Shift”、“Control”、“Command”、“Option”
对于 Macintosh:“Command” = 命令键,“Option” = 选项键
对于 X11:“命令”= Mod1,“选项”= Mod2
对于 Windows:“Command” = Alt,“Option” = Alt
在上述文件的EventTranslations[{之后插入以下内容。
(* Custom keyboard shortcuts *)
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]
}]],
你不是唯一一个被它激怒的人。 Here's 我试图通过将 Caps lock 映射到 Esc 来避免必须拉伸以命中 Esc。巫师先生也有一个couple 的questions 与[[ 到〚 的转换有关。