Euphoria Ticket #499: Trace and escape code sequences do not play nice

See http://openeuphoria.org/forum/113791.wc

It looks like we've hardcoded the values such that we assume get_key() returns 265 for F1 and 266 for F2 and 258 for the down key.

However, we also take into account that F1 can be returned as a series of key presses (the escape sequence), {27, 91, 49, 49}. F2 is assumed to be {27, 91, 49, 50} and the down key is {27, 91, 66}.

None of these values are universal. Fixing this requires hooking into terminfo or termcap to determine what these keypresses really are. However, it is forseeable that termcap or terminfo might report back that there is no F1 or F2 key for this terminal (e.g. if TERM and TERMCAP are set incorrectly, or if someone's ssh'd multiple times and the TERM info got lost in the chain or - much more rarely - the person is using a keyboard with no F1 key).

I propose that we take some universal keys that are not used for anything by the trace screen right now, and use them as seconds that have the same function.

E.g. '1' can be F1, '2' can be F2, and 'j' can be the down key.

Details

Type: Bug Report Severity: Minor Category: Interpreter
Assigned To: jimcbrown Status: Fixed Reported Release:
Fixed in SVN #: 4536 View VCS: 4536 Milestone: 4.0.0RC2

1. Comment by jeremy Dec 05, 2010

I agree with this totally. There is no reason we need to be using F1, F2, ...

2. Comment by jimcbrown Dec 05, 2010

Well, we can keep both. Either F1 or '1' goes to main screen, either F2 or '2' goes to the trace screen, etc.

So, Windows users and those Unix users who had this working in their terminals don't need to be inconvenienced, but those who had a problem now have a valid workaround.

3. Comment by jimcbrown Dec 05, 2010

This has been implemented in svn:4536

4. Comment by jimcbrown Dec 05, 2010

Someone should update the tutorials mentioned in http://openeuphoria.org/forum/113316.wc#113316

Search



Quick Links

User menu

Not signed in.

Misc Menu