From: jonasw@lysator.liu.se (Jonas Wallden)
Subject: Re: Command-Option-Down Arrow broken! (MPW)
Organization: Lysator Academic Computer Society, Linkoping University, Sweden
Date: Fri, 20 Nov 1992 14:40:47 GMT

rson@rhi.hi.is (Mimir Reynisson) writes:
>I've a similar problem if I eject a CD from my system. The Cmd-Left
>and Cmd-Right key combinations in MPW stop working. I noticed it
>started doing this after I upgraded the CD Rom driver to 4.0.1
>
>It's pretty annoying and I'll downgrade my version of the
>CD Rom driver to see if that fixes anything.
>
>I'm using Sys 7.1 and MPW 3.3a14.

I don't use MPW at all, but some days ago when I installed 7.1 (US version)
including the Cyrillic script from my Developer CD to one of my harddisks,
I noticed that Cmd-Left/Right-arrow didn't switch volumes in the Standard-
File-dialog. Instead the flag in the keyboard menu changed!

Looks like Cmd-Left/Right-arrow is eaten up by the system!

I will probably remove this feature (?) some day by editing the KSWP 0
resource in the system file.

Scott Winders posted this article recently:

-------------[start article]-----------------------------------------------
  The entries in the 'KSWP' system resource (ID = 0) is what controls
  the switching of the keyboard layouts. Actually, the entries in the
  'KSWP' resource control more than that. This resource is fully
  documented in Inside Macintosh Volume VI, pages 14-43 to 14-44 and
  pages 14-98 to 14-99.

  The standard U.S. 'KSWP' resource looks like this:

    FFFF 3101 FFFC 3109
    FFFE 4601 0000 4201
    0000 0000

  Each long word entry controls a separate function. The first 2 bytes
  (integer) is the verb that the KeyScript procedure will act upon. The
  third byte is the virtual key code for the key that must be pressed
  and the fourth byte is the modifier state that must exist when the
  key is pressed. 

  Table 14-3 on page 14-44 outlines the verbs for the KeyScript procedure.

  Most of the virtual key codes may be found on pages 191 and 192 of
  Inside Macintosh Volume V or by using ResEdit on the 'KCHR' resource
  in the System file. 

  Note on modifier state: Option key down is equal to 8; Shift key down
  is equal to 2; and Command key down is equal to 1. If multiple modifier
  keys are pressed at the same time, their values are added together for
  the modifier state entry.

  The second entry in the standard U.S. 'KSWP' resource (FFFC 3109) is
  the one that causes the problems you describe. The first two bytes,
  $FFFC or -4, is the verb "smKeyNextKybd" which means "Switch to next
  keyboard in active script". The third byte, $31, is the virtual key
  code for space. The fourth byte is Command key down (1) plus the
  Option key down (8) which equals $09. 

  There are three methods we can use to solve the problem. One method
  is to delete the entry that causes the problem. The 'KSWP' resource
  would then look like this: 

    FFFF 3101 FFFE 4601
    0000 4201 0000 0000

  The second method is to change the virtual key code to something
  different than $31. If we change it to $4C, Command, Option, and
  Enter would switch keyboard layouts. The 'KSWP' resource would look
  like this:

    FFFF 3101 FFFC 4C09
    FFFE 4601 0000 4201
    0000 0000

  The third and final method would add two new entries to the 'KSWP'
  resource. One would disable switching from the current keyboard
  (verb "smKeyDisableKybdSwitch") and the other would enable keyboard
  switching (verb "smKeyEnableKybds"). We've set it up so Command,
  Option, and Enter disable switching and Command, Option, and Return
  enable switching. The 'KSWP' resource would look like this:

    FFFF 3101 FFFC 3109
    FFFE 4601 0000 4201
    FFF4 4C09 FFF9 2409
    0000 0000

  Any one of the above methods will work. The first method is rather
  limiting and is not very flexible. The second method is the most
  straight forward and probably the best. The third method is the most
  flexible and the most complicated from a user point of view.

  Note: the four bytes of zeroes at the end of the resource are filler
  and must be present.


  Scott Winders
  winders@aux.support.apple.com
  "My opinions are my own, not my employer's"
----------------[end article]------------------------------------------


  + + + + + + + + + + +
  Jonas Wallden
  jonasw@lysator.liu.se
  + + + + + + + + + + +