Ads were blocked by your webbrowser.

This is not a problem, but keep in mind that developing HeidiSQL, user support and hosting takes time and money.

You may want to send a donation instead.

RUN keyboard shortcut - context aware

HerrimanCoder's profile image HerrimanCoder posted 2 months ago in General

I have set up a custom keyboard shortcut for Run, Run Selection, and Run current query, thusly:

image description

You can see I have F5 linked to all 3, which [I know] doesn't really make sense. But what I'm trying to achieve is behavior similar to MySQL Workbench and SQL Server Management Studio - which is this:

  • If you don't select/highlight anything, and run the query, it will run ALL STATEMENTS in the window.
  • If you select/highlight any statement and run the query, it will run only that statement.

By default, HeidiSQL doesn't seem to work that way, so I went down this path of setting custom keyboard shortcuts.

So to my question: How do I set my F5 keystroke shortcut such that when nothing is selected/highlighted, it executes all statements in the query window? And when I highlight a statement and hit F5, it executes only what is highlighted?

Thank you in advance for advice.

HerrimanCoder's profile image HerrimanCoder posted 2 months ago

One important point I forgot to mention: I want "run everything" and "run highlighted" both linked to the F5 shortcut. I do not want a different shortcut for each. This is how MySQL Workbench and SSMS work by default.

ansgar's profile image ansgar posted 2 months ago

Such a context sensitive action is not yet supported by HeidiSQL.

At least for the "Run current query", this would also make no sense, as it is impossible to know whether the user wants to run all or one query.

Please login to leave a reply, or register at first.