Subj : ESC key in user input
To : All
From : Nightfox
Date : Sat Feb 06 2010 06:02 pm
In writing JavaScript mods for Synchronet, I've noticed some oddness related
to checking for the ESC key in user input.
I've noticed that there is no key variable defined for ESC in sbbsdefs.js, so
I've always defined it in my own scripts as "\x1b" (alternatively, defining the
ESC key using ascii(27) also seems to work).
In one script where I use a lightbar user interface, checking for the ESC key
apparently caused the script to quit unexpectedly when scrolling too fast
through the list of items by holding down the up or down arrow keys; the
problem went away when I removed the check for the ESC key. I've also noticed
that Synchronet JavaScript mods tend to take a second or two to respond to the
ESC key, although I've seen that in other doors too, including older DOS doors
(i.e., IceEdit).
Is there an issue with checking for the ESC key in user input? Are the issues
that I've mentioned common, and are there any ways to get around them (besides
not checking for ESC)?
Nightfox
---
� Synchronet � Digital Distortion BBS: digdist.bbsindex.com