5 releases (breaking)
Uses old Rust 2015
0.7.0 | Jan 19, 2022 |
---|---|
0.6.0 | Feb 12, 2021 |
0.3.0 | Jan 20, 2020 |
0.2.0 | Jan 21, 2019 |
0.1.1 | Dec 21, 2017 |
#777 in Hardware support
185KB
388 lines
Cursive-Hexview
A simple and basic hexviewer which can be used with cursive.
Documentation
Can be found on docs.rs
Usage
Just put this into your Cargo.toml
[dependencies]
cursive_hexview = "0.7"
and this in your rust code.
extern crate cursive_hexview;
For a minimal example see examples
folder.
lib.rs
:
A simple HexView
for cursive.
It is meant to display a data of u8 and format them like e.g. hexdump does. You can interact with the view with your keyboard. Currently the following keys are implemented:
Key | Action |
---|---|
← | Move the cursor to the next, left nibble. If already on the left edge of the view, the event will be "ignored", which means the outer view will handle the event (e.g. focus the view next to this one) |
→ | Move the cursor to the next, right nibble. If already on the right edge of the view, the event will be "ignored", which means the outer view will handle the event (e.g. focus the view next to this one) |
↑ | Move the cursor to the previous line. If already on the top edge of the view, the event will be "ignored", which means the outer view will handle the event (e.g. focus the view next to this one) |
↓ | Move the cursor to the next line. If already on the bottom edge of the,view, the event will be "ignored", which means the outer view will handle the event (e.g. focus the view next to this one) |
Home | Move the cursor to the beginning of the current line. |
End | Move the cursor to the end of the current line. |
Shift + Home | Move the cursor to position (0 ,0) which means to the beginning of the view. |
Shift + End | Move the cursor to the last nibble in the view. |
+ | Increase the amount of data by one byte. It will be filled up with 0 . |
- | Decrease the amount of data by one. Any data that will leave the viewable area, will be permanantly lost. |
0-9, a-f | Set the nibble under the cursor to the corresponding hex value. Note, that this is only available in the editable state, see DisplayState and set_display_state |
Dependencies
~7.5MB
~128K SLoC