Open
Description
Description:
Since gview is a local TUI application, it would be great to allow users to customize the default key bindings.
What you need to do:
- Add support for the ron format to read key bindings from a configuration file.
- Load the key bindings from a file like .config/gview/key_bind.ron if it exists.
- If the file does not exist, use the default key bindings.
- If loading fails, print an error message and exit.
- Refactor the current key bindings into a pub struct KeyBind (or similar) so that components can read from it and behave accordingly.
This is a somewhat complex change affecting the whole codebase, but I have implemented the same feature in a previous TUI project. Feel free to refer to that implementation as a guide:
ref: kyoto7250/zhobo#20
If you have any questions, please comment on this issue!