2010-11-17 108 views
26

有没有可以查看/更改全局快捷方式选项的地方,如命令 + (变成输入样式)?自定义Mathematica快捷方式

特别是,我需要更快的方式创建项目符号列表。它是单元格上下文菜单中没有自己的快捷方式的“项目”样式。

回答

30

Here是一篇不错的文章。

此外,FROM HERE(未选中)

问题: 如何修改前端添加新的键盘快捷方式? 答: (2005年5月mathgroup,特雷弗·巴卡:)

我一直在摆弄周围KeyEventTranslations.tr最近设置的快捷键,我已经了解到,前端令牌是很酷。 this wolfram page给出了相当不错的文档。

无论如何,这里有三个,我不得不努力工作(在数学组的帮助下,一如既往)。

  • 的退出内核键盘快捷键,添加以下KeyEventTranslations.tr:
 
     Item[KeyEvent["q", Modifiers -> {Control, Option}], 
       FrontEndExecute[ 
         FrontEndToken[ 
           SelectedNotebook[ ], 
           "EvaluatorQuit", 
           Automatic 
         ] 
       ] 
     ] 

  • 用于初始化电池切换快捷键(从以前的线程重复),加关注KeyEventTranslations.tr:
 
     Item[KeyEvent["i", Modifiers -> {Command, Control}], 
       FrontEndExecute[ 
         FrontEndToken[ 
           SelectedNotebook[ ], 
           "InitializationCell", 
           "Toggle" 
         ] 
       ] 
     ] 
  • 为保存为包键盘快捷键,添加以下KeyEventTranslations.tr:
 
     Item[KeyEvent["k", Modifiers -> {Control, Option}], 
      SaveRenameSpecial["Package"]] 

编辑

我发现(无证)前端的完整列表令牌。希望你会明白这些是不受支持的!

