wolfram-mathematica - 如何修改mathematica系统菜单项的热键绑定(bind)?

标签 wolfram-mathematica hotkeys

这个问题困扰了我很久。众所周知,在mathematica中,我们可以通过“KeyEventTranslations.tr”和“MenuSetup.tr”两个文件来修改热键绑定(bind),但是有些热键默认绑定(bind)到系统菜单项(例如,在 Windows 中:Alt+F 绑定(bind)到 File 菜单、Alt+E 绑定(bind)到 Edit 菜单、Alt+I 绑定(bind)到 Insert 菜单等)不会出现在这些文件中。 我的问题是如何自定义这些热键?这样我就可以将我更频繁使用的操作分配给他们。

我注意到在“MenuSetup.tr”文件中,更改 '&' 符号的位置不会影响热键绑定(bind)(例如,将 Menu["&File",{...}] 更改为 Menu["Fi&le",{...}] )。

有什么建议么?非常感谢你!

最佳答案

AutoHotKey几乎可以肯定是你想要的东西。您可以定义任何您想要的绑定(bind),甚至可以创建宏。绑定(bind)可以是上下文敏感的,因此它们只能在特定的应用程序中工作。例如,这里是一个 AutoHotKey 脚本,它只为记事本定义了 2 个绑定(bind),为除记事本之外的所有窗口定义了 1 个绑定(bind)。

#IfWinActive, ahk_class Notepad
^a::MsgBox You pressed Ctrl-A while Notepad is active. Pressing Ctrl-A in any other window will pass the Ctrl-A keystroke to that window.
#c::MsgBox You pressed Win-C while Notepad is active.
#IfWinActive
#c::MsgBox You pressed Win-C while any window except Notepad is active.

我不确定您要绑定(bind)哪些操作,但如果它们是 Mathematica 特定的,则编写脚本需要一些努力。您可能必须先在 Mathematica 中定义绑定(bind),然后使用 AutoHotKey 来获得您想要的实际绑定(bind),例如将“Action X”绑定(bind)到 Ctrl-F。

关于wolfram-mathematica - 如何修改mathematica系统菜单项的热键绑定(bind)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8775032/

相关文章:

c# - WPF 中的全局热键适用于每个窗口

optimization - 数学 : how to find the max of an expression with exponents as parameters

wolfram-mathematica - 强制 Mathematica 在非结构化张量网格上进行插值

wolfram-mathematica - 在 Mathematica 中用它们的名字替换表达式

linux - 我可以在 Ubuntu 中向 Qt 应用程序添加全局快捷方式 Hook 吗?

cocoa - 防止沙盒应用程序中出现 Cmd+Shift+Q 警报

visual-studio - 创建键盘快捷键以在同名的 html 和 typescript 文件之间切换

wolfram-mathematica - 将单元格定义扩展到 CellFrameLabels 定义

graph - Mathematica 图形编辑器?

c - 有没有办法让我的二进制文件对 Linux 中的某些全局热键使用react?