home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / sys / mac / system / 14181 < prev    next >
Encoding:
Internet Message Format  |  1992-11-17  |  4.2 KB

  1. Path: sparky!uunet!ukma!usenet.ins.cwru.edu!agate!apple!apple!macwinders.support.apple.com!user
  2. From: winders@aux.support.apple.com (Scott Winders)
  3. Newsgroups: comp.sys.mac.system
  4. Subject: Re: Killing Cmd-Opt-Space in Sys 7.x
  5. Message-ID: <winders-171192184605@macwinders.support.apple.com>
  6. Date: 18 Nov 92 02:46:34 GMT
  7. References: <1992Nov16.045250.16853@ultb.isc.rit.edu> <1992Nov16.114430.11680@tdb.uu.se>
  8. Sender: daemon@Apple.COM
  9. Followup-To: comp.sys.mac.system
  10. Organization: Apple Computer, Inc.
  11. Lines: 95
  12.  
  13. In article <1992Nov16.114430.11680@tdb.uu.se>, bredell@tdb.uu.se (Mats
  14. Bredell) wrote:
  15. > M.A. Weissman (maw5506@ultb.isc.rit.edu) wrote:
  16. > : I commonly use a Dvorak KCHR layout on my Mac running system 7.1.  Inside Mac
  17. > : documents a really neat feature of switching KCHR layouts every time you hit
  18. > : Cmd-Opt-Space.  This is great if other people wish to use my machine.
  19. > : 
  20. > :     Unfortunately it is not so great if I want to zoom-out in Adobe
  21. > : Illustrator which just so happens to use...you guessed it...Cmd-Opt-Space.
  22. > : 
  23. > :     Does some kind soul out there know how to modify the system to ignore,
  24. > : or use a different key combination, for the command.  I am familliar with 
  25. > : ResEdit, and any help would be appreciated.
  26. > Why not yell at Adobe for using that key sequence? It's their fault if they
  27. > use reserved key combinations.
  28.  
  29. The entries in the 'KSWP' system resource (ID = 0) is what controls
  30. the switching of the keyboard layouts. Actually, the entries in the
  31. 'KSWP' resource control more than that. This resource is fully
  32. documented in Inside Macintosh Volume VI, pages 14-43 to 14-44 and
  33. pages 14-98 to 14-99.
  34.  
  35. The standard U.S. 'KSWP' resource looks like this:
  36.  
  37.   FFFF 3101 FFFC 3109
  38.      FFFE 4601 0000 4201
  39.      0000 0000
  40.  
  41. Each long word entry controls a separate function. The first 2 bytes
  42. (integer) is the verb that the KeyScript procedure will act upon. The
  43. third byte is the virtual key code for the key that must be pressed
  44. and the fourth byte is the modifier state that must exist when the
  45. key is pressed. 
  46.  
  47. Table 14-3 on page 14-44 outlines the verbs for the KeyScript procedure.
  48.  
  49. Most of the virtual key codes may be found on pages 191 and 192 of
  50. Inside Macintosh Volume V or by using ResEdit on the 'KCHR' resource
  51. in the System file. 
  52.  
  53. Note on modifier state: Option key down is equal to 8; Shift key down
  54. is equal to 2; and Command key down is equal to 1. If multiple modifier
  55. keys are pressed at the same time, their values are added together for
  56. the modifier state entry.
  57.  
  58. The second entry in the standard U.S. 'KSWP' resource (FFFC 3109) is
  59. the one that causes the problems you describe. The first two bytes,
  60. $FFFC or -4, is the verb "smKeyNextKybd" which means "Switch to next
  61. keyboard in active script". The third byte, $31, is the virtual key
  62. code for space. The fourth byte is Command key down (1) plus the
  63. Option key down (8) which equals $09. 
  64.  
  65. There are three methods we can use to solve the problem. One method
  66. is to delete the entry that causes the problem. The 'KSWP' resource
  67. would then look like this: 
  68.  
  69.   FFFF 3101 FFFE 4601
  70.   0000 4201 0000 0000
  71.  
  72. The second method is to change the virtual key code to something
  73. different than $31. If we change it to $4C, Command, Option, and
  74. Enter would switch keyboard layouts. The 'KSWP' resource would look
  75. like this:
  76.  
  77.   FFFF 3101 FFFC 4C09
  78.      FFFE 4601 0000 4201
  79.      0000 0000
  80.  
  81. The third and final method would add two new entries to the 'KSWP'
  82. resource. One would disable switching from the current keyboard
  83. (verb "smKeyDisableKybdSwitch") and the other would enable keyboard
  84. switching (verb "smKeyEnableKybds"). We've set it up so Command,
  85. Option, and Enter disable switching and Command, Option, and Return
  86. enable switching. The 'KSWP' resource would look like this:
  87.  
  88.   FFFF 3101 FFFC 3109
  89.   FFFE 4601 0000 4201
  90.   FFF4 4C09 FFF9 2409
  91.   0000 0000
  92.  
  93. Any one of the above methods will work. The first method is rather
  94. limiting and is not very flexible. The second method is the most
  95. straight forward and probably the best. The third method is the most
  96. flexible and the most complicated from a user point of view.
  97.  
  98. Note: the four bytes of zeroes at the end of the resource are filler
  99. and must be present.
  100.  
  101.  
  102. Scott Winders
  103. winders@aux.support.apple.com
  104.  
  105. "My opinions are my own, not my employer's"
  106.