Re: problem with wait_key() and arrows

new topic     » goto parent     » topic index » view thread      » older message » newer message
DerekParnell said...
petelomax said...

Having part of the i/o system in hll could be a problem:

  ? get_key() 
  ? gets(0) 

If the user keys Esc, "hello" then the hll could buffer a 'h' and the low-level gets return "ello".

Since you've put "ifdef not WINDOWS then" around that code it would mean the behavior differs between platforms.

Regards, Pete

Having ESC sequences processed in Unix-type systems will cause problems regardless of whether this is done in a library or done in the eui executable. In the example you've given, in Unix-type systems we would see ESC-h followed by "ello" and in Windows we would see ESC followed by "hello".

See Wikipedia to get an idea how complex processing escape sequences can get.

All the more reason to get this handled in either the stdlib or in the backend. We shouldn't have to deal with solving this problem every time someone wants to write a console app.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu