Search code examples
windowskeyboard-shortcutsmysql-workbenchundo-redo

Use Ctrl+Shift+Z as a shortcut for the Redo action in MySQL Workbench for Windows


On Windows, the Redo action in MySQL Workbench is mapped to the Ctrl+Y keyboard shortcut (it looks like it has been so since september 2009). I would like to use Ctrl+Shift+Z. However, pressing this combination prints a SUB character in the current tab, which I interpret as a substitute character.

According to an SO answer, I should be able to change it in the main_menu.xml file. After doing so and restarting MySQL Workbench, the new keyboard shortcut correctly appears in the Edit Menu, but pressing the corresponding keys still echoes a SUB character.

Is there any way to make Ctrl+Shift+Z work?

EDIT:

What I did exactly was:

  • change the shortcut to Modifier+Shift+Z in the element with id="com.mysql.wb.menu.edit.redo"
  • change the shortcut to some other shortcut in the element with id="com.mysql.wb.menu.database.sync_mysql_script" (which was using Modifier+Shift+Z).

You can see it more detailed in Thomas Dickey's answer.


Solution

  • Unfortunately, the keyboard handling in MySQL Workbench is not always centralized. Especially the editor control (Scintilla) has its own keyboard scheme that is not influenced by what is defined in the xml. Probably would make a lot of sense to also set the hotkey in the editor when loading them from the xml.