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 edit:key-reader to show what a keypress sends and how to bind it #1058

Open
krader1961 opened this issue Jun 30, 2020 · 0 comments
Open

Comments

@krader1961
Copy link
Contributor

@krader1961 krader1961 commented Jun 30, 2020

There was a short discussion on Gitter/IRC/IM today about figuring out how to bind a key to a specific action. I pointed out that the fish shell provides the fish_key_reader utility which will show the chars received in response to a key press and more importantly the appropriate statement to bind that key to an action. It would be nice if elvish provided similar functionality. In fact, I think we can do slightly better by making it a builtin of the edit: namespace which shows any existing binding as well as the statement required to create a binding to that key. @hanche proposed naming the command edit:key-reader.

P.S., The discussion began because the delete/backspace key sent the "del" (0x7F) char and it wasn't obvious whether the symbolic name Delete or Backspace should be used in binding the key. The symbolic names are not documented. While most of them are, more or less, self-evident their meanings need to be documented. Especially since some, like Backspace and Delete, do not have a self-evident meaning.

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

Successfully merging a pull request may close this issue.

None yet
1 participant
You can’t perform that action at this time.