joshuto icon indicating copy to clipboard operation
joshuto copied to clipboard

why I can't bind ctrl-j to other command, the ctrl-j can only be {open: }

Open 0xnofoot opened this issue 2 years ago • 4 comments

截屏2023-12-09 21 22 49

the ctrl+j doesn't work

0xnofoot avatar Dec 09 '23 13:12 0xnofoot

I can reproduce the problem. Seems like a bug.

I configured

keymap = [
...
  { keys = ["ctrl+k"], commands = ["parent_cursor_move_up"] },
  { keys = ["ctrl+j"], commands = ["parent_cursor_move_down"] },
...
]

ctrl+k does what is expected, but ctrl+j really opens the file.

I also tried the older version v0.9.5, which cannot parse my current configuration, and it it also opens files with ctrl+j.

DLFW avatar Dec 16 '23 08:12 DLFW

yes,hope author could fix it

0xnofoot avatar Dec 18 '23 02:12 0xnofoot

Did a bit of research online and it appears that Ctrl+J is handled differently by readline/bash etc.

So to joshuto, it looks like you pressed enter.

kamiyaa avatar Dec 19 '23 15:12 kamiyaa

There are many ways and good libraries to handle term input correctly. If joshuto isn't using one or is using ncurses, than that is just unfortunate. Notcurses is a good example of a modern lib intended for tui apps.

litoj avatar Jan 05 '24 13:01 litoj