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

Default terminal keyboard shortcuts (in browser) #14364

Open
dannaf opened this issue Oct 28, 2024 · 2 comments
Open

Default terminal keyboard shortcuts (in browser) #14364

dannaf opened this issue Oct 28, 2024 · 2 comments

Comments

@dannaf
Copy link

dannaf commented Oct 28, 2024

Bug Description:

Three keyboard shortcuts I've come to expect in the terminal (rightly so or otherwise) are ctrl+L to clear the terminal, ctrl+U to clear the line to the left of the cursor, and ctrl+K to clear the line to the right of the cursor. However in theia it seems the default behavior is different. (And it is not so clear to me how to set it to this behavior.)

There is a similar situation with ctrl+a and ctrl+e, which I've come to expect for moving the terminal cursor to the beginning of the line and end of the line, respectively. ctrl+e works as expected, but ctrl+a does select all instead, which I argue is not expected default behavior in the terminal (it is in the editor).

Steps to Reproduce:

  1. Access theia in the browser via theia-ide (can even try this via the Theia Cloud demo at theia-ide.org)
  2. Pressing ctrl+U at the terminal works as expected; pressing ctrl+L at the terminal works as expected. Pressing ctrl+K at the terminal does not work as expected.
  3. Pressing ctrl+k at the terminal does not clear to the end/right of the line (instead it clears up, see next).
  4. Pressing ctrl+k at the terminal, when there are multiple lines displayed, clears it to the top (like expected from ctrl+L, which also does this — but I think ctrl+k should not do this).
  5. Pressing ctrl+e at the terminal works as expected; pressing ctrl+a at the terminal does not, it does select all instead of moving the cursor to the start of the line.

Additional info

Part of the issue is that it is not clear to me how I would set these keyboard shortcuts myself to override the default behavior. This is because I don't have an example of the keyboard shortcut setting to use based on the ctrl+u and ctrl+e combinations that work as expected. Is this because of how the keyboard even is handled by the browser itself, before it is even registered in theia? This situation makes it all the more so relevant to have these shortcuts as the default, if possible, so users will not get stuck about how to set these as custom shortcuts.

Note that the Home and End keys at least seem to work as expected in the terminal, via the browser, which is good. But the ctrl+a/ctrl+e shortcuts are more effective alternatives in my opinion (and apparently in broader opinion, since I did not make these shortcuts up).

System Information

  • Operating System: Theia running on Ubuntu 24.04 aarch64 minimal via Theia-IDE; accessed from Windows 11 in the browser.
  • Theia Version: 1.54 (accessed via Firefox 131.0 on Windows)
@JonasHelming
Copy link
Contributor

This only affects the browser version, correct? Do all shortcuts work as expected in the electron version?

@dannaf
Copy link
Author

dannaf commented Oct 30, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants