Bug #53555 make shortcut keys configurable
Submitted: 11 May 2010 8:45 Modified: 5 Dec 2011 13:28
Reporter: roel croonenberghs Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: SQL Editor Severity:S4 (Feature request)
Version:5.2.20 OS:Microsoft Windows (7)
Assigned to: CPU Architecture:Any
Tags: shortcut keys binding configuration

[11 May 2010 8:45] roel croonenberghs
Description:
I would find it very handy if the short cut keys would be configurable.
I'm used to ctrl-r for replace, in the workbench this is ctrl-h. I now in some programs it is ctrl-h as well. But it would make my live easier if I could change it.

BTW I always have wondered why replace would be ctrl-h 

How to repeat:
press ctrl-r -> nothing happens
[11 May 2010 12:07] Valeriy Kravchuk
Thank you for the feature request.
[12 Aug 2010 1:14] charl retief
I also support this feature request.

Pressing Ctrl-Shift-Return to execute a query in the SQL window is cumbersome and irregular. I want to set it to the F5 key to be like all the other SQL editors I use.

It would be great if this hotkey can be manually specified.
[5 Dec 2011 13:12] charl retief
Since there is still no progress with implementing a GUI option to do this I would like to share this "hack" with any users still frustrated by the factory default shortcut keys.

These instructions is to change "Execute (All or Selected)" shortcut from "SHIFT+CTRL+RETURN" to "F5". Any other shortcut can be changed in a similar manner.

WARNING: I DON'T ENCOURAGE FOLLOWING THESE INSTRUCTIONS, EDITING ANY PART OF AN APPLICATION CAN POSSIBILITY DAMAGE IT AND EVEN CAUSE IT TO STOP FUNCTIONING.

1) Go to you Workbench installation path. For Ubuntu this would be /usr/share/mysql-workbench/ and Windows something like "C:/Program Files/Mysql Workbench/".
2) Edit "data/main_menu.xml" in an text editor.
3) Search for and change the entry for 'query.execute' command (in my file it starts on line 1608):

        <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">F5</value>
        </value>

4) Save the changes to the .xml file
5) Restart WB
[5 Dec 2011 13:28] roel croonenberghs
Nice hack. Works perfectly. Thanks
[26 Jul 2015 18:31] Paul Weiss
I would love to see this. It would be very helpful to me.