Skip to content

Add support for customizable key bindings using key_bind.ron #16

@kyoto7250

Description

@kyoto7250

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:

  1. Add support for the ron format to read key bindings from a configuration file.
  2. 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.
  1. 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions