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

Implement Readline Keybindings #2154

Closed
2 tasks done
computersarecool opened this issue Aug 31, 2017 · 9 comments
Closed
2 tasks done

Implement Readline Keybindings #2154

computersarecool opened this issue Aug 31, 2017 · 9 comments
Labels
🛠 Type: Feature Request Issue or PR is a feature request/proposal for Hyper
Milestone

Comments

@computersarecool
Copy link

computersarecool commented Aug 31, 2017

  • I am on the latest Hyper.app version

  • This is actually a duplicate of Ctrl-A on Windows does not move to beginning of line #1716 but that was closed without explanation.

  • Windows 10

  • Hyper.app version 1.4.2

  • I am using the default .hyper.js

  • Relevant information from devtools N/A

  • The issue is reproducible in vanilla Hyper.app:

Issue

On every terminal emulator I have ever used these keyboard shortcuts are implemented. They come from GNU and handle basic things like: going to the beginning of line, going to the end of line etc.

Right now Hyper (incorrectly in my opinion) maps Ctl-a to select all. There has been some progress in implementing keymaps in hyper but looking at the list here I do not see any place where things such as go to beginning of line are even addressed.

There is also no documentation on how to do this. It seems like there is not a shortcut for go to the beginning of line available.

Shouldn't hyper implement the same keyboard shortcuts as other terminal emulators and if it can not, should at least expose the default Readline keybindings?

Issue #1716 raises this same issue, but not is restricted to just the Ctl-A issue.
#1876 Claims to fix this issue but there is:

A. No description of what is changed

B. When you look at what is implemented by keymapping there is no explanation about how to implement readlines keybindings.

@ppot
Copy link
Contributor

ppot commented Sep 1, 2017

@computersarecool Hello there. Thanks for making an issue. Let me clear things out or you a little bit on what #1876 provide.

First

It seems like there is not a shortcut for go to the beginning of line available.
This is currently handled by default inside hterm and since we are moving to xterm it will be integrated automatically.

Second

Bash Keyboard Shortcuts are not Keymaps for the app. They are keybinding for Bash. The goal of keymaps is to provide a non intrusive configuration for defaults that are customizable and not overriding defaults of internal app such as emacs, vim, nvim, nano and so on.

Third

B. What are you referencing by how to implement deadlines keybindings. ?

@computersarecool
Copy link
Author

computersarecool commented Sep 1, 2017

This is currently handled by default inside hterm

Sounds good but mosh for Chrome and Secure Shell for Chrome both use hterm and do not have this problem with keybinding. Are you sure that it is not a WebKit issue here?

For your Second point:

That distinction makes some sense but if that's what #1876 does I think that closing issues like #833 and #1716 is a mistake because it doesn't actually address those issues.

The main point here is this:

I use a terminal emulator to access programs, mainly emacs. I would like all key combinations to be passed to the shell that I am running. When I have run bash on:
Terminal, iTerm2, xTerm, Terminator, Mosh for Chrome, Secure Shell, PuTTY, Cygwin, Ubuntu for Windows etc. C-a goes to the beginning of the line. On Hyper it does not.

I do not know why Hyper is intercepting any keys but it seems like a bad idea (or at least something that should be toggle-able).

The ideal situation would be that you can run Bash from Hyper, and run emacs within bash and your keys go directly to the program (they don't interfere with Hyper and select all text on the screen or anything like that at all).

Can we make this possible?

@ppot
Copy link
Contributor

ppot commented Sep 1, 2017

Like we say. This will be much more easier to implement once we switch to xterm. Since hterm steel the key actions. I currently did hack some of it see: https://github.com/zeit/hyper/blob/master/lib/hterm.js#L236-L242

@computersarecool
Copy link
Author

Cool. I appreciate your work. I am really into this idea because I am hoping for a cross platform terminal emulator that just works.

Still, I think this issue should be left open until xterm is working.

@chabou chabou added this to the 2.0.0 milestone Sep 1, 2017
@chabou chabou added the 🛠 Type: Feature Request Issue or PR is a feature request/proposal for Hyper label Sep 1, 2017
@computersarecool
Copy link
Author

Is there any way I can track the progress of this or possibly help?
I am waiting to switch to Hyper until this is implemented and can't wait.

@timothyis
Copy link
Contributor

timothyis commented Jan 23, 2018

@computersarecool Very sorry for the delay in response. Xterm is now implemented in the current Canary release but this feature, as of yet, has not been implemented. We'll try and keep this issue updated when there's progress.

@chabou
Copy link
Contributor

chabou commented Feb 3, 2018

I think this is fixed since new keymapping and not using ctrl+[a-z] shortcut anymore.

@chabou
Copy link
Contributor

chabou commented Feb 3, 2018

@computersarecool Can you check our last canary and confirm that it's suits your needs?

@chabou chabou added the 👀 Awaiting Response Issue or PR is awaiting a response from the author label Feb 3, 2018
@computersarecool
Copy link
Author

My preliminary testing shows this as working on Windows when you set the shell to bash.exe.
Nice!
Thanks so much.

@albinekb albinekb removed the 👀 Awaiting Response Issue or PR is awaiting a response from the author label Feb 5, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🛠 Type: Feature Request Issue or PR is a feature request/proposal for Hyper
Projects
None yet
Development

No branches or pull requests

5 participants