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
The text was updated successfully, but these errors were encountered:
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
Adding inter-char timing data.
Display control chars using their \cX equivalent as well as any backlash equivalent (e.g., \e for 0x1b) recognized by fish.
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.
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.