Ctrl-Enter not doing anything in Database Navigator
Answered
edit: This post concerns the plugin "Database Navigator", which is different from the built-in Database tool (based on Datagrip) in IntelliJ Ultimate (not bundled with CE).
I have never been able to execute SQL statements using the Ctrl-Enter shortcut found in the plugin settings for Database Navigator. It doesn't matter if I highlight the statement or put the cursor after the semicolon. The only thing that happens is that I add a newline after the statement.
This is what `xev` shows when I press Ctrl and Enter:
KeyPress event, serial 37, synthetic NO, window 0x3800001,
root 0x255, subw 0x0, time 11489780, (1768,472), root:(1863,557),
state 0x0, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XmbLookupString gives 0 bytes:
XFilterEvent returns: False
KeyPress event, serial 37, synthetic NO, window 0x3800001,
root 0x255, subw 0x0, time 11490116, (1768,472), root:(1863,557),
state 0x4, keycode 36 (keysym 0xff0d, Return), same_screen YES,
" XLookupString gives 1 bytes: (0d) "
" XmbLookupString gives 1 bytes: (0d) "
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3800001,
root 0x255, subw 0x0, time 11490252, (1768,472), root:(1863,557),
state 0x4, keycode 36 (keysym 0xff0d, Return), same_screen YES,
" XLookupString gives 1 bytes: (0d) "
XFilterEvent returns: False
KeyRelease event, serial 37, synthetic NO, window 0x3800001,
root 0x255, subw 0x0, time 11490715, (1768,472), root:(1863,557),
state 0x4, keycode 37 (keysym 0xffe3, Control_L), same_screen YES,
XLookupString gives 0 bytes:
XFilterEvent returns: False
Please sign in to leave a comment.
Alas, i presume that is a feature, not a bug. And you can verify my claim:
press Ctrl+Alt+S , navigate to keymap (settings>keymap), in the option search type execute . find script-editor execute statement and remove ctrl+enter shortcut. then re-add it. You'll see a meny saying this shortcut is used already. remove the split line shortcut. save & apply. and ctrl+enter will start to work.
I'm aware (I linked to it three hours before the reply, after all) :-) The issue has been known as DBN-161 since 2015, but it doesn't seem to get much attention. So anyone interested should vote the issue up in the issue tracker.
What do you see when searching by Ctr+Enter shortcut in IDE Keymap settings:
Check also this setting:
I just realized we are talking about two different products/plugins :-) You show the settings for the Database tool, which is the Datagrip tool bundled in IntelliJ Ultimate, whereas I am talking about "Database Navigator", which is a plugin by Dan Cioca. I didn't know they weren't the same until today, since they have so similar functionality, but since I was using the Community Edition I didn't have the Datagrip functionality integrated.
Database Navigator still has the same Ctrl-Enter mapping, as can be seen. I don't know why it doesn't work. Alt-Enter still works, though, as it brings up a context menu where I can select "Execute statement" or "Execute SQL script".
I updated the post title to say "Database Navigator" instead of "Database Manager", as that was incorrect. Also edited the original post body.
Database Navigator is a 3rd plugin. Please contact plugin author about this Thanks.
Just confirming that @...'s solution works well. Just removed the "Split line" shortcut which I never used anyway.... and all good.
If using ctrl+enter or cmd+enter results in your line splitting, chances are that you need to remove that editor shortcut which IMO is not as useful before this one works.