use setcbreak instead of setraw, fixes #53 - #54
Conversation
C0D3D3V
commented
Mar 8, 2021
This breaks already functioning systems like cutie. |
insidewhy
commented
Mar 9, 2021
@C0D3D3V You could build |
C0D3D3V
commented
Mar 9, 2021
Yes, I was a bit hasty, sorry. Cutie still works. Only the keycode of the enter key is wrong as I pointed out in my PR. |
magmax
commented
Mar 9, 2021
Wow... Cutie is very similar to inquirer, the reason that made me write readchar XD Do you think we should revert this? |
insidewhy
commented
Mar 9, 2021
I think the majority of people don't want the enter key to do weird unexpected stuff and it should be easier to work around this being on than this being off |
magmax
commented
Mar 9, 2021
Reverted as v3.0.4 |
I just tested We could also define the enter code to be both "\x0d" and "\x0a", then the problem would not exist. |
insidewhy
commented
Mar 9, 2021
Noooo |
I cannot break previous way of work. |
Tested locally, works much better. setcbreak is definitely a better option than setraw.
See https://www.tutorialspoint.com/terminal-control-functions-in-python for more info.