lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: LYNX-DEV ac81 chartrans problems


From: Michael Sokolov
Subject: Re: LYNX-DEV ac81 chartrans problems
Date: Wed, 15 Oct 1997 10:28:39 -0400 (EDT)

Leonid, the reason E0 causes problems so often is simple: new (101/102 key as
opposed to 83/84 key) keyboards distinguish between traditional keys (those
present on 83/84 key keyboards) and new ones by sending E0 before the scan code
when a new key is pressed. The code that follows E0 is the scan code for the
corresponding traditional key. For example, left Enter sends 1C and right Enter
sends E0 1C. This scheme was chosen so that if the ROM BIOS doesn't support the
enhanced keyboard the traditional keys and the new keys would be equivalent. On
the other hand, new ROM BIOSes can distinguish between them by looking for E0.
For example, if the ROM BIOS supports the enhanced keyboard, white arrow keys
are affected by NumLock but grey arrow keys aren't.
When someone (DOS or an application that bypasses it) asks the ROM BIOS "what
key did the user just press?", ROM BIOS returns a 16-bit code. If the key has
an ASCII code (or a code in some other character set), it is returned in AL and
AH contains the scan code. If the key is something like F1 or PgUp that doesn't
have a code in any character set, AL is set to 00 and AH contains the so-called
extended key code (usually but not always equal to the scan code). This what
happens when the standard ROM BIOS function is called. When the enhanced
keyboard support was added, the ROM BIOS developers wanted the enhanced
keyboard-aware apps to be able to distinguish between, say, left Enter and
right Enter. They couldn't modify the standard ROM BIOS function, since that
could break existing apps, and so they made a new function. The latter is
different from the standard one in that it returns E0 instead of 00 in AL if a
key like grey PgUp is pressed.
If an app uses the new function, it has to weed AL=E0 out as a control key.
Unfortunately, in the GOST Alternative Cyrillic character set E0 happens to be
a lowercase Russian letter. Therefore, an app that uses the new ROM BIOS
function won't be able to handle this letter very well. This is probably what's
happening in Lynx.
An interesting aside: As you probably know, this problem exists in Norton
Commander (at least version 3.0). People had to patch NCMAIN.EXE to make it
accept E0 as a valid character. However, NC uses the standard ROM BIOS
function, not the new one. Its filtering of AL=E0 is unnecessary.
I hope this answers at least some of your questions.

Sincerely,
Michael Sokolov
;
; To UNSUBSCRIBE:  Send a mail message to address@hidden
;                  with "unsubscribe lynx-dev" (without the
;                  quotation marks) on a line by itself.
;

reply via email to

[Prev in Thread] Current Thread [Next in Thread]