在MySql Workbench中自定义键盘快捷键 [英] Customizing Keyboard Shortcuts in MySql Workbench
问题描述
花了很多年的时间主要与MS SQL Server合作(因此与SQL Server Management Studio一起完成常见任务),我现在开始与MySql合作.到目前为止,我一直在使用 MySQL Workbench ,对此我普遍感到满意.
Having spent a number of years working primarily with MS SQL Server (and hence SQL Server Management Studio for common tasks), I am now beginning to work with MySql. To date I have been using MySQL Workbench and am generally happy with it.
I would, however, like to be able to assign custom keyboard shortcuts for certain commands (e.g. commands from this list). For example, I'd prefer to stick to the MS-SQL approach of 'F5' to execute queries, rather than hitting 'Modifier+Return'. I haven't yet come across a simple way to do this. My questions are then:
- 在MySQL Workbench中(例如附加插件)可以通过某种方式实现吗?
- 如果没有,MySQL Workbench的任何替代产品是否提供此功能?
环境:
- Ubuntu 12.04 LTS,32位
- MySQL服务器版本5.5.24-0ubuntu0.12.04.1
- MySQL Workbench版本5.2.38,修订版8753
干杯!
推荐答案
您可以修改main_menu.xml
文件(对于我来说,在Ubuntu 12.04上,该文件位于/usr/share/mysql-workbench/data/
中).修改后,您需要重新启动MySQL Workbench.
You can modify the main_menu.xml
file (for me on Ubuntu 12.04 this was in /usr/share/mysql-workbench/data/
). After you modify it, you'll need to restart MySQL Workbench.
它看起来像这样
<value type="object" struct-name="app.MenuItem" id="com.mysql.wb.menu.query.exec">
<link type="object" key="owner" struct-name="app.MenuItem">com.mysql.wb.menu.query</link>
<value type="string" key="caption">Execute (All or Selection)</value>
<value type="string" key="name">query.execute</value>
<value type="string" key="command">builtin:query.execute</value>
<value type="string" key="itemType">action</value>
<value type="string" key="shortcut">Modifier+E</value>
</value>
倒数第二行(Modifier + E)由我编辑.以前它说修饰符+ Shift +返回".请注意,这不是别名(不能同时使用两者).
The second to last line (Modifier+E) was edited by me. Previously it said "Modifier+Shift+Return". Note that this is NOT an alias (you cannot have both).
这篇关于在MySql Workbench中自定义键盘快捷键的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!