在Windows上,MySQL Workbench中的Redo操作映射到Ctrl+Y键盘快捷键(看起来自2009年9月以来一直如此(。我想使用Ctrl+Shift+Z 根据SO的回答,我应该能够在 有什么方法可以使Ctrl+Shift+Z 编辑: 我到底做了什么: 你可以在托马斯·迪基的回答中看到更详细的内容。main_menu.xml
文件中更改它。完成此操作并重新启动MySQL Workbench后,新的键盘快捷键将正确显示在"编辑菜单"中,但按下相应的键仍会返回SUB
字符。id="com.mysql.wb.menu.edit.redo"
将元素中的快捷方式更改为Modifier+Shift+Z
id="com.mysql.wb.menu.database.sync_mysql_script"
(使用Modifier+Shift+Z
(的元素中的某个其他快捷方式
您没有详细说明您尝试了什么。在main_menu.xml
中,我看到
<value type="object" struct-name="app.MenuItem" id="com.mysql.wb.menu.edit.redo">
<link type="object" key="owner" struct-name="app.MenuItem">com.mysql.wb.menu.edit</link>
<value type="string" key="caption">Redo</value>
<value type="string" key="name">redo</value>
<value type="string" key="command">builtin:redo</value>
<value type="string" key="itemType">action</value>
<value type="string" key="shortcut">Modifier+Y</value>
<value type="string" key="platform">windows,linux</value>
</value>
<value type="object" struct-name="app.MenuItem" id="com.mysql.wb.menu.edit.redomac">
<link type="object" key="owner" struct-name="app.MenuItem">com.mysql.wb.menu.edit</link>
<value type="string" key="caption">Redo</value>
<value type="string" key="name">redo</value>
<value type="string" key="command">builtin:redo</value>
<value type="string" key="itemType">action</value>
<value type="string" key="shortcut">Modifier+Shift+Z</value>
<value type="string" key="platform">macosx</value>
</value>
这两个块在不止一个地方不同,所以我不会更改platform
的值。更改线路
<value type="string" key="shortcut">Modifier+Y</value>
至
<value type="string" key="shortcut">Modifier+Shift+Z</value>
可能看起来有效。然而,在文件的后面有一个具有该绑定的现有定义(如果您刚刚进行了更改,则会发生冲突(:
<value type="object" struct-name="app.MenuItem" id="com.mysql.wb.menu.database.sync_mysql_script">
<link type="object" key="owner" struct-name="app.MenuItem">com.mysql.wb.menu.database</link>
<value type="string" key="caption">Synchronize Model...</value>
<value type="string" key="name">synchronization</value>
<value type="string" key="command">plugin:db.mysql.plugin.sync.db</value>
<value type="string" key="itemType">action</value>
<value type="string" key="shortcut">Modifier+Shift+Z</value>
<value type="string" key="platform">windows,linux</value>
<value type="string" key="context">*model</value>
</value>
也许你忽略了这一点。
不幸的是,MySQL工作台中的键盘处理并不总是集中的。特别是编辑器控件(Scintilla(有自己的键盘方案,不受xml中定义的内容的影响。从xml加载热键时,也可以在编辑器中设置热键。