The AccuTerm forum has moved. Go to community.rocketsoftware.com to register for the new Rocket forum. |
ESC key |
Post Reply |
Author | |
anonymous
Groupie Joined: January 15 2004 Location: United States Status: Offline Points: 46 |
Post Options
Thanks(0)
Posted: July 13 2004 at 12:15pm |
I don't see the ESCape key referenced. Was that key omitted on purpose or just overlooked?
|
|
PSchellenbach
Admin Group Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
|
You are right! We did not define the ESC key as one of the detectable keyboard commands. This is intentional, but may not be feasible ultimately. Since the ESC character is used as a lead-in for other keys either we need to re-program the ESC key to send something besides ESC or we need timed input, which is not supported by all host platforms. I have given this some thought and if it is necessary to detect ESC for these routines to be useful in real-world applications, I think I will add the timed-input function to detect it. For those platforms that do not support timed input maybe just using two consecutive ESC characters would work.
Thanks, Pete |
|
PSchellenbach
Admin Group Moderator Joined: December 15 2003 Location: United States Status: Offline Points: 2150 |
Post Options
Thanks(0)
|
Ok - I gave in and added support for the ESC key in the next version of the library. This makes the platform dependent code more complex because the only universal way to detect the ESC key is to use a timed input, and if another key is not received in a very short interval after the ESC key, then assume its an ESC, otherwise, its a lead-in for a multi-byte ESCAPE sequence.
Thanks, Pete |
|
bob@rjoslyn.com
Newbie Joined: December 17 2004 Status: Offline Points: 3 |
Post Options
Thanks(0)
|
Most platforms support System(14) or equivilent to indicate that there is something in the buffer. If the current character is 27 and the buffer is not empty then the contents of the buffer were supplied by the system rather than by a key stroke simply because nobody is fast enough to get his finger on the next key that soon. That isn't very scientific but it has worked ever since the IN VAR revision to AP was published. On UD it is INPUT BUFF,-1. Mark Brown says that he has had to introduce a slight delay on some platforms because the SYSTEM(14) execute before the system had generated the next two characters. YMMV
|
|
BobJ
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |