I am using Ocaml from a Linux terminal. Sometimes it gets stuck in weird mode when it doesn't respond to the keyboard as expected. For example, if I press the up, down, left and right arrows, it generates ^[[A^[[B^[[C^[[D at the input. Alternatively, sometimes if I type the letter only once, it can repeat the same letter three times in a row and / or if I type the delete button, it will instead type β^ Hβ.
Does anyone know what is going on here? I assume that I inadvertently do something to switch the mode, but I cannot switch it or why it switches in the first place.
source share