dijo icon indicating copy to clipboard operation
dijo copied to clipboard

Remapping keys

Open unixfile opened this issue 5 years ago • 6 comments

Would be nice to be able to remap keys.

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

unixfile avatar Jul 23 '20 21:07 unixfile

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 :smile:

michaelowens avatar Jul 24 '20 08:07 michaelowens

Should be possible once a config file feature is implemented.

oppiliappan avatar Jul 29 '20 04:07 oppiliappan

Environment variable would also work.

unixfile avatar Jul 29 '20 16:07 unixfile

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"

oppiliappan avatar May 13 '21 17:05 oppiliappan

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?

B4rc1 avatar Feb 07 '22 21:02 B4rc1

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.

salastro avatar Mar 22 '22 14:03 salastro