[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Fgetchar/Fread
Fgetchar() and related calls (Cconin(), Cauxin(), etc.) are capable of
returning the BIOS scan codes for cursor keys &c directly, and so the
kernel is in a bit of a quandry when considering an XKEY'd key; does
the caller want the standard scan code stuff (only), or would they prefer
the XKEY escape sequence? For compatibility reasons, and because scan
codes cover more possible keys than XKEY does, I chose the latter answer.
With Fread(), there isn't any choice: Fread() of a cursor key can't give
you a scan code or any other way to tell it's a cursor key except via
the XKEY sequence. There also isn't really any compatibility issue; Fread
of any special key under TOS always returned NUL, which wasn't very useful
(and so changing this would break virtually no programs).
Re: screen: I admit it's a bit odd to have programs behaving differently
when screen is running or not. Actually, I think that on an ST, screen
type programs should use Fgetchar() or something similar rather than Fread(),
and pass the scan code along through the pseudo terminal. That's why
pty's can pass 4 bytes per character, and doing it that way means that
existing TOS applications can use the normal BIOS or GEMDOS calls to
read cursor keys, etc.
Regards,
Eric