fltrdr
fltrdr copied to clipboard
Cannot rebind keys
Keys currently cannot be rebound. HJKL is awkward for some non-standard/non-us keyboard layouts.
As fltrdr already exposes most if not all of the necessary commands to fit the functionality of the existing keybinds, I'd suggest a format in the config something like:
bind {key} {command} {args}
I don't think this would be top priority, so you can use the arrow keys to navigate or you can just edit src/fltrdr/tui.cc
to suit your preference and compile.
I think this would be a great addition, thanks for bringing this up.
There are a few things that need to be implemented beforehand.
- The command function that parses the commands should be refactored into some kind of data structure for more efficient lookup.
- The input loop that parses what key was pressed and calls the corresponding functions should be put in a hash map where the key is the character pressed, and the value is perhaps an enum that could be used to look up the function call from an array.
I think after the above is done, making an interface to assign a specific key to a certain function would be possible.