home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / U-Z / VideoToolbox 4.95.sit / VideoToolbox / VideoToolboxSources / IsCmdPeriod.c < prev    next >
MacBinary  |  1994-11-15  |  4.3 KB  |  [TEXT/MMCC]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Tue Nov 15 18:29:39 1994, modified Tue Nov 15 18:29:39 1994, creator 'MMCC', type ASCII, 3283 bytes "IsCmdPeriod.c" , at 0xd53 782 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MMCC]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0d 49 73 43 6d 64 50 | 65 72 69 6f 64 2e 63 00 |..IsCmdP|eriod.c.|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 4d 43 | 43 00 00 00 00 00 00 00 |.TEXTMMC|C.......|
|00000050| 00 00 00 00 00 0c d3 00 | 00 03 0e aa ee f4 e3 aa |........|........|
|00000060| ee f4 e3 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 a1 b2 00 00 |........|........|
|00000080| 2f 2a 0d 49 73 43 6d 64 | 50 65 72 69 6f 64 2e 63 |/*.IsCmd|Period.c|
|00000090| 0d 59 6f 75 20 70 61 73 | 73 20 69 74 20 61 6e 20 |.You pas|s it an |
|000000a0| 65 76 65 6e 74 20 72 65 | 63 6f 72 64 20 61 6e 64 |event re|cord and|
|000000b0| 20 69 74 20 74 65 6c 6c | 73 20 79 6f 75 20 77 68 | it tell|s you wh|
|000000c0| 65 74 68 65 72 20 6f 72 | 20 6e 6f 74 20 74 68 65 |ether or| not the|
|000000d0| 20 75 73 65 72 20 68 61 | 73 20 68 69 74 0d 63 6f | user ha|s hit.co|
|000000e0| 6d 6d 61 6e 64 2d 70 65 | 72 69 6f 64 20 28 69 2e |mmand-pe|riod (i.|
|000000f0| 65 2e 20 22 63 61 6e 63 | 65 6c 22 29 2e 20 54 68 |e. "canc|el"). Th|
|00000100| 65 20 73 74 72 61 69 67 | 68 74 66 6f 72 77 61 72 |e straig|htforwar|
|00000110| 64 20 77 61 79 20 62 72 | 65 61 6b 73 20 6f 6e 20 |d way br|eaks on |
|00000120| 73 6f 6d 65 20 6e 6f 6e | 2d 55 53 0d 53 79 73 74 |some non|-US.Syst|
|00000130| 65 6d 73 20 62 65 63 61 | 75 73 65 20 74 68 65 20 |ems beca|use the |
|00000140| 6b 65 79 73 20 67 65 74 | 20 72 65 6d 61 70 70 65 |keys get| remappe|
|00000150| 64 20 28 69 2e 65 2e 20 | 70 65 72 69 6f 64 21 3d |d (i.e. |period!=|
|00000160| 27 2e 27 29 2e 20 54 68 | 65 20 65 6c 61 62 6f 72 |'.'). Th|e elabor|
|00000170| 61 74 65 20 77 61 79 20 | 69 73 0d 73 75 70 70 6f |ate way |is.suppo|
|00000180| 73 65 64 20 74 6f 20 77 | 6f 72 6b 20 6f 6e 20 61 |sed to w|ork on a|
|00000190| 6c 6c 20 53 79 73 74 65 | 6d 73 2c 20 62 75 74 20 |ll Syste|ms, but |
|000001a0| 68 61 73 6e 27 74 20 62 | 65 65 6e 20 74 65 73 74 |hasn't b|een test|
|000001b0| 65 64 2e 0d 0d 57 41 52 | 4e 49 4e 47 3a 0d 54 68 |ed...WAR|NING:.Th|
|000001c0| 69 73 20 68 61 73 6e 27 | 74 20 62 65 65 6e 20 74 |is hasn'|t been t|
|000001d0| 65 73 74 65 64 2e 20 49 | 20 68 61 76 65 6e 27 74 |ested. I| haven't|
|000001e0| 20 72 65 61 64 20 74 68 | 65 20 53 63 72 69 70 74 | read th|e Script|
|000001f0| 20 4d 61 6e 61 67 65 72 | 20 63 68 61 70 74 65 72 | Manager| chapter|
|00000200| 2e 20 54 68 65 20 63 61 | 63 68 69 6e 67 0d 73 63 |. The ca|ching.sc|
|00000210| 68 65 6d 65 20 28 73 61 | 76 69 6e 67 20 22 70 65 |heme (sa|ving "pe|
|00000220| 72 69 6f 64 22 29 20 6d | 69 67 68 74 20 66 61 69 |riod") m|ight fai|
|00000230| 6c 20 69 66 20 79 6f 75 | 20 63 68 61 6e 67 65 20 |l if you| change |
|00000240| 73 63 72 69 70 74 20 73 | 79 73 74 65 6d 73 20 62 |script s|ystems b|
|00000250| 65 74 77 65 65 6e 20 63 | 61 6c 6c 73 0d 74 6f 20 |etween c|alls.to |
|00000260| 49 73 43 6d 64 50 65 72 | 69 6f 64 2e 0d 0d 64 67 |IsCmdPer|iod...dg|
|00000270| 70 2e 0d 0d 43 6f 70 69 | 65 64 20 66 72 6f 6d 20 |p...Copi|ed from |
|00000280| 63 6f 6d 70 2e 73 79 73 | 2e 6d 61 63 2e 70 72 6f |comp.sys|.mac.pro|
|00000290| 67 72 61 6d 6d 69 6e 67 | 3a 0d 0d 46 72 6f 6d 3a |gramming|:..From:|
|000002a0| 20 6b 30 34 34 34 37 37 | 40 68 6f 62 62 65 73 2e | k044477|@hobbes.|
|000002b0| 6b 7a 6f 6f 2e 65 64 75 | 20 28 4a 61 6d 69 65 20 |kzoo.edu| (Jamie |
|000002c0| 52 2e 20 4d 63 43 61 72 | 74 68 79 29 0d 44 61 74 |R. McCar|thy).Dat|
|000002d0| 65 3a 20 31 33 20 4d 61 | 79 20 39 33 20 31 39 3a |e: 13 Ma|y 93 19:|
|000002e0| 34 31 3a 33 38 20 47 4d | 54 0d 4f 72 67 61 6e 69 |41:38 GM|T.Organi|
|000002f0| 7a 61 74 69 6f 6e 3a 20 | 4b 61 6c 61 6d 61 7a 6f |zation: |Kalamazo|
|00000300| 6f 20 43 6f 6c 6c 65 67 | 65 0d 0d 3e 50 4c 45 41 |o Colleg|e..>PLEA|
|00000310| 53 45 20 65 76 65 72 79 | 62 6f 64 79 20 72 65 61 |SE every|body rea|
|00000320| 64 20 74 68 65 20 22 49 | 6e 74 65 72 6e 61 74 69 |d the "I|nternati|
|00000330| 6f 6e 61 6c 20 43 61 6e | 63 65 6c 69 6e 67 22 20 |onal Can|celing" |
|00000340| 74 65 63 68 20 6e 6f 74 | 65 20 28 69 6e 0d 3e 22 |tech not|e (in.>"|
|00000350| 54 65 78 74 22 29 2c 20 | 6f 72 20 69 6e 20 74 68 |Text"), |or in th|
|00000360| 65 20 6f 66 66 69 63 69 | 61 6c 20 6a 61 72 67 6f |e offici|al jargo|
|00000370| 6e 3a 20 4d 2e 54 45 2e | 49 6e 74 65 72 6e 61 74 |n: M.TE.|Internat|
|00000380| 69 6f 6e 61 6c 43 61 6e | 63 65 6c 20 28 79 65 63 |ionalCan|cel (yec|
|00000390| 68 29 2e 0d 3e 0d 3e 49 | 74 20 65 78 70 6c 61 69 |h)..>.>I|t explai|
|000003a0| 6e 73 20 74 68 61 74 20 | 43 6f 6d 6d 61 6e 64 20 |ns that |Command |
|000003b0| 6b 65 79 20 63 6f 6d 62 | 69 6e 61 74 69 6f 6e 73 |key comb|inations|
|000003c0| 20 77 69 74 68 20 6e 6f | 6e 2d 6c 65 74 74 65 72 | with no|n-letter|
|000003d0| 20 6b 65 79 73 20 6d 61 | 79 0d 3e 6d 61 70 20 74 | keys ma|y.>map t|
|000003e0| 6f 20 43 6f 6d 6d 61 6e | 64 2d 53 68 69 66 74 20 |o Comman|d-Shift |
|000003f0| 6b 65 79 20 63 6f 64 65 | 73 20 6f 6e 20 69 6e 74 |key code|s on int|
|00000400| 65 72 6e 61 74 69 6f 6e | 61 6c 20 6b 65 79 62 6f |ernation|al keybo|
|00000410| 61 72 64 73 2e 20 41 6e | 64 20 77 65 0d 3e 61 6c |ards. An|d we.>al|
|00000420| 6c 20 6b 6e 6f 77 20 74 | 68 61 74 20 43 6f 6d 6d |l know t|hat Comm|
|00000430| 61 6e 64 2d 53 68 69 66 | 74 20 67 65 74 73 20 69 |and-Shif|t gets i|
|00000440| 6e 74 65 72 63 65 70 74 | 65 64 20 62 79 20 74 68 |ntercept|ed by th|
|00000450| 65 20 6f 70 65 72 61 74 | 69 6e 67 20 73 79 73 74 |e operat|ing syst|
|00000460| 65 6d 2e 0d 3e 54 68 69 | 73 20 69 73 20 61 20 70 |em..>Thi|s is a p|
|00000470| 61 69 6e 2c 20 62 65 63 | 61 75 73 65 20 69 74 20 |ain, bec|ause it |
|00000480| 6d 65 61 6e 73 20 79 6f | 75 20 77 6f 6e 27 74 20 |means yo|u won't |
|00000490| 62 65 20 61 62 6c 65 20 | 74 6f 20 63 61 6e 63 65 |be able |to cance|
|000004a0| 6c 20 6f 70 65 72 61 74 | 69 6f 6e 73 2c 0d 3e 6f |l operat|ions,.>o|
|000004b0| 72 20 68 61 76 65 20 61 | 63 63 65 73 73 20 74 6f |r have a|ccess to|
|000004c0| 20 73 69 6d 69 6c 61 72 | 20 6b 65 79 62 6f 61 72 | similar| keyboar|
|000004d0| 64 20 73 68 6f 72 74 63 | 75 74 73 2e 0d 20 0d 48 |d shortc|uts.. .H|
|000004e0| 65 72 65 27 73 20 74 68 | 65 20 66 75 6e 63 74 69 |ere's th|e functi|
|000004f0| 6f 6e 20 49 20 75 73 65 | 2e 20 20 49 20 74 68 69 |on I use|. I thi|
|00000500| 6e 6b 20 49 20 74 6f 6f | 6b 20 69 74 20 70 72 65 |nk I too|k it pre|
|00000510| 74 74 79 20 6d 75 63 68 | 20 73 74 72 61 69 67 68 |tty much| straigh|
|00000520| 74 20 66 72 6f 6d 0d 74 | 68 65 20 54 4e 2c 20 62 |t from.t|he TN, b|
|00000530| 75 74 20 49 20 6d 69 67 | 68 74 20 68 61 76 65 20 |ut I mig|ht have |
|00000540| 6d 61 64 65 20 73 6f 6d | 65 20 6d 69 6e 6f 72 20 |made som|e minor |
|00000550| 69 6d 70 72 6f 76 65 6d | 65 6e 74 2c 20 49 20 64 |improvem|ent, I d|
|00000560| 6f 6e 27 74 20 72 65 63 | 61 6c 6c 0d 77 68 61 74 |on't rec|all.what|
|00000570| 2e 20 20 41 6e 79 77 61 | 79 2c 20 6d 61 79 62 65 |. Anywa|y, maybe|
|00000580| 20 74 68 69 73 27 6c 6c | 20 73 61 76 65 20 73 6f | this'll| save so|
|00000590| 6d 65 6f 6e 65 20 61 20 | 66 65 77 20 6d 69 6e 75 |meone a |few minu|
|000005a0| 74 65 73 27 20 77 6f 72 | 74 68 20 6f 66 0d 74 79 |tes' wor|th of.ty|
|000005b0| 70 69 6e 67 3a 0d 2d 20 | 2d 2d 20 0d 20 4a 61 6d |ping:.- |-- . Jam|
|000005c0| 69 65 20 4d 63 43 61 72 | 74 68 79 20 09 49 6e 74 |ie McCar|thy .Int|
|000005d0| 65 72 6e 65 74 3a 20 6b | 30 34 34 34 37 37 40 6b |ernet: k|044477@k|
|000005e0| 7a 6f 6f 2e 65 64 75 09 | 41 70 70 6c 65 4c 69 6e |zoo.edu.|AppleLin|
|000005f0| 6b 3a 20 6a 2e 6d 63 63 | 61 72 74 68 79 0d 0d 48 |k: j.mcc|arthy..H|
|00000600| 49 53 54 4f 52 59 3a 0d | 31 33 20 4d 61 79 20 39 |ISTORY:.|13 May 9|
|00000610| 33 20 4a 61 6d 69 65 20 | 4d 63 43 61 72 74 68 79 |3 Jamie |McCarthy|
|00000620| 20 70 6f 73 74 65 64 20 | 69 74 20 6f 6e 20 63 6f | posted |it on co|
|00000630| 6d 70 2e 73 79 73 2e 6d | 61 63 2e 70 72 6f 67 72 |mp.sys.m|ac.progr|
|00000640| 61 6d 6d 69 6e 67 0d 36 | 2f 32 33 2f 39 33 09 64 |amming.6|/23/93.d|
|00000650| 67 70 20 63 6f 72 72 65 | 63 74 65 64 20 62 75 67 |gp corre|cted bug|
|00000660| 20 6f 66 20 75 73 69 6e | 67 20 22 3d 22 20 69 6e | of usin|g "=" in|
|00000670| 73 74 65 61 64 20 6f 66 | 20 22 3d 3d 22 20 69 6e |stead of| "==" in|
|00000680| 20 61 6e 20 69 66 20 73 | 74 61 74 65 6d 65 6e 74 | an if s|tatement|
|00000690| 2e 0d 09 43 68 65 63 6b | 20 66 6f 72 20 76 61 6c |...Check| for val|
|000006a0| 69 64 20 68 61 6e 64 6c | 65 20 62 65 66 6f 72 65 |id handl|e before|
|000006b0| 20 64 65 72 65 66 65 72 | 65 6e 63 69 6e 67 2e 20 | derefer|encing. |
|000006c0| 54 69 67 68 74 65 6e 65 | 64 20 75 70 20 63 6f 64 |Tightene|d up cod|
|000006d0| 65 20 61 20 62 69 74 2e | 0d 09 4e 6f 74 20 74 65 |e a bit.|..Not te|
|000006e0| 73 74 65 64 2e 20 0d 36 | 2f 33 30 2f 39 33 09 64 |sted. .6|/30/93.d|
|000006f0| 67 70 20 54 68 65 20 65 | 6c 61 62 6f 72 61 74 65 |gp The e|laborate|
|00000700| 20 6d 65 74 68 6f 64 20 | 72 65 71 75 69 72 65 64 | method |required|
|00000710| 20 66 6f 72 20 69 6e 74 | 65 72 6e 61 74 69 6f 6e | for int|ernation|
|00000720| 61 6c 20 73 79 73 74 65 | 6d 73 20 73 65 65 6d 73 |al syste|ms seems|
|00000730| 0d 65 78 63 65 73 73 69 | 76 65 20 66 6f 72 20 72 |.excessi|ve for r|
|00000740| 6f 75 74 69 6e 65 20 75 | 73 65 2c 20 73 6f 20 49 |outine u|se, so I|
|00000750| 20 61 64 64 65 64 20 61 | 20 73 68 6f 72 74 63 75 | added a| shortcu|
|00000760| 74 2e 20 57 65 20 67 6f | 20 74 68 72 6f 75 67 68 |t. We go| through|
|00000770| 20 74 68 65 20 77 68 6f | 6c 65 20 0d 72 69 67 61 | the who|le .riga|
|00000780| 6d 61 72 6f 6c 65 20 6f | 6e 63 65 2c 20 61 6e 64 |marole o|nce, and|
|00000790| 20 6e 6f 74 65 20 77 68 | 61 74 20 74 68 65 20 43 | note wh|at the C|
|000007a0| 6d 64 2d 70 65 72 69 6f | 64 20 6b 65 79 20 70 72 |md-perio|d key pr|
|000007b0| 65 73 73 65 73 20 77 65 | 72 65 20 74 72 61 6e 73 |esses we|re trans|
|000007c0| 6c 61 74 65 64 20 74 6f | 2e 0d 4f 6e 20 73 75 62 |lated to|..On sub|
|000007d0| 73 65 71 75 65 6e 74 20 | 6f 63 63 61 73 69 6f 6e |sequent |occasion|
|000007e0| 73 20 77 65 20 6a 75 73 | 74 20 28 71 75 69 63 6b |s we jus|t (quick|
|000007f0| 6c 79 29 20 63 68 65 63 | 6b 20 66 6f 72 20 74 68 |ly) chec|k for th|
|00000800| 61 74 2e 20 0d 2a 2f 0d | 23 69 6e 63 6c 75 64 65 |at. .*/.|#include|
|00000810| 20 22 56 69 64 65 6f 54 | 6f 6f 6c 62 6f 78 2e 68 | "VideoT|oolbox.h|
|00000820| 22 20 0d 23 69 6e 63 6c | 75 64 65 20 3c 54 79 70 |" .#incl|ude <Typ|
|00000830| 65 73 2e 68 3e 0d 23 69 | 6e 63 6c 75 64 65 20 3c |es.h>.#i|nclude <|
|00000840| 53 63 72 69 70 74 2e 68 | 3e 0d 0d 42 6f 6f 6c 65 |Script.h|>..Boole|
|00000850| 61 6e 20 49 73 43 6d 64 | 50 65 72 69 6f 64 28 72 |an IsCmd|Period(r|
|00000860| 65 67 69 73 74 65 72 20 | 45 76 65 6e 74 52 65 63 |egister |EventRec|
|00000870| 6f 72 64 20 2a 65 76 65 | 6e 74 29 0d 7b 0d 09 73 |ord *eve|nt).{..s|
|00000880| 74 61 74 69 63 20 63 68 | 61 72 20 70 65 72 69 6f |tatic ch|ar perio|
|00000890| 64 3d 30 3b 09 2f 2f 20 | 77 68 61 74 20 63 6d 64 |d=0;.// |what cmd|
|000008a0| 2d 70 65 72 69 6f 64 20 | 67 65 74 73 20 6d 61 70 |-period |gets map|
|000008b0| 70 65 64 20 74 6f 2e 0d | 0d 09 69 66 28 70 65 72 |ped to..|..if(per|
|000008c0| 69 6f 64 29 20 72 65 74 | 75 72 6e 20 28 65 76 65 |iod) ret|urn (eve|
|000008d0| 6e 74 2d 3e 77 68 61 74 | 20 3d 3d 20 6b 65 79 44 |nt->what| == keyD|
|000008e0| 6f 77 6e 20 7c 7c 20 65 | 76 65 6e 74 2d 3e 77 68 |own || e|vent->wh|
|000008f0| 61 74 20 3d 3d 20 61 75 | 74 6f 4b 65 79 29 0d 09 |at == au|toKey)..|
|00000900| 09 26 26 20 28 65 76 65 | 6e 74 2d 3e 6d 6f 64 69 |.&& (eve|nt->modi|
|00000910| 66 69 65 72 73 20 26 20 | 63 6d 64 4b 65 79 29 0d |fiers & |cmdKey).|
|00000920| 09 09 26 26 20 28 65 76 | 65 6e 74 2d 3e 6d 65 73 |..&& (ev|ent->mes|
|00000930| 73 61 67 65 20 26 20 63 | 68 61 72 43 6f 64 65 4d |sage & c|harCodeM|
|00000940| 61 73 6b 29 20 3d 3d 20 | 70 65 72 69 6f 64 3b 0d |ask) == |period;.|
|00000950| 09 65 6c 73 65 7b 0d 09 | 09 42 6f 6f 6c 65 61 6e |.else{..|.Boolean|
|00000960| 20 69 73 43 6d 64 50 65 | 72 69 6f 64 3d 46 41 4c | isCmdPe|riod=FAL|
|00000970| 53 45 3b 0d 09 09 73 68 | 6f 72 74 20 6b 65 79 43 |SE;...sh|ort keyC|
|00000980| 6f 64 65 3b 0d 09 09 6c | 6f 6e 67 20 6b 65 79 49 |ode;...l|ong keyI|
|00000990| 6e 66 6f 2c 73 74 61 74 | 65 2c 6b 65 79 43 49 44 |nfo,stat|e,keyCID|
|000009a0| 3b 0d 09 09 48 61 6e 64 | 6c 65 20 68 4b 43 48 52 |;...Hand|le hKCHR|
|000009b0| 3b 0d 09 09 50 74 72 20 | 70 4b 43 48 52 3b 0d 09 |;...Ptr |pKCHR;..|
|000009c0| 09 0d 09 09 69 66 20 28 | 28 65 76 65 6e 74 2d 3e |....if (|(event->|
|000009d0| 6d 6f 64 69 66 69 65 72 | 73 20 26 20 63 6d 64 4b |modifier|s & cmdK|
|000009e0| 65 79 29 0d 09 09 09 26 | 26 20 28 65 76 65 6e 74 |ey)....&|& (event|
|000009f0| 2d 3e 77 68 61 74 20 3d | 3d 20 6b 65 79 44 6f 77 |->what =|= keyDow|
|00000a00| 6e 20 7c 7c 20 65 76 65 | 6e 74 2d 3e 77 68 61 74 |n || eve|nt->what|
|00000a10| 20 3d 3d 20 61 75 74 6f | 4b 65 79 29 29 7b 0d 09 | == auto|Key)){..|
|00000a20| 09 09 70 4b 43 48 52 3d | 28 50 74 72 29 47 65 74 |..pKCHR=|(Ptr)Get|
|00000a30| 45 6e 76 69 72 6f 6e 73 | 28 73 6d 4b 43 48 52 43 |Environs|(smKCHRC|
|00000a40| 61 63 68 65 29 3b 09 2f | 2f 20 72 65 74 75 72 6e |ache);./|/ return|
|00000a50| 73 20 4e 55 4c 4c 20 75 | 6e 64 65 72 20 53 79 73 |s NULL u|nder Sys|
|00000a60| 74 65 6d 20 36 0d 09 09 | 09 69 66 28 70 4b 43 48 |tem 6...|.if(pKCH|
|00000a70| 52 20 3d 3d 20 4e 55 4c | 4c 29 7b 0d 09 09 09 09 |R == NUL|L){.....|
|00000a80| 6b 65 79 43 49 44 3d 47 | 65 74 53 63 72 69 70 74 |keyCID=G|etScript|
|00000a90| 28 47 65 74 45 6e 76 69 | 72 6f 6e 73 28 73 6d 4b |(GetEnvi|rons(smK|
|00000aa0| 65 79 53 63 72 69 70 74 | 29 2c 73 6d 53 63 72 69 |eyScript|),smScri|
|00000ab0| 70 74 4b 65 79 73 29 3b | 0d 09 09 09 09 68 4b 43 |ptKeys);|.....hKC|
|00000ac0| 48 52 3d 47 65 74 52 65 | 73 6f 75 72 63 65 28 27 |HR=GetRe|source('|
|00000ad0| 4b 43 48 52 27 2c 6b 65 | 79 43 49 44 29 3b 0d 09 |KCHR',ke|yCID);..|
|00000ae0| 09 09 09 69 66 28 68 4b | 43 48 52 21 3d 4e 55 4c |...if(hK|CHR!=NUL|
|00000af0| 4c 29 70 4b 43 48 52 3d | 2a 68 4b 43 48 52 3b 0d |L)pKCHR=|*hKCHR;.|
|00000b00| 09 09 09 7d 65 6c 73 65 | 20 68 4b 43 48 52 3d 4e |...}else| hKCHR=N|
|00000b10| 55 4c 4c 3b 0d 09 09 09 | 69 66 28 70 4b 43 48 52 |ULL;....|if(pKCHR|
|00000b20| 20 21 3d 20 4e 55 4c 4c | 29 7b 0d 09 09 09 09 2f | != NULL|){...../|
|00000b30| 2f 20 72 65 2d 74 72 61 | 6e 73 6c 61 74 65 20 74 |/ re-tra|nslate t|
|00000b40| 68 65 20 76 69 72 74 75 | 61 6c 20 6b 65 79 20 74 |he virtu|al key t|
|00000b50| 6f 20 61 20 63 68 61 72 | 2c 20 77 69 74 68 6f 75 |o a char|, withou|
|00000b60| 74 20 74 68 65 20 63 6f | 6d 6d 61 6e 64 20 6d 6f |t the co|mmand mo|
|00000b70| 64 69 66 69 65 72 0d 09 | 09 09 09 6b 65 79 43 6f |difier..|...keyCo|
|00000b80| 64 65 3d 28 65 76 65 6e | 74 2d 3e 6d 65 73 73 61 |de=(even|t->messa|
|00000b90| 67 65 20 26 20 6b 65 79 | 43 6f 64 65 4d 61 73 6b |ge & key|CodeMask|
|00000ba0| 29 20 3e 3e 20 38 3b 09 | 2f 2f 20 74 68 65 20 76 |) >> 8;.|// the v|
|00000bb0| 69 72 74 75 61 6c 20 6b | 65 79 0d 09 09 09 09 6b |irtual k|ey.....k|
|00000bc0| 65 79 43 6f 64 65 20 7c | 3d 20 65 76 65 6e 74 2d |eyCode ||= event-|
|00000bd0| 3e 6d 6f 64 69 66 69 65 | 72 73 20 26 20 30 78 46 |>modifie|rs & 0xF|
|00000be0| 46 30 30 20 26 20 7e 63 | 6d 64 4b 65 79 3b 0d 09 |F00 & ~c|mdKey;..|
|00000bf0| 09 09 09 73 74 61 74 65 | 3d 30 3b 0d 09 09 09 09 |...state|=0;.....|
|00000c00| 6b 65 79 49 6e 66 6f 3d | 4b 65 79 54 72 61 6e 73 |keyInfo=|KeyTrans|
|00000c10| 28 70 4b 43 48 52 2c 6b | 65 79 43 6f 64 65 2c 26 |(pKCHR,k|eyCode,&|
|00000c20| 73 74 61 74 65 29 3b 0d | 09 09 09 09 69 66 28 28 |state);.|....if((|
|00000c30| 6b 65 79 49 6e 66 6f 26 | 63 68 61 72 43 6f 64 65 |keyInfo&|charCode|
|00000c40| 4d 61 73 6b 29 20 3d 3d | 20 27 2e 27 20 0d 09 09 |Mask) ==| '.' ...|
|00000c50| 09 09 09 7c 7c 20 28 28 | 6b 65 79 49 6e 66 6f 3e |...|| ((|keyInfo>|
|00000c60| 3e 31 36 29 26 63 68 61 | 72 43 6f 64 65 4d 61 73 |>16)&cha|rCodeMas|
|00000c70| 6b 29 20 3d 3d 20 27 2e | 27 29 69 73 43 6d 64 50 |k) == '.|')isCmdP|
|00000c80| 65 72 69 6f 64 3d 54 52 | 55 45 3b 0d 09 09 09 09 |eriod=TR|UE;.....|
|00000c90| 69 66 20 28 68 4b 43 48 | 52 20 21 3d 20 4e 55 4c |if (hKCH|R != NUL|
|00000ca0| 4c 29 20 52 65 6c 65 61 | 73 65 52 65 73 6f 75 72 |L) Relea|seResour|
|00000cb0| 63 65 28 68 4b 43 48 52 | 29 3b 0d 09 09 09 7d 65 |ce(hKCHR|);....}e|
|00000cc0| 6c 73 65 20 69 66 28 28 | 65 76 65 6e 74 2d 3e 6d |lse if((|event->m|
|00000cd0| 65 73 73 61 67 65 26 63 | 68 61 72 43 6f 64 65 4d |essage&c|harCodeM|
|00000ce0| 61 73 6b 29 20 3d 3d 20 | 27 2e 27 29 69 73 43 6d |ask) == |'.')isCm|
|00000cf0| 64 50 65 72 69 6f 64 3d | 54 52 55 45 3b 0d 09 09 |dPeriod=|TRUE;...|
|00000d00| 09 69 66 28 69 73 43 6d | 64 50 65 72 69 6f 64 29 |.if(isCm|dPeriod)|
|00000d10| 70 65 72 69 6f 64 3d 65 | 76 65 6e 74 2d 3e 6d 65 |period=e|vent->me|
|00000d20| 73 73 61 67 65 26 63 68 | 61 72 43 6f 64 65 4d 61 |ssage&ch|arCodeMa|
|00000d30| 73 6b 3b 0d 09 09 7d 0d | 09 09 72 65 74 75 72 6e |sk;...}.|..return|
|00000d40| 20 69 73 43 6d 64 50 65 | 72 69 6f 64 3b 0d 09 7d | isCmdPe|riod;..}|
|00000d50| 0d 7d 0d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |.}......|........|
|00000d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000d80| 00 00 01 00 00 00 02 bc | 00 00 01 bc 00 00 00 52 |........|.......R|
|00000d90| 20 f1 d4 ec 3c d0 02 b3 | 4a 2e fe 93 f0 84 b0 7f | ...<...|J.......|
|00000da0| f1 c9 35 1e 50 4f 4e 40 | 01 d0 08 30 30 30 31 81 |..5.PON@|...0001.|
|00000db0| 0d 49 73 43 6d 64 50 65 | 72 69 6f 64 2e 63 02 00 |.IsCmdPe|riod.c..|
|00000dc0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00000dd0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00000de0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000df0| 00 00 ab bf ee 62 00 00 | 00 00 00 00 03 0e 53 db |.....b..|......S.|
|00000e00| 40 49 42 2d b3 63 59 4f | b1 5b 01 30 e6 ff ec d5 |@IB-.cYO|.[.0....|
|00000e10| 57 fd d0 70 5a ac 49 15 | 00 40 c0 4a 10 61 67 08 |W..pZ.I.|.@.J.ag.|
|00000e20| 50 3a a7 00 1d 32 90 88 | d2 41 de fe ac a8 04 18 |P:...2..|.A......|
|00000e30| 80 10 b0 1a 53 00 66 16 | 55 4f 42 27 91 7a c7 97 |....S.f.|UOB'.z..|
|00000e40| 10 1f 44 18 49 00 67 7e | 50 2e e1 58 2e fe ac e5 |..D.I.g~|P..X....|
|00000e50| 46 fd d6 39 66 fc d0 90 | 7a e0 f3 a8 10 76 f0 24 |F..9f...|z....v.$|
|00000e60| fb d0 50 19 20 4e a3 84 | 90 55 7a 00 6e a0 01 2c |..P. N..|.Uz.n..,|
|00000e70| 10 76 64 d0 1d 9a 53 06 | d0 23 2a 35 60 a1 9c fe |.vd...S.|.#*5`...|
|00000e80| 00 00 01 52 00 28 00 1e | 02 21 01 3c 00 18 00 00 |...R.(..|.!.<....|
|00000e90| 04 d7 00 00 04 e7 00 00 | 00 25 00 04 00 09 00 00 |........|.%......|
|00000ea0| 06 4d 6f 6e 61 63 6f 00 | 00 00 00 00 00 00 00 00 |.Monaco.|........|
|00000eb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ec0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ed0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000ee0| 04 00 00 03 00 00 00 48 | 00 48 00 00 00 00 02 da |.......H|.H......|
|00000ef0| 02 28 ff e1 ff e2 02 f9 | 02 46 03 47 05 28 03 fc |.(......|.F.G.(..|
|00000f00| 00 02 00 00 00 48 00 48 | 00 00 00 00 02 da 02 28 |.....H.H|.......(|
|00000f10| 00 01 00 00 00 64 00 00 | 00 01 00 01 01 01 00 00 |.....d..|........|
|00000f20| 00 01 27 0f 00 01 00 01 | 00 00 00 00 00 00 00 00 |..'.....|........|
|00000f30| 00 00 00 00 00 02 00 19 | 01 90 00 00 00 00 00 40 |........|.......@|
|00000f40| 00 00 00 00 00 00 00 00 | 00 01 00 00 00 00 00 00 |........|........|
|00000f50| 00 00 00 00 00 00 00 00 | 00 00 00 04 00 09 00 00 |........|........|
|00000f60| 06 4d 6f 6e 61 63 6f 08 | 00 00 00 00 00 00 00 00 |.Monaco.|........|
|00000f70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f80| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000f90| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fa0| 00 04 01 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fc0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000fd0| 00 00 00 00 00 00 00 00 | 00 16 00 01 00 00 07 d3 |........|........|
|00000fe0| 00 00 07 de 0b 49 73 43 | 6d 64 50 65 72 69 6f 64 |.....IsC|mdPeriod|
|00000ff0| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 00 00 00 |...H..Mo|naco....|
|00001000| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001010| 00 00 00 00 00 00 00 06 | 00 04 00 2a 00 03 01 8d |........|...*....|
|00001020| 02 7d 00 34 00 27 01 82 | 02 53 aa ee ae 97 00 00 |.}.4.'..|.S......|
|00001030| 07 85 00 00 07 85 00 00 | 00 00 00 00 00 00 01 00 |........|........|
|00001040| 00 00 02 bc 00 00 01 bc | 00 00 00 52 00 93 4b 38 |........|...R..K8|
|00001050| 1e 7c 00 00 00 1c 00 52 | 00 01 42 42 53 52 00 00 |.|.....R|..BBSR..|
|00001060| 00 12 4d 50 53 52 00 01 | 00 1e 01 03 ff ff 00 00 |..MPSR..|........|
|00001070| 00 00 00 00 00 00 03 ef | ff ff 00 00 01 56 00 00 |........|.....V..|
|00001080| 00 00 03 ed ff ff 00 00 | 01 70 00 93 49 cc 00 00 |........|.p..I...|
|00001090| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010b0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010c0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010d0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000010f0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+