Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Execute queries with Ctrl+Enter #7305

Closed
AtmoFX opened this issue Mar 22, 2024 · 1 comment
Closed

Execute queries with Ctrl+Enter #7305

AtmoFX opened this issue Mar 22, 2024 · 1 comment
Assignees
Milestone

Comments

@AtmoFX
Copy link

AtmoFX commented Mar 22, 2024

Linked to 7268

Describe the bug

As commented by @robpoyntz here, Ctrl+Enter can no longer be used to execute queries the same way it was until pgAdmin 8.2 or 8.3.
This issue looks unrelated to query formatting hence this separate report.

There are 3 arguments to be made in favor of restoring:

  1. It used to work fine.
  2. Some of us out there work on other DBs too, with other clients where Ctrl+Enter was the default shortcut to execute queries (e.g. SSMS) and it is very uncomfortable to switch between applications when such an important shortcut cannot be the same.
    I understand you may not want to be tied to choices made in other software but it is a choice your users have already made.
  3. Finally and perhaps more importantly, the problem exists in the first place because pgAdmin does provide an option where the key binding can be set to Ctrl+Enter (Preferences > Query Tool > Keyboard shortcuts > Execute script).
    BTW, this is the setting you will need to alter to reproduce the bug.

Expected behavior

The expected behavior is what it used to be: execute the selection portion of text from the editor.
The behavior now is: Insert a line break + execute the entire text of the editor.

Desktop:

  • OS: Windows 10
  • Version: 8.4
  • Mode: Desktop

Additional context

Query 7167 may come in conflict with this one.

I am not completely sure shortcuts for the Sort/Filter option dialog would collide with shortcuts for the query tool window, precisely because they are separate windows, but the shortcut to display it (Alt+F by default) is shown in the same portion of the preferences as above: Preferences > Query Tool > Keyboard shortcuts > Accesskey (Filter dialog).

@AtmoFX AtmoFX added the Bug label Mar 22, 2024
adityatoshniwal added a commit that referenced this issue Mar 23, 2024
Fix query tool autocomplete results when cursor is in between the SQL query. #7299
Fix an issue in query tool where custom keyboard shortcuts are not working for some. #7305
@pravesh-sharma pravesh-sharma self-assigned this Mar 25, 2024
@pravesh-sharma
Copy link
Contributor

Issue resolved. Verified on latest snapshot build

Env
OS - macOS Sonoma and Rocky 9
Mode - Desktop and server

@pravesh-sharma pravesh-sharma added this to the 8.5 milestone Mar 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants