Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Ctrl + Enter does not execute the query on many terminals #71

Closed
carteakey opened this issue May 24, 2023 · 9 comments · Fixed by #74
Closed

Ctrl + Enter does not execute the query on many terminals #71

carteakey opened this issue May 24, 2023 · 9 comments · Fixed by #74

Comments

@carteakey
Copy link

Hey @tconbeer, very cool and useful project.

Running this is a MacOS default terminal, all commands work except Run Query.

I tried all combinations (cmd + enter, ctrl + enter), but it results in a new line.

Any thoughts on what could be the issue?

@tconbeer
Copy link
Owner

tconbeer commented May 24, 2023

NOTE to those with this issue:

  • ctrl + j and cmd + j work to submit your query
  • You can also click the (blue) footer, where it says CTRL + ENTER: RUN QUERY

I'll be improving this experience soon.

--- Original message ---
As a workaround, could you try ctrl+j and cmd+j?

I don't have access to a Mac -- if you could do me a favor, could you install the textual dev tools and run the keys app?

$ pip install textual[dev]
$ textual keys

Then while running that app, can you press ctrl+enter and cmd+enter and paste the output into this issue?

@carteakey
Copy link
Author

Thanks for looking into it! ctrl+j works just fine, which is good enough I guess.

Strangely enough, both ctrl+enter and cmd+enter show the below output in textual.

image

Let me know if I can help with any additional info.

@tconbeer
Copy link
Owner

Amazing. I'll update the docs for ctrl+j. (Different terminals support different key combinations)

@ned2
Copy link

ned2 commented May 29, 2023

I'm seeing this same issue in Ubuntu. Control+Enter does not work, but Control+j does.

I've tried this with both the default Ubuntu terminal as well as my primary terminal, Guake.

Edit: this appears this is a limitation of the underlying terminal emulators. when I run showkeys -a I see that both enter and control+enter sends the same key code.

from googling around, control+enter just seems to be something that doesn't really work across terminal emulators. the only workarounds I've seen involve remapping the codes sent by keyboard keys for the terminal emulator you're using. which I'm not really keen to dive into

@tconbeer
Copy link
Owner

tconbeer commented May 29, 2023

Other than making ctrl+j better documented, is there a key combination either of you would think is more intuitive for submit? (I could also add a more obvious button, although the footer doubles as a row of buttons)

@ned2
Copy link

ned2 commented May 29, 2023

I reckon adding a submit button would be good regardless of whether another key combination is added. Would make it generally more accessible and folks would at least have that option if they've missed the documentation.

As for other combinations, how about control+space? that looks to have a different key code than space on its own in my terminal emulator.

@carteakey
Copy link
Author

+1 for a button, since the UI already supports mouse clicks.

@hannes
Copy link

hannes commented May 30, 2023

Same issue here, ctrl-j works however

@tconbeer tconbeer changed the title Ctrl + Enter does not execute the query on Mac Ctrl + Enter does not execute the query on many terminals May 30, 2023
@kbd
Copy link

kbd commented Jul 10, 2024

I'm using kitty terminal and having this issue. Did y'all figure out why ctrl+enter doesn't work? It would be nice to be able to use ctrl+enter to execute queries. I've tried keymapping option+enter as well, unsuccessfully.

Repository owner locked and limited conversation to collaborators Jul 10, 2024
@tconbeer tconbeer converted this issue into discussion #598 Jul 10, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants