Article View: comp.sys.next.hardware
Article #12Re: Scotty gets out his flame thrower over ADB
From: Simson L. Garfinkel
Date: Tue, 27 Oct 1992 16:25
Date: Tue, 27 Oct 1992 16:25
52 lines
3049 bytes
3049 bytes
The fact is that NeXT has a portable interface for the keyboard, and the
programmers at the corporations that are having problems with the keyboard just
didn't read the documentation.
(from event.h:)
struct { /* For key-down and key-up events */
short reserved;
short repeat; /* for key-down: nonzero if really a repeat */
unsigned short charSet; /* character set code */
unsigned short charCode;/* character code in that set */
unsigned short keyCode; /* device-dependent key number */
short keyData; /* device-dependent info */
} key;
If you used key.charSet and key.charCode, you win.
If you used key.keyCode and key.keyData, you lose.
Its just that simple. WordPerfect did it wrong. Co-eXist did it wrong.
Executor did it wrong, but then they fixed it (an easy fix). SBook 2.0 did it
wrong, but SBook 2.05 does it right.
In article <1992Oct26.221617.7372@wdl.loral.com> mdm@wdl1.wdl.loral.com (Mike D
Marchionna) writes:
> The fact is NeXT really blew it when it came to designing a protable software
> interface to the keyboard. This is one instance when NeXT should have taken
> a tip from the X11 environment. YES THAT'S WHAT I SAID. The X window
> environment runs on zillion different keyboards without a hitch. And if
> there is a problem you can remap the keyboard easily and effectively. The
> secret is to provide a symbolic name for every key you find on all the
various
> keyboards in the world today. Keycodes can then be mapped to return
> specific key symbols. The programmer translates a keypress event in a
> completely portable way by doing a XKeycodeToKeysym() call. The returned key
> symbol can then be used to decide what the key press actually means. For
> example if I want to know if the Up Arrow key was pressed I simply compare
> translate the keycode to a KeySym and then check if the KeySym = "Up". This
is
> completely portable. NeXT simply never anticipated that NeXTSTEP would
> ever run on hardware with anything but the original keyboard. If you
> want to understand how X solved this problem read the xmodmap and xev
> man pages on any NeXT machine. Hey I don't like X either, but this one
> problem the X community dealt with better then NeXTSTEP.
>
> Write it off to NeXTSTEP development arrogance.
>
Write it off to not reading the documentation.
--
................................................................simson
Technical Details
Message-ID:
<1992Oct27.162538.10288@next.cambridge.ma.us>Path:
arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!ai-lab!next.cambridge.ma.us!simsongReferences:
<1992Oct26.221617.7372@wdl.loral.com>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!snorkelwacker.mit.edu!ai-lab!next.cambridge.ma.us!simsong From: simsong@next.cambridge.ma.us (Simson L. Garfinkel) Newsgroups: comp.sys.next.hardware Subject: Re: Scotty gets out his flame thrower over ADB Message-ID: <1992Oct27.162538.10288@next.cambridge.ma.us> Date: 27 Oct 92 16:25:38 GMT References: <1992Oct26.221617.7372@wdl.loral.com> Sender: simsong@next.cambridge.ma.us Reply-To: simsong@next.cambridge.ma.us Organization: Simson Garfinkel and Associates, Inc. Lines: 52