oppiliappan/dijo

Remapping keys

Opened this issue · 6 comments

Would be nice to be able to remap keys.

I use dvorak, and the the movement keys htns instead of hjkl.

Would like to see this as well now, especially considering the keybinding q (to close dijo) was removed recently. Instead of pressing 1 key, I now have to press 4 (shift + : + q + enter, as ctrl-c doesn't save). Would be nice to see this configurable as well 😄

Should be possible once a config file feature is implemented.

Environment variable would also work.

This is available as of v0.2.7, remains undocumented however. The following is a sample config for dvorak:

[look]
true_chr = "·"
false_chr = "·"
future_chr = "·"
grid_size = 2

[colors]
reached = "cyan"
todo = "magenta"
inactive = "light black"

[keybinds]
week_mode = "v"
global_week_mode = "V"

[keybinds.grid]
up = "n"
down = "t"
left = "h"
right = "s"

[keybinds.cursor]
up = "N"
down = "T"
left = "H"
right = "S"
B4rc1 commented

Does not work on

❯ dijo --version
dijo 0.2.7
❯ cat ~/.config/dijo/config.toml
[look]
true_chr = "·"
false_chr = "·"
future_chr = "·"

[colors]
reached = "cyan"
todo = "magenta"
inactive = "light black"

[keybinds]
week_mode = "v"
global_week_mode = "V"

[keybinds.grid]
up = "r"
down = "t"
left = "d"
right = "n"

[keybinds.cursor]
up = "R"
down = "T"
left = "D"
right = "N"

looking at the code this is not implemented?

I think as @B4rc1 mentioned, this does not actually work in the current version. Additionally, is it possible to remap the : key? I usually remap it to ; since this is quicker.