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

Re: IIc+ & ProTerm



vSimon D. Williams <bb065@chebucto.ns.ca> wrote:

> On Fri, 9 Jun 2006, Pete PPP wrote:
> 
> > Proterm uses keyboard emulation to simulate an extended keyboard.
> > 
> > On a //c+ (or even a //c) use the option key with the arrows. Perhaps a
> > little unwieldy but that is how it is. 
> 
> Bless you Pete! It works!!!

A little speculation as to the background behind this behaviour...

On 8-bit Apple II machines, the only information available from the
keyboard is the encoded value of the key you pressed. The arrow keys
generate control characters (e.g. Ctrl-H for LeftArrow). The
Command/Option (OpenApple/ClosedApple) keys are detected separately as
if they were paddle/joystick buttons. In machines with the shift-key mod
(standard on some models), the shift key can be detected in the same
manner.

The Control key cannot be detected, which means that if ProTerm sees an
$08 in the keyboard buffer, it can't tell whether you pressed Ctrl-H or
the LeftArrow key.

The Option/ClosedApple key can be detected separately, so they use this
to identify when you want to generate a VT-100 arrow key sequence.


On the IIgs, software has access to more information about the keys
being pressed.

At the simplest level, it can tell which modifier keys are being held
down (Command, Option, Ctrl, Shift and Caps Lock). For example, this
means that the left arrow key can be distinguished from Ctrl-H, because
an $08 ended up in the keyboard buffer without the Ctrl key being held
down. Using this method would, however, confuse Ctrl-LeftArrow with
Ctrl-H.

ProTerm can therefore rely on the modifier register to detect that you
are pressing an arrow key and generate the appropriate VT-100 key
sequence instead, and still allow you to type Ctrl-H and have it handled
correctly.

It is also possible with an ADB keyboard on the IIgs (but not the
built-in keyboard on a IIe upgraded to a IIgs) to bypass the standard
keyboard decoding and directly access the keyboard's raw keycodes. In
this case, every individual key-up and key-down operation can be
identified, allowing even more accurate identification of which keys are
being pressed, e.g. left-shift vs right-shift.

-- 
David Empson
dempson@actrix.gen.nz