自定义 Mathematica 快捷键 [英] Customizing Mathematica shortcuts

查看:38
本文介绍了自定义 Mathematica 快捷键的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有可以查看/更改全局快捷键选项的地方,例如 Command + 9(变成输入样式)?

特别是,我需要一种更快的方式来创建项目符号列表.它是 Cell 上下文菜单中的样式Item",它没有自己的快捷方式.

解决方案

这里是一篇不错的文章.

另外,从这里(未选中)

<块引用>

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

我最近一直在 Ke​​yEventTranslations.tr 中设置键盘快捷键,我了解到前端令牌非常酷.这个 wolfram 页面提供了非常好的文档.

无论如何,这里有三个我必须努力才能开始(一如既往地得到数学组的大力帮助).

  • 要退出内核键盘快捷键,请将以下内容添加到 KeyEventTranslations.tr:
<前>Item[KeyEvent["q", Modifiers -> {Control, Option}],前端执行[前端令牌[已选笔记本[ ],"评估者退出",自动的]]]

  • 对于初始化单元格切换键盘快捷键(从上一个线程重复),将以下内容添加到 KeyEventTranslations.tr:
<前>Item[KeyEvent["i", Modifiers -> {Command, Control}],前端执行[前端令牌[已选笔记本[ ],"初始化单元",切换"]]]

  • 对于另存为包的键盘快捷键,请将以下内容添加到 KeyEventTranslations.tr:
<前>Item[KeyEvent["k", Modifiers -> {Control, Option}],SaveRenameSpecial["包"]]

编辑

我找到了(未记录的)前端令牌的完整列表.希望您能理解这些是不受支持的!

{"AllWindowsFront", "BackgroundDialog", "Balance", "BringToFront",CellContextDialog"、CellGroup"、CellLabelsToTags"、CellMerge"、"CellSplit", "CellTagsEditDialog", "CellTagsEmpty", "CellTagsFind","CellUngroup", "Clear", "ClearCellOptions", "ClearNoAutoScroll",关闭",关闭所有",关闭主",颜色选择器对话框",颜色面板"、完整选择"、复制"、复制单元格"、"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"、导入"、导入图片"、导入样式定义"、缩进"、"InsertClipPlane", "InsertMatchingBraces", "InsertMatchingBrackets",插入匹配括号"、插入新图形"、插入对象"、"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"}

Is there a place I can view/change global shortcut options like Command + 9 (turn into Input style)?

In particular, I need a faster way of creating bulleted lists. It's the style "Item" in the Cell context menu which doesn't have its own shortcut.

解决方案

Here is a nice article.

Also, FROM HERE (unchecked)

Question: How do I modify the front end to add new keyboard shortcuts? Answer: (mathgroup May 2005, trevor baca:)

I've been mucking around in KeyEventTranslations.tr setting up keyboard shortcuts recently and i've learned that front end tokens are pretty cool. this wolfram page gives pretty good docs.

Anyway, here are three that i had to work a little to get going (with good help from the mathgroup, as always).

  • for a quit kernel keyboard shortcut, add the following to KeyEventTranslations.tr:

       Item[KeyEvent["q", Modifiers -> {Control, Option}],
               FrontEndExecute[
                       FrontEndToken[
                                SelectedNotebook[ ],
                                "EvaluatorQuit",
                                Automatic
                       ]
               ]
       ]  

  • for an initialization cell toggle keyboard shortcut (repeated from previous thread), add the following to KeyEventTranslations.tr:

      Item[KeyEvent["i", Modifiers -> {Command, Control}],
               FrontEndExecute[
                       FrontEndToken[
                               SelectedNotebook[ ],
                               "InitializationCell",
                               "Toggle"
                       ]
               ]
       ]  

  • for a save as package keyboard shortcut, add the following to KeyEventTranslations.tr:

       Item[KeyEvent["k", Modifiers -> {Control, Option}], 
           SaveRenameSpecial["Package"]]

Edit

I found a full list of the (undocumented) front-end tokens. Hope you'll understand that these are unsupported!

{"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"}

这篇关于自定义 Mathematica 快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