{"AllWindowsFront", "BackgroundDialog", "Balance", "BringToFront", 
"CellContextDialog", "CellGroup", "CellLabelsToTags", "CellMerge", 
"CellSplit", "CellTagsEditDialog", "CellTagsEmpty", "CellTagsFind", 
"CellUngroup", "Clear", "ClearCellOptions", "ClearNoAutoScroll", 
"Close", "CloseAll", "CloseMain", "ColorSelectorDialog", 
"ColorsPanel", "CompleteSelection", "Copy", "CopyCell", 
"CopySpecial", "CreateCounterBoxDialog", "CreateGridBoxDialog", 
"CreateHyperlinkDialog", "CreateInlineCell", "CreateValueBoxDialog", 
"Cut", "CycleNotebooksBackward", "CycleNotebooksForward", 
"DebuggerAbort", "DebuggerClearAllBreakpoints", "DebuggerContinue", 
"DebuggerContinueToSelection", "DebuggerFinish", 
"DebuggerResetProfile", "DebuggerShowProfile", "DebuggerStep", 
"DebuggerStepIn", "DebuggerStepInBody", "DebuggerStepOut", 
"DebuggerToggleBreakpoint", "DebuggerToggleWatchpoint", 
"DeleteGeneratedCells", "DeleteIndent", "DeleteInvisible", 
"DuplicatePreviousInput", "DuplicatePreviousOutput", 
"EditStyleDefinitions", "EnterSubsession", "Evaluate", 
"EvaluateCells", "EvaluateInitialization", "EvaluateNextCell", 
"EvaluateNotebook", "EvaluatorAbort", "EvaluatorHalt", 
"EvaluatorInterrupt", "EvaluatorQuit", "EvaluatorStart", 
"ExitSubsession", "ExpirationDialog", "ExplainBeepDialog", 
"ExplainColoringDialog", "ExpressionLinewrap", "FileNameDialog", 
"FindDialog", "FindEvaluatingCell", "FindNextMisspelling", 
"FindNextWarningColor", "FinishNesting", "FixCellHeight", 
"FixCellWidth", "FontColorDialog", "FontFamilyB", "FontPanel", 
"FontSizeDialog", "FrontEndHide", "FrontEndQuit", 
"FrontEndQuitNonInteractive", "GenerateImageCaches", 
"GenerateNotebook", "GeneratePalette", "GraphicsAlign", 
"GraphicsCoordinatesDialog", "GraphicsOriginalSize", 
"GraphicsPlotRangeAll", "GraphicsPlotRangeAutomatic", 
"GraphicsPlotRangeFixed", "GraphicsRender", "Group", 
"HandleShiftReturn", "HeadersFootersDialog", "HelpDialog", 
"HyperlinkGo", "HyperlinkGoBack", "HyperlinkGoForward", "Import", 
"ImportPictures", "ImportStyleDefinitions", "Indent", 
"InsertClipPlane", "InsertMatchingBraces", "InsertMatchingBrackets", 
"InsertMatchingParentheses", "InsertNewGraphic", "InsertObject", 
"InsertRawExpression", "InsertSoftReturn", "LicAuthFailureDialog", 
"MacintoshOpenDeskAccessory", "MenuListBoxFormFormatTypes", 
"MenuListCellEvaluators", "MenuListCellTags", 
"MenuListCommonDefaultFormatTypesInput", 
"MenuListCommonDefaultFormatTypesInputInline", 
"MenuListCommonDefaultFormatTypesOutput", 
"MenuListCommonDefaultFormatTypesOutputInline", 
"MenuListCommonDefaultFormatTypesText", 
"MenuListCommonDefaultFormatTypesTextInline", 
"MenuListConvertFormatTypes", "MenuListDisplayAsFormatTypes", 
"MenuListExportClipboardSpecial", "MenuListFonts", 
"MenuListFontSubstitutions", "MenuListGlobalEvaluators", 
"MenuListHelpWindows", "MenuListNotebookEvaluators", 
"MenuListNotebooksMenu", "MenuListPackageWindows", 
"MenuListPalettesMenu", "MenuListPaletteWindows", 
"MenuListPlayerWindows", "MenuListPlugInCommands", 
"MenuListPrintingStyleEnvironments", "MenuListQuitEvaluators", 
"MenuListRelatedFilesMenu", "MenuListSaveClipboardSpecial", 
"MenuListScreenStyleEnvironments", "MenuListStartEvaluators", 
"MenuListStyleDefinitions", "MenuListStyles", 
"MenuListStylesheetWindows", "MenuListTextWindows", 
"MenuListWindows", "ModifyBoxFormFormatTypes", 
"ModifyDefaultFontProperties", "ModifyEvaluatorNames", 
"ModifyFontSubstitutions", "ModifyNotebooksMenu", 
"ModifyRelatedFiles", "MoveBackward", "MoveForward", "MoveToBack", 
"MoveToFront", "New", "NewPackage", "NewText", 
"NextFunctionTemplate", "NotebookMail", "NotebookMailSelection", 
"NotebookOneNote", "NotebookOneNoteSelection", 
"NotebookStatisticsDialog", "Open", "OpenCloseGroup", 
"OpenFromNotebooksMenu", "OpenFromNotebooksMenuEmpty", 
"OpenFromPalettesMenu", "OpenFromRelatedFilesMenu", "OpenHelpLink", 
"OpenSelection", "OpenSelectionParents", "OpenURL", "OptionsDialog", 
"PasswordDialog", "Paste", "PasteApply", "PasteApplyNoAutoScroll", 
"PasteDiscard", "PasteDiscardNoAutoScroll", "PasteSpecial", 
"PlainFont", "PreferencesDialog", "PreviousFunctionTemplate", 
"PrintDialog", "PrintOptionsDialog", "PrintSelectionDialog", 
"PublishToPlayer", "RebuildHelpIndex", "RecordSoundDialog", 
"RefreshDynamicObjects", "RelatedFilesMenu", 
"RemoveFromEvaluationQueue", "Replace", "ReplaceAll", "ReplaceFind", 
"ReplaceParent", "Revert", "RunColorDialog", "RunEdgeColorDialog", 
"RunFaceColorDialog", "Save", "SaveRename", "SaveRenameSpecial", 
"ScrollLineDown", "ScrollLineUp", "ScrollNotebookEnd", 
"ScrollNotebookStart", "ScrollPageBottom", "ScrollPageDown", 
"ScrollPageFirst", "ScrollPageLast", "ScrollPageNext", 
"ScrollPagePrevious", "ScrollPageTop", "ScrollPageUp", 
"SelectGeneratedCells", "SelectionAnimate", "SelectionBrace", 
"SelectionBracket", "SelectionCloseAllGroups", 
"SelectionCloseUnselectedCells", "SelectionConvert", 
"SelectionConvertB", "SelectionDisplayAs", "SelectionDisplayAsB", 
"SelectionHelpDialog", "SelectionOpenAllGroups", 
"SelectionParenthesize", "SelectionSaveSpecial", "SelectionScroll", 
"SelectionSetFind", "SelectionSpeak", "SelectionSpeakSummary", 
"SelectionUnbracket", "SelectNotebookWindow", "SetDefaultGraphic", 
"SimilarCellBelow", "SoundPlay", "SpellCheckerDialog", 
"StackWindows", "Style", "StyleDefinitionsOther", "StyleOther", 
"SubsessionEvaluateCells", "SystemPrintOptionsDialog", 
"TemplateSelection", "TestEvaluateNotebook", "TileWindowsTall", 
"TileWindowsWide", "ToggleDebugFlag", "ToggleDynamicUpdating", 
"ToggleGrayBox", "ToggleOptionListElement", "ToggleShowExpression", 
"ToggleTestingFlag", "TrustNotebook", "Undo", "Ungroup", 
"WindowMiniaturize", "XInfoDialog", "ZoomWindow"} 
+5

+10退出核心!我一直都很渴望这样的事情,但是从来没有真正发生过这种事情:) – Janus 2010-11-18 01:31:07

+0

啊,攻击KeyEventTranslations.tr带回了试图让Mathematica 3在Linux上正常工作的回忆......幸福的日子。 – Timo 2010-11-18 06:33:45

+0

哇谢谢,这个文件似乎充满了有用的快捷方式 – 2010-11-20 05:03:31

6

不同类型单元格的快捷方式存储在Stylesheet中。 选择您想要的款式并更改 MenuKeyCommand MenuCommandKey值。 Option Inspector中的下拉选项仅允许您使用1-9,但我使用“`”和“=”对它进行了测试,结果表明它们工作正常。有时,使用Show Expression(Ctrl-Shift-E)而不是选项检查器更容易修改样式表。

+5

当然你的意思是'MenuCommandKey'选项。 – 2011-03-26 06:54:20

+0

@Alexey:当然! @ telefunkenvf14感谢您为我解决这个问题。 – Simon 2011-04-13 23:25:53