Closed photm5 closed 6 years ago
If you type a non-Escape key just after Escape, it reacts instantly. To reproduce, run the code above, and press ESC a
or sth. similar.
What OS and terminal? I don't think termbox does any kind of waiting. It's up to a terminal to send the ESC byte or to wait.
Oops, sorry for the long delay! I use urxvt on NixOS. Interesting, I just tried to reproduce this again to double-check, and it only happens in tmux! So this might be a tmux bug then?
Ah, it's not a bug, it's a feature. Doesn't happen if I put set -s escape-time 0
in my ~/.tmux.conf
.
Thanks for your helpful reply! :)
Even though I use INPUT_ESC mode (and thus assume no special behaviour for the Escape key), the Escape key event takes longer than other keys.
To reproduce, run this code in a python3 REPL:
Upon pressing any key, termbox will exit quickly; but when pressing Escape, it takes a bit longer.
I checked how fast vim responds (it is almost instantaneous), so I assume this should be possible. (I hope they didn't apply insane hackery.) Edit: I did that check by opening a new terminal and running vim in it; as I just found out, vim responds slowly too when run inside of tmux. See my comment below.