Home » Archimedes archive » Acorn User » AU 1997-06 B.adf » Extras » RiscUtils/!RuInstall/Install/!Help/Help/Text/Help/Key-State
RiscUtils/!RuInstall/Install/!Help/Help/Text/Help/Key-State
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1997-06 B.adf » Extras |
Filename: | RiscUtils/!RuInstall/Install/!Help/Help/Text/Help/Key-State |
Read OK: | ✔ |
File size: | 0583 bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
Check_KeyboardState : This command works along the same lines as the 'Check_KeyboardNumber' and 'Check_MouseState' commands (see the 'Key-Num' and 'Mouse-Stat' Helpfiles). It enables the user to find out what (if any) key is being pressed on the keyboard at the time the command is issued.Useful for intelligent Run file's. E.g. While Booting, press 'i' to Run Impression, 'a' for Artworks etc. Or before loading Edit, hold down 'F' to load flasher as well. If no key is pressed, only Edit is loaded. Using the command : The command has no parameters, once issued it simply sets a variable. The command provided is : Check_KeyBoardState When issued the variable KeyBoardState is set to a certain value, depending on the state of the keyboard. To get to grips with the command easliy, run the files KeyState1, and State-Con, in the Directory RISCutils.User_Area.Demo's. The command can be used as so: (E.g. in boot sequences) Run ADFS::HardDisc4.$.!Tools.FILES.!RISCutils Check_KeyBoardState IF keyboardstate=�3� Then Run ADFS::HardDisc4.$.!Games.Files.!Star3000 IF keyboardstate=�i� Then Run ADFS::HardDisc4.$.!DTP.Packages.!Publish+ To activate the component simply run 'RISCutils', with the 'Check_KeyboardState' option in RISCutil's !Run file set to 'Y'. To de-activate it run the file RISCutils.User_Area.Files.Remove, and run 'RISCutils', with the 'Check_KeyboardState' option set to 'N.'
00000000 0a 43 68 65 63 6b 5f 4b 65 79 62 6f 61 72 64 53 |.Check_KeyboardS| 00000010 74 61 74 65 20 3a 20 54 68 69 73 20 63 6f 6d 6d |tate : This comm| 00000020 61 6e 64 20 77 6f 72 6b 73 20 61 6c 6f 6e 67 20 |and works along | 00000030 74 68 65 20 73 61 6d 65 20 6c 69 6e 65 73 20 61 |the same lines a| 00000040 73 20 74 68 65 20 27 43 68 65 63 6b 5f 4b 65 79 |s the 'Check_Key| 00000050 62 6f 61 72 64 4e 75 6d 62 65 72 27 20 61 6e 64 |boardNumber' and| 00000060 20 27 43 68 65 63 6b 5f 4d 6f 75 73 65 53 74 61 | 'Check_MouseSta| 00000070 74 65 27 20 63 6f 6d 6d 61 6e 64 73 20 28 73 65 |te' commands (se| 00000080 65 20 74 68 65 20 27 4b 65 79 2d 4e 75 6d 27 20 |e the 'Key-Num' | 00000090 61 6e 64 20 27 4d 6f 75 73 65 2d 53 74 61 74 27 |and 'Mouse-Stat'| 000000a0 20 48 65 6c 70 66 69 6c 65 73 29 2e 20 49 74 20 | Helpfiles). It | 000000b0 65 6e 61 62 6c 65 73 20 74 68 65 20 75 73 65 72 |enables the user| 000000c0 20 74 6f 20 66 69 6e 64 20 6f 75 74 20 77 68 61 | to find out wha| 000000d0 74 20 28 69 66 20 61 6e 79 29 20 6b 65 79 20 69 |t (if any) key i| 000000e0 73 20 62 65 69 6e 67 20 70 72 65 73 73 65 64 20 |s being pressed | 000000f0 6f 6e 20 74 68 65 20 6b 65 79 62 6f 61 72 64 20 |on the keyboard | 00000100 61 74 20 74 68 65 20 74 69 6d 65 20 74 68 65 20 |at the time the | 00000110 63 6f 6d 6d 61 6e 64 20 69 73 20 69 73 73 75 65 |command is issue| 00000120 64 2e 55 73 65 66 75 6c 20 66 6f 72 20 69 6e 74 |d.Useful for int| 00000130 65 6c 6c 69 67 65 6e 74 20 52 75 6e 20 66 69 6c |elligent Run fil| 00000140 65 27 73 2e 20 45 2e 67 2e 20 57 68 69 6c 65 20 |e's. E.g. While | 00000150 42 6f 6f 74 69 6e 67 2c 20 70 72 65 73 73 20 27 |Booting, press '| 00000160 69 27 20 74 6f 20 52 75 6e 20 49 6d 70 72 65 73 |i' to Run Impres| 00000170 73 69 6f 6e 2c 20 27 61 27 20 66 6f 72 20 41 72 |sion, 'a' for Ar| 00000180 74 77 6f 72 6b 73 20 65 74 63 2e 20 4f 72 20 62 |tworks etc. Or b| 00000190 65 66 6f 72 65 20 6c 6f 61 64 69 6e 67 20 45 64 |efore loading Ed| 000001a0 69 74 2c 20 68 6f 6c 64 20 64 6f 77 6e 20 27 46 |it, hold down 'F| 000001b0 27 20 74 6f 20 6c 6f 61 64 20 66 6c 61 73 68 65 |' to load flashe| 000001c0 72 20 61 73 20 77 65 6c 6c 2e 20 49 66 20 6e 6f |r as well. If no| 000001d0 20 6b 65 79 20 69 73 20 70 72 65 73 73 65 64 2c | key is pressed,| 000001e0 20 6f 6e 6c 79 20 45 64 69 74 20 69 73 20 6c 6f | only Edit is lo| 000001f0 61 64 65 64 2e 0a 0a 55 73 69 6e 67 20 74 68 65 |aded...Using the| 00000200 20 63 6f 6d 6d 61 6e 64 20 3a 0a 0a 54 68 65 20 | command :..The | 00000210 63 6f 6d 6d 61 6e 64 20 68 61 73 20 6e 6f 20 70 |command has no p| 00000220 61 72 61 6d 65 74 65 72 73 2c 20 6f 6e 63 65 20 |arameters, once | 00000230 69 73 73 75 65 64 20 69 74 20 73 69 6d 70 6c 79 |issued it simply| 00000240 20 73 65 74 73 20 61 20 76 61 72 69 61 62 6c 65 | sets a variable| 00000250 2e 20 54 68 65 20 63 6f 6d 6d 61 6e 64 20 70 72 |. The command pr| 00000260 6f 76 69 64 65 64 20 69 73 20 3a 20 0a 0a 43 68 |ovided is : ..Ch| 00000270 65 63 6b 5f 4b 65 79 42 6f 61 72 64 53 74 61 74 |eck_KeyBoardStat| 00000280 65 0a 0a 57 68 65 6e 20 69 73 73 75 65 64 20 74 |e..When issued t| 00000290 68 65 20 76 61 72 69 61 62 6c 65 20 0a 0a 4b 65 |he variable ..Ke| 000002a0 79 42 6f 61 72 64 53 74 61 74 65 0a 0a 69 73 20 |yBoardState..is | 000002b0 73 65 74 20 74 6f 20 61 20 63 65 72 74 61 69 6e |set to a certain| 000002c0 20 76 61 6c 75 65 2c 20 64 65 70 65 6e 64 69 6e | value, dependin| 000002d0 67 20 6f 6e 20 74 68 65 20 73 74 61 74 65 20 6f |g on the state o| 000002e0 66 20 74 68 65 20 6b 65 79 62 6f 61 72 64 2e 0a |f the keyboard..| 000002f0 0a 0a 54 6f 20 67 65 74 20 74 6f 20 67 72 69 70 |..To get to grip| 00000300 73 20 77 69 74 68 20 74 68 65 20 63 6f 6d 6d 61 |s with the comma| 00000310 6e 64 20 65 61 73 6c 69 79 2c 20 72 75 6e 20 74 |nd easliy, run t| 00000320 68 65 20 66 69 6c 65 73 20 4b 65 79 53 74 61 74 |he files KeyStat| 00000330 65 31 2c 20 61 6e 64 20 53 74 61 74 65 2d 43 6f |e1, and State-Co| 00000340 6e 2c 20 69 6e 20 74 68 65 20 44 69 72 65 63 74 |n, in the Direct| 00000350 6f 72 79 20 52 49 53 43 75 74 69 6c 73 2e 55 73 |ory RISCutils.Us| 00000360 65 72 5f 41 72 65 61 2e 44 65 6d 6f 27 73 2e 0a |er_Area.Demo's..| 00000370 0a 0a 54 68 65 20 63 6f 6d 6d 61 6e 64 20 63 61 |..The command ca| 00000380 6e 20 62 65 20 75 73 65 64 20 61 73 20 73 6f 3a |n be used as so:| 00000390 20 28 45 2e 67 2e 20 69 6e 20 62 6f 6f 74 20 73 | (E.g. in boot s| 000003a0 65 71 75 65 6e 63 65 73 29 0a 0a 52 75 6e 20 41 |equences)..Run A| 000003b0 44 46 53 3a 3a 48 61 72 64 44 69 73 63 34 2e 24 |DFS::HardDisc4.$| 000003c0 2e 21 54 6f 6f 6c 73 2e 46 49 4c 45 53 2e 21 52 |.!Tools.FILES.!R| 000003d0 49 53 43 75 74 69 6c 73 20 0a 43 68 65 63 6b 5f |ISCutils .Check_| 000003e0 4b 65 79 42 6f 61 72 64 53 74 61 74 65 0a 49 46 |KeyBoardState.IF| 000003f0 20 6b 65 79 62 6f 61 72 64 73 74 61 74 65 3d 94 | keyboardstate=.| 00000400 33 95 20 54 68 65 6e 20 52 75 6e 20 41 44 46 53 |3. Then Run ADFS| 00000410 3a 3a 48 61 72 64 44 69 73 63 34 2e 24 2e 21 47 |::HardDisc4.$.!G| 00000420 61 6d 65 73 2e 46 69 6c 65 73 2e 21 53 74 61 72 |ames.Files.!Star| 00000430 33 30 30 30 0a 49 46 20 6b 65 79 62 6f 61 72 64 |3000.IF keyboard| 00000440 73 74 61 74 65 3d 94 69 95 20 54 68 65 6e 20 52 |state=.i. Then R| 00000450 75 6e 20 41 44 46 53 3a 3a 48 61 72 64 44 69 73 |un ADFS::HardDis| 00000460 63 34 2e 24 2e 21 44 54 50 2e 50 61 63 6b 61 67 |c4.$.!DTP.Packag| 00000470 65 73 2e 21 50 75 62 6c 69 73 68 2b 0a 0a 54 6f |es.!Publish+..To| 00000480 20 61 63 74 69 76 61 74 65 20 74 68 65 20 63 6f | activate the co| 00000490 6d 70 6f 6e 65 6e 74 20 73 69 6d 70 6c 79 20 72 |mponent simply r| 000004a0 75 6e 20 27 52 49 53 43 75 74 69 6c 73 27 2c 20 |un 'RISCutils', | 000004b0 77 69 74 68 20 74 68 65 20 27 43 68 65 63 6b 5f |with the 'Check_| 000004c0 4b 65 79 62 6f 61 72 64 53 74 61 74 65 27 20 6f |KeyboardState' o| 000004d0 70 74 69 6f 6e 20 69 6e 20 52 49 53 43 75 74 69 |ption in RISCuti| 000004e0 6c 27 73 20 21 52 75 6e 20 66 69 6c 65 20 73 65 |l's !Run file se| 000004f0 74 20 74 6f 20 27 59 27 2e 20 54 6f 20 64 65 2d |t to 'Y'. To de-| 00000500 61 63 74 69 76 61 74 65 20 69 74 20 72 75 6e 20 |activate it run | 00000510 74 68 65 20 66 69 6c 65 20 52 49 53 43 75 74 69 |the file RISCuti| 00000520 6c 73 2e 55 73 65 72 5f 41 72 65 61 2e 46 69 6c |ls.User_Area.Fil| 00000530 65 73 2e 52 65 6d 6f 76 65 2c 20 61 6e 64 20 72 |es.Remove, and r| 00000540 75 6e 20 27 52 49 53 43 75 74 69 6c 73 27 2c 20 |un 'RISCutils', | 00000550 77 69 74 68 20 74 68 65 20 27 43 68 65 63 6b 5f |with the 'Check_| 00000560 4b 65 79 62 6f 61 72 64 53 74 61 74 65 27 20 6f |KeyboardState' o| 00000570 70 74 69 6f 6e 20 73 65 74 20 74 6f 20 27 4e 2e |ption set to 'N.| 00000580 27 0a 0a |'..| 00000583