2010-11-17 41 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