home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / mac / programm / 18706 < prev    next >
Encoding:
Text File  |  1992-11-20  |  4.6 KB  |  119 lines

  1. Newsgroups: comp.sys.mac.programmer
  2. Path: sparky!uunet!lysator.liu.se!jonasw
  3. From: jonasw@lysator.liu.se (Jonas Wallden)
  4. Subject: Re: Command-Option-Down Arrow broken! (MPW)
  5. Message-ID: <1995@lysator.liu.se>
  6. Sender: news@lysator.liu.se
  7. Nntp-Posting-Host: robert.lysator.liu.se
  8. Organization: Lysator Academic Computer Society, Linkoping University, Sweden
  9. References: <1992Nov17.201430.27220@reed.edu> <1992Nov18.172459.12288@waikato.ac.nz> <1992Nov18.054038.1868@reed.edu> <5617@krafla.rhi.hi.is>
  10. Date: Fri, 20 Nov 1992 14:40:47 GMT
  11. Lines: 106
  12.  
  13. rson@rhi.hi.is (Mimir Reynisson) writes:
  14. >I've a similar problem if I eject a CD from my system. The Cmd-Left
  15. >and Cmd-Right key combinations in MPW stop working. I noticed it
  16. >started doing this after I upgraded the CD Rom driver to 4.0.1
  17. >
  18. >It's pretty annoying and I'll downgrade my version of the
  19. >CD Rom driver to see if that fixes anything.
  20. >
  21. >I'm using Sys 7.1 and MPW 3.3a14.
  22.  
  23. I don't use MPW at all, but some days ago when I installed 7.1 (US version)
  24. including the Cyrillic script from my Developer CD to one of my harddisks,
  25. I noticed that Cmd-Left/Right-arrow didn't switch volumes in the Standard-
  26. File-dialog. Instead the flag in the keyboard menu changed!
  27.  
  28. Looks like Cmd-Left/Right-arrow is eaten up by the system!
  29.  
  30. I will probably remove this feature (?) some day by editing the KSWP 0
  31. resource in the system file.
  32.  
  33. Scott Winders posted this article recently:
  34.  
  35. -------------[start article]-----------------------------------------------
  36.   The entries in the 'KSWP' system resource (ID = 0) is what controls
  37.   the switching of the keyboard layouts. Actually, the entries in the
  38.   'KSWP' resource control more than that. This resource is fully
  39.   documented in Inside Macintosh Volume VI, pages 14-43 to 14-44 and
  40.   pages 14-98 to 14-99.
  41.  
  42.   The standard U.S. 'KSWP' resource looks like this:
  43.  
  44.     FFFF 3101 FFFC 3109
  45.     FFFE 4601 0000 4201
  46.     0000 0000
  47.  
  48.   Each long word entry controls a separate function. The first 2 bytes
  49.   (integer) is the verb that the KeyScript procedure will act upon. The
  50.   third byte is the virtual key code for the key that must be pressed
  51.   and the fourth byte is the modifier state that must exist when the
  52.   key is pressed. 
  53.  
  54.   Table 14-3 on page 14-44 outlines the verbs for the KeyScript procedure.
  55.  
  56.   Most of the virtual key codes may be found on pages 191 and 192 of
  57.   Inside Macintosh Volume V or by using ResEdit on the 'KCHR' resource
  58.   in the System file. 
  59.  
  60.   Note on modifier state: Option key down is equal to 8; Shift key down
  61.   is equal to 2; and Command key down is equal to 1. If multiple modifier
  62.   keys are pressed at the same time, their values are added together for
  63.   the modifier state entry.
  64.  
  65.   The second entry in the standard U.S. 'KSWP' resource (FFFC 3109) is
  66.   the one that causes the problems you describe. The first two bytes,
  67.   $FFFC or -4, is the verb "smKeyNextKybd" which means "Switch to next
  68.   keyboard in active script". The third byte, $31, is the virtual key
  69.   code for space. The fourth byte is Command key down (1) plus the
  70.   Option key down (8) which equals $09. 
  71.  
  72.   There are three methods we can use to solve the problem. One method
  73.   is to delete the entry that causes the problem. The 'KSWP' resource
  74.   would then look like this: 
  75.  
  76.     FFFF 3101 FFFE 4601
  77.     0000 4201 0000 0000
  78.  
  79.   The second method is to change the virtual key code to something
  80.   different than $31. If we change it to $4C, Command, Option, and
  81.   Enter would switch keyboard layouts. The 'KSWP' resource would look
  82.   like this:
  83.  
  84.     FFFF 3101 FFFC 4C09
  85.     FFFE 4601 0000 4201
  86.     0000 0000
  87.  
  88.   The third and final method would add two new entries to the 'KSWP'
  89.   resource. One would disable switching from the current keyboard
  90.   (verb "smKeyDisableKybdSwitch") and the other would enable keyboard
  91.   switching (verb "smKeyEnableKybds"). We've set it up so Command,
  92.   Option, and Enter disable switching and Command, Option, and Return
  93.   enable switching. The 'KSWP' resource would look like this:
  94.  
  95.     FFFF 3101 FFFC 3109
  96.     FFFE 4601 0000 4201
  97.     FFF4 4C09 FFF9 2409
  98.     0000 0000
  99.  
  100.   Any one of the above methods will work. The first method is rather
  101.   limiting and is not very flexible. The second method is the most
  102.   straight forward and probably the best. The third method is the most
  103.   flexible and the most complicated from a user point of view.
  104.  
  105.   Note: the four bytes of zeroes at the end of the resource are filler
  106.   and must be present.
  107.  
  108.  
  109.   Scott Winders
  110.   winders@aux.support.apple.com
  111.   "My opinions are my own, not my employer's"
  112. ----------------[end article]------------------------------------------
  113.  
  114.  
  115.   + + + + + + + + + + +
  116.   Jonas Wallden
  117.   jonasw@lysator.liu.se
  118.   + + + + + + + + + + +
  119.