🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac
Article #42544

DataDesk Keyboard (was Re: Two complaints on Word 4.0)

#42544
From: Ken McLeod
Date: Sat, 13 May 1989 09:55
59 lines
3844 bytes
In article <13449@dartvax.Dartmouth.EDU> xxiaoye@eleazar.dartmouth.edu (Xiaoxia Ye) writes:
>The second complaint is specific to the use of Word 4.0 with DataDesk
>keyboard.
>I have been looking at an init that maps the datadesk keyboard (for
>Mac Plus) to the apple extended keyboard.  The init fools every software
>into thinking that I have the extended keyboard.  The confirmation for
>this that MacroMaker treats the F5 on the DataDesk keyboard just like F5
>on Apple Extended keyboard, and Pageup pagedown etc, (although it maps the
>Hoem keys as Help key on Apple Extended, because they are in the same
>position).  I also know that Word 4 is also fooled into thinking that
>it is an Apple Extended keyboard because pageUp and PageDown keys will
>scroll the text one screenful up and down respectively in Word ( a
>feature that is specifically for the people blessed with Extended
>keyboards).  And when I am in the Command... dialog box assigning
>different keystrokes to functions in Word, Word displays them as
>F1..F15 properly as well.  HOWEVER, when I tried to use the command
>"Show Function Keys..." - which will show the function keys equivalents
>for the menu items instead of Command Key equivalents (such as, F1 for
>Cut instead of command-x), Word just would not do it.  Toggling the "Show
>Function Keys..." feature on and off just DOESN'T do a darn thing at
>all.  Is this a bug or that Word recognizes it's a fake Apple Extended
>keyboard when it comes to showing function keys ????

  Actually, it's not really either one.

  The problem (from a programming point of view) is that the DataDesk
keyboard presents itself to the System as a garden-variety Mac Plus
keyboard. Presumably, Word calls SysEnvirons() to determine keyboard
type (or else it looks at the value stored in kbdType), and the value
for a Plus keyboard is returned. Obviously, a Plus keyboard doesn't have
function keys, so "Show Function Keys" fails. :-(

  Dealing with keyDown events is a different matter. Since (again,
presumably) the same keyDown handling code is used in Word regardless
of the type of keyboard attached, an event involving a function key will
be noticed and processed accordingly (assuming an INIT like the QuicKeys
DataDesk INIT has correctly remapped the virtual keycodes).

  To the best of my knowledge, there IS no way for a program to distinguish
between the DataDesk and a standard Plus keyboard, unless you want to wait
around for the user to hit "Page Up", or "F5", or whatever (an event which
may never happen). You can't determine anything by calling the low-level
key translation routines, since the mappings aren't influenced by whether
a key is actually present.

  The point here is that the problems you experienced aren't Word's fault,
since it believes (quite honestly, and in the "Apple-blessed manner") that
you're using a standard Plus keyboard.

  (I'd sure like to hear from someone who knows how the low-level Event
Manager keyboard polling routine works!)

-ken

-- 
==========     .......     =============================================
Ken McLeod    :.     .:    UUCP: ...{spsd,zardoz,felix}!dhw68k!thecloud
==========   :::.. ..:::   INTERNET: thecloud@dhw68k.cts.com
                ////       =============================================
Technical Details
Message-ID: <22925@dhw68k.cts.com>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!uunet!ccicpg!felix!dhw68k!thecloud
References: <13449@dartvax.Dartmouth.EDU>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!sun-barr!cs.utexas.edu!uunet!ccicpg!felix!dhw68k!thecloud
From: thecloud@dhw68k.cts.com (Ken McLeod)
Newsgroups: comp.sys.mac
Subject: DataDesk Keyboard (was Re: Two complaints on Word 4.0)
Keywords: Word 4.0
Message-ID: <22925@dhw68k.cts.com>
Date: 13 May 89 09:55:35 GMT
References: <13449@dartvax.Dartmouth.EDU>
Reply-To: thecloud@dhw68k.cts.com (Ken McLeod)
Organization: Wolfskill & Dowling residence; Anaheim, CA (USA)
Lines: 59