Closed brokensword2018 closed 2 years ago
What are you trying to achieve with bind, and ctrl+g?
my program based on FTXUI, I use ctrl+g to start my program
Could you execute the example: https://arthursonzogni.com/FTXUI/examples/?file=component/print_key_press Using your "bind"?
And see what is sent for the "enter" and "space" characters?
@brokensword2018 ?
@brokensword2018 ?
enter is ( 13 ) -> (special) space is ( 32 ) -> character( )
It seems to be working fine. If you believe this is a bug in FTXUI, could you post a reproducer?
It is probably an issue with you program. I can't really say what, because you haven't posted it.
@brokensword2018 ?
enter is ( 13 ) -> (special) space is ( 32 ) -> character( )
It seems to be working fine. If you believe this is a bug in FTXUI, could you post a reproducer?
It is probably an issue with you program. I can't really say what, because you haven't posted it.
https://github.com/brokensword2018/ftxui-starter you can use this to reproduce the problem . add bind -x '"\C-m":the abs path of ftxui-starter' to ~/.bashrc , then source ~/.bashrc, and press ctrl + m. use the way to start the program, there no "press enter" in 1.log。 and a strang thing is that press enter will start the program.
It seems to be working fine. If you believe this is a bug in FTXUI, could you post a reproducer? It is probably an issue with you program. I can't really say what, because you haven't posted it.
https://github.com/brokensword2018/ftxui-starter you can use this to reproduce the problem . add bind -x '"\C-m":' to ~/.bashrc , then source ~/.bashrc, and press ctrl + m. use the way to start the program, there no "press enter" int 1.log。 and enter will start the program.
os : Ubuntu 20.04.3 LTS
Thanks! I can reproduce.
Instead of sending "10" (New line) when pressing Enter, it sounds like we get "13" (Carriage Return) when going through "bind". I am not sure why bind works this way.
I think what I can do, is converting 10/13 code into one of the two. This would make Window / non-Window consistent. This would also make Linux / Linux+Bind consistent.
good job! waitting for you to fix this problem.
Normally, it works well。 in ubuntu, when I use bind command to start my program based on FTXUI. the on_enter callback of input doesn,t work. like this. add "bind -x '"\C-g":" to ~/.bashrc. so I can use 'ctrl+g' to start my program.