Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Customizing Keyboard Shortcuts in 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:

  • Is this possible somehow in MySQL Workbench (e.g. additional plugin)?
  • If not, do any of the alternatives to MySQL Workbench offer this functionality?

Environment:

  • Ubuntu 12.04 LTS, 32 bit
  • MySQL server version 5.5.24-0ubuntu0.12.04.1
  • MySQL Workbench Version 5.2.38, rev 8753

Cheers!

like image 855
sammy34 Avatar asked Aug 20 '12 18:08

sammy34


People also ask

How do I change a shortcut in 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. The second to last line (Modifier+E) was edited by me.

Can you Customise keyboard shortcuts?

You can customize keyboard shortcuts (or shortcut keys) by assigning them to a command, macro, font, style, or frequently used symbol. You can also remove keyboard shortcuts. You can assign or remove keyboard shortcuts by using a mouse or just the keyboard.

What are the keyboard shortcuts for the menus in MySQL Workbench?

This is Command on macOS, Control on other platforms. On macOS, the Alt key is Option . There are keyboard shortcuts for the different menus in MySQL Workbench: In the EER Diagram view, a number of other keyboard shortcuts are available.

What is the Alt key for in MySQL Workbench?

On macOS, the Alt key is Option . There are keyboard shortcuts for the different menus in MySQL Workbench: In the EER Diagram view, a number of other keyboard shortcuts are available.

Is there a keyboard shortcut for modifier key in MySQL?

Chapter 10. Keyboard Shortcuts This copy of the manual is more than 90 days old. We encourage you to download a new version from dev.mysql.com/doc. Chapter 10. Keyboard Shortcuts On Mac OS X modifier key is cmd, on other platforms it is Ctrl .

Can I assign custom keyboard shortcuts for certain commands?

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:


1 Answers

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.

It'll look like this

    <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> 

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).

like image 87
Tyler Collier Avatar answered Sep 22 '22 23:09

Tyler Collier