I've noticed that the Escape key became a lot less responsive between versions of DFTerm. Before 0.31.11, I was using a version I downloaded a couple of weeks ago. When 0.31.11 was released, I upgraded DFTerm and found that hitting escape takes a second or two to respond, and sometimes it doesn't work at all. Meanwhile, on the server machine, the game is perfectly responsive.
The server machine is running Windows 7 64-bit and the client is connecting with PuTTY on Ubuntu 10.04. Is anyone else having this issue?
This is a result of waiting for escape sequences longer than in previous versions of dfterm2. Here's a description of problem:
In a terminal, when you press non-character keys, such as arrow keys or function keys, your terminal client sends an escape sequence instead. For example, for up arrow key this is typically:
(ESC) [ A
(note ESC character vs ESC key. When I say ESC key, I refer to the key on the keyboard, and ESC char as a byte of value 27)
When dfterm2 finds escape sequences such as this, it interprets it as up arrow key.
Now, it's not guaranteed that the client who sends this escape sequence is going to send it all at once. It's possible it just sends the ESC character, then some time passes, and then it sends the rest.
Earlier versions of dfterm2 did not wait at all, and if the characters were not sent at once (happens with flash interface and bad connections) it will be like you pressed the ESC key, then pressed [ and then pressed A.
After introducing the web interface, I implemented a 100 millisecond wait for partially sent escape sequence such as this. For 0.31.11 DF release and dfterm2, I increased that time to 500 milliseconds. This means that if dfterm2 receives ESC character, it will wait for 500 milliseconds before interpreting that as pressing the actual ESC key.
For terminal programs it's bad practice to use the ESC key on keyboard for any single function for this reason. Ncurses waits for 1 second, for example. DF wasn't made with that in mind.
I increased the time, because the soiled flash interface to dfterm2 works weirdly and sends the keys one at a time, which means almost all escape sequences would be broken with old implementation.
The time isn't configurable, unfortunately as of yet. This seems to be a problem so I'll come up with something for next experimental update.