News for hackers. Stuff that matters.
Re:Comprehensive Keyboard Handling in Terminals by denotational on Sunday April 02, 2023 @04:18PM (#35414713)
> "unusable" a overly dramatic

Disagree. I used to use Emacs with evil-mode, but I gave up because of this issue.

If I entered `ESC` then `k` (i.e. return to normal mode and move up a line) too quickly on an SSH connection, there was a good chance the `read` syscall on the PTTY file descriptor would return two characters (determined via `strace`) instead of two subsequent calls returning a single character each.

This makes it literally impossible for Emacs to distinguish it from `M-k` (i.e. `kill-line`), so I’d “randomly” see lines deleted before I figured out what was going on.

The effect is a lot more pronounced over SSH where a spike in network latency can cause two subsequent TCP segments to reach the host essentially back-to-back (or even be retransmitted as a single segment), leading to this behaviour of `read` returning two characters.

Re:Comprehensive Keyboard Handling in Terminals by donio on Sunday April 02, 2023 @10:10PM (#35417713)
I see. I don't use the vi modes so it never occurred to me that ESC vs meta would be timing sensitive.