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

enhance *src/keyreader.cpp* so it provides more value than `xxd` and `od` provides #2991

Closed
krader1961 opened this Issue May 2, 2016 · 5 comments

Comments

Projects
None yet
4 participants
@krader1961
Contributor

krader1961 commented May 2, 2016

Is src/keyreader.cpp used by anyone? I'm working my way through making the fish C++ code follow a consistent style and noticed the aforementioned module. It's not documented and doesn't do anything you can't do using other tools like od and xxd.


For 2.3.1 release:

  • Documentation needs to match program output
  • Fix HTML display error
  • Update release notes

@krader1961 krader1961 self-assigned this May 2, 2016

@krader1961 krader1961 added the cleanup label May 2, 2016

@ridiculousfish

This comment has been minimized.

Show comment
Hide comment
@ridiculousfish

ridiculousfish May 2, 2016

Member

make key_reader builds the tool key_reader. This is a little nicer than the alternatives (I use bash's read), but it's odd that it's part of fish. I have no objection to eliminating it.

Member

ridiculousfish commented May 2, 2016

make key_reader builds the tool key_reader. This is a little nicer than the alternatives (I use bash's read), but it's odd that it's part of fish. I have no objection to eliminating it.

@zanchey

This comment has been minimized.

Show comment
Hide comment
@zanchey

zanchey May 6, 2016

Member

I use it sometimes; seems like a low-cost thing to keep, although perhaps adding it as a build target to the Travis CI builds would help make sure it doesn't bitrot.

Member

zanchey commented May 6, 2016

I use it sometimes; seems like a low-cost thing to keep, although perhaps adding it as a build target to the Travis CI builds would help make sure it doesn't bitrot.

@krader1961

This comment has been minimized.

Show comment
Hide comment
@krader1961

krader1961 May 6, 2016

Contributor

I'm inclined to agree that we should keep it; especially since a couple of trivial enhancements I have in mind would make it much more useful than the alternatives and thus worth maintaining. Furthermore, I think we should rename it fish_key_reader and install it just like we do fish_indent. That would have the side-effect of causing Travis CI to build it.

The trivial enhancements include

  1. Adding inter-char timing data.

  2. Display control chars using their \cX equivalent as well as any backlash equivalent (e.g., \e for 0x1b) recognized by fish.

  3. Use a fixed width for the numeric fields so the information remains vertically aligned.

A straightforward, but non-trivial, enhancement is to recognize sequences that correspond to key names recognized by the bind command and display the key name.

Contributor

krader1961 commented May 6, 2016

I'm inclined to agree that we should keep it; especially since a couple of trivial enhancements I have in mind would make it much more useful than the alternatives and thus worth maintaining. Furthermore, I think we should rename it fish_key_reader and install it just like we do fish_indent. That would have the side-effect of causing Travis CI to build it.

The trivial enhancements include

  1. Adding inter-char timing data.

  2. Display control chars using their \cX equivalent as well as any backlash equivalent (e.g., \e for 0x1b) recognized by fish.

  3. Use a fixed width for the numeric fields so the information remains vertically aligned.

A straightforward, but non-trivial, enhancement is to recognize sequences that correspond to key names recognized by the bind command and display the key name.

@krader1961 krader1961 added enhancement and removed cleanup labels May 6, 2016

@krader1961 krader1961 added this to the next-2.x milestone May 8, 2016

@krader1961 krader1961 changed the title from should we kill *src/keyreader.cpp*? to enhance *src/keyreader.cpp* so it provides more value than `xxd` and `od` provides May 8, 2016

krader1961 added a commit that referenced this issue Jun 20, 2016

enhance the key_reader program
The original `key_reader` program was useful but didn't do much that `xxd`
or `od -tx1z` didn't do. Furthermore, it wasn't built and installed by
default. This change adds features that make it superior to those programs
for decoding interactive key presses and makes it a first-class citizen
like the `fish_indent` program that is always available.

Fixes #2991

@floam floam referenced this issue Jul 3, 2016

Closed

enhance the key_reader program #3012

0 of 2 tasks complete

@floam floam modified the milestones: next-2.x, 2.3.1 Jul 3, 2016

@floam floam reopened this Jul 3, 2016

@floam

This comment has been minimized.

Show comment
Hide comment
@floam

floam Jul 3, 2016

Member

The program output in the docs doesn't match the program output and the rendered HTML displays incorrectly.

Member

floam commented Jul 3, 2016

The program output in the docs doesn't match the program output and the rendered HTML displays incorrectly.

@floam floam closed this Jul 3, 2016

@floam

This comment has been minimized.

Show comment
Hide comment
@floam

floam Jul 3, 2016

Member

I got new docs into 2.3.1.

Member

floam commented Jul 3, 2016

I got new docs into 2.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment