home *** CD-ROM | disk | FTP | other *** search
/ Archive Magazine 1996 / ARCHIVE_96.iso / discs / shareware / share_47 / keywindow / !KeyWindow / !Help < prev    next >
Text File  |  1992-05-08  |  21KB  |  535 lines

  1. Key Window                                  (v 1.32)
  2. -=-=-=-=-=-
  3.  
  4. by Richard G. Hallas
  5. ____________________________________________________
  6.  
  7. This program provides an on-screen function keystrip
  8. in a window. It should prove useful to owners of
  9. A3000s, A5000s and A540s who do not have keystrip
  10. holders on their keyboards, but it does more than
  11. that: you can 'press' the keys by clicking on them
  12. with the mouse, and Key Window can keep track of a
  13. list of up to 32 keystrips, opening and closing them
  14. automatically as you load, use & quit applications.
  15.  
  16. To use:
  17. -------
  18.  
  19. Load by double-clicking in the usual way. If you are
  20. in the habit of booting up a number of applications
  21. when you switch on, then you might like to include
  22. Key Window near the beginning of your boot-up
  23. sequence so that it can keep track of other
  24. applications starting up, and open keystrips for
  25. them.
  26.  
  27. Once loaded, clicking SELECT on the icon-bar icon
  28. will open a keystrip window; either the first one
  29. on the list, or the last one shown if you closed a
  30. strip which was opened automatically. (If you ignore
  31. Key Window, and load DeskEdit [for example] a
  32. keystrip will appear anyway, since DeskEdit is
  33. defined as one of the applications for which Key
  34. Window has a keystrip.) The keystrip will appear
  35. behind other windows so that it is inobtrusive, but
  36. you can easily bring it to the front by clicking
  37. its title bar in the usual way.
  38.  
  39. Pressing the hot-key combination <SHIFT-CTRL-TAB>
  40. or <CTRL-SHIFT-INSERT> will toggle the keystrip
  41. between the front and the back of the desktop.
  42. (The hot-key may not work if an application such
  43. as DeskEdit has the input focus; it is for this
  44. reason that there are two version of the same
  45. hot-key.)
  46.  
  47. In addition to opening and closing keystrips when
  48. you load and quit applications, Key Window is also
  49. 'context sensitive', and will update the contents of
  50. the keystrip window according to whichever program
  51. currently owns the caret. If a program which does
  52. not have a keystrip defined claims the caret, then
  53. the keystrip will be closed, but if the caret is
  54. turned off completely, then the last keystrip used
  55. will continue to be shown.
  56.  
  57. The icon-bar menu has the usual 'Info' and 'Quit'
  58. options, along with two others: 'Keystrips' and
  59. 'Options'. The first of these provides access to an
  60. 'Applications' submenu, and choosing an application
  61. from this menu will open a keystrip for it. By
  62. default, the following applications are provided:
  63. DeskEdit, Impression II, Draw Plus, Vector, Poster,
  64. Edit, Notate, Rhapsody, Acorn DTP, DisAssem, the
  65. BASIC Editor and the Charm Editor. The BASIC Editor
  66. is configured to open with Data Store's excellent
  67. front-end for the ARMBE BASIC Editor, but can of
  68. course do nothing more than serve as a reminder,
  69. since ARMBE is a single-tasking application which
  70. takes over the whole screen. This is also true of
  71. the Charm Editor.
  72.  
  73. The other icon-bar submenu, 'Options', governs how
  74. the keystrip window will operate. The options are as
  75. follows:
  76.  
  77. à 'Open at top': If this is ticked, the window will
  78.  always appear at the top of the screen; otherwise
  79.  it will appear just above the icon bar, or wherever
  80.  you put it last.
  81.  
  82. à 'Auto scroll': This makes the keystrip window
  83.  behave in the same way as the icon bar does when it
  84.  is full; that is, it scrolls sideways automatically
  85.  when the pointer is moved to the left and right
  86.  hand edges.
  87.  
  88. à 'Scroll bar': This toggles the horizontal scroll
  89.  bar and size icon; if 'Auto scroll' is selected,
  90.  then the scroll bar is unnecessary, but you may
  91.  wish to use it to get from one side to the other
  92.  more quickly.
  93.  
  94. It is not possible to deselect both 'Auto scroll'
  95. and 'Scroll bar' at the same time, since it would
  96. obviously then be impossible to move from one side
  97. of the keystrip to the other.
  98.  
  99. à 'Compress': This option will force the entire
  100.  strip to fit onto the screen. Obviously, since the
  101.  key labels have space for 16 characters, the fully-
  102.  annotated keystrip cannot be fitted on the screen
  103.  (except with very large screen modes indeed). If
  104.  you select this option, the full window will cease
  105.  to scroll, and will be sqaushed to fit whichever
  106.  screen mode you are using. Any key labels which are
  107.  wholly visible will be centred in their slots as
  108.  usual, but labels which overflow their slots will
  109.  be justified to the left, so that you can at least
  110.  see how they begin. In all standard screen modes it
  111.  is possible to see almost 6 characters in a
  112.  compressed strip. If you do happen to be using a
  113.  very large screen mode which can accommodate the
  114.  whold strip without having to scroll, then the
  115.  Compress option will be turned off in that mode,
  116.  and you won't be able to turn it on again (it will
  117.  appear shaded until you select a mode which could
  118.  use it). <F12> and <CTRL-SHIFT-F12> are usually
  119.  automatically given the respective labels "Command
  120.  Line" and "Exit Desktop". In Compress mode, these
  121.  will appear as "*áCLI" and "Exit", but if you save
  122.  a strip the full labels will be used. If these two
  123.  keypresses are being used for other purposes, and
  124.  therefore have different labels from standard, the
  125.  new labels will not be affected by the Compress
  126.  mode.
  127.  
  128. The last two options are separated from the others
  129. by a dotted line, and they govern the way the
  130. 'context switching' aspects of the program work.
  131.  
  132. à 'Sense caret': If this option is selected, the
  133.  keystrip will be fully context sensitive, and as
  134.  the input focus moves between windows, the keystrip
  135.  will change to reflect its position. (Note that for
  136.  the sake of simplicity, the program's menu refers
  137.  to the 'caret' when it actually means the 'input
  138.  focus'; there doesn't really have to be a physical
  139.  caret. A good example is of this Draw Plus, which
  140.  only shows a caret when entering text objects; the
  141.  keystrip nevertheless still applies.)
  142.  
  143. à 'Sense apps': If this option is selected, Key
  144.  Window will open and close strips as applications
  145.  are loaded and quit. Since this could potentially
  146.  interfere with the context switching option above,
  147.  then if the 'Sense caret' option is on, the 'Sense
  148.  Apps' option will only work if a keystrip is not
  149.  currently in use.
  150.  
  151. All this makes Key Window sound very complicated,
  152. but you should find it quite easy and natural to
  153. use.
  154.  
  155. Regardless of the state of these options, whenever
  156. the window is opened, or the screen mode is changed,
  157. it will appear behind the other windows, and will
  158. resize itself to fit the current width of the
  159. screen. The default settings of these options can be
  160. defined by editing the !Run file; see that file for
  161. details, and also later in this !Help file.
  162.  
  163. On to the keystrip window itself. Clicking any of
  164. the key definitions with SELECT or ADJUST will
  165. 'press' that key. If you are not using the 'context
  166. switching' features you should remember that the
  167. same key is pressed regardless of whatever strip is
  168. showing; you may for example have the keystrip for
  169. Edit on the screen, but if you are currently using 
  170. Impression, then clicking on <CTRL-F4> will bring up
  171. the Find/Replace box rather than doing an Indent
  172. Block in Edit.  This seems obvious, but it's easy to
  173. forget. They're the same keys, regardless of how
  174. they're labelled.
  175.  
  176. Since <CTRL-SHIFT-F12> is a dangerous keystroke (it
  177. normally exits the desktop), I have made the icon as
  178. difficult to click by accident as possible. To
  179. activate it, you must click on it with both SELECT
  180. and ADJUST simultaneously. (The easiest way of doing
  181. this is probably to hold down SELECT and then click
  182. ADJUST.)
  183.  
  184. The keystrip window has its own menu so you can edit
  185. the strips and create new ones. The menu options are
  186. as follows; I shall deal with them in turn:
  187.  
  188. à Edit item: this is context-sensitive, and only
  189.  appears when you click over a key label. Enter the
  190.  contents in the submenu leaf; up to 16 characters
  191.  are allowed for each, even when the strip is
  192.  compressed (you just won't be able to see all the
  193.  text).
  194.  
  195. à Edit title: this allows you to edit the title of
  196.  the keystrip; the title will be used in the
  197.  keystrip window and in the 'Applications' menu.
  198.  
  199. à Get strip: this is the same as the 'Keystrips'
  200.  option on the icon-bar menu, and updates the window
  201.  with whichever keystrip you choose. Any unsaved
  202.  contents of the keystrip window will be lost if you
  203.  use this option. The only difference here is that
  204.  the keystrip is opened at the front, whereas it is
  205.  opened at the back when you select a strip from the
  206.  icon-bar menu. You should note that if the 'Sense
  207.  caret' option is on, then using either of these
  208.  application keystrip menus will lose the input
  209.  focus. If it didn't, then the keystrip would change
  210.  back to the one needed for the current application
  211.  as soon as you had selected a different one.
  212.  
  213. à Clear strip: this blanks the strip to give you a
  214.  fresh start. The two usual functions of F12
  215.  (Command Line & Exit Desktop) are entered for you
  216.  automatically, but you can delete them if you wish.
  217.  Note that if you are entering a strip in Compress
  218.  mode, "Command Line" and "Exit Desktop" will be
  219.  abbreviated to "*áCLI" and "Exit". However, this is
  220.  for display purposes only, and if you save a strip
  221.  the full labels will be saved in the file (unless,
  222.  of course, you have replaced them with something
  223.  else).
  224.  
  225. à Open with?: entering a taskname (as it appears in
  226.  the Task Display window) into this submenu will
  227.  make that strip open and close automatically when
  228.  you use a particular application. Leave the option
  229.  blank if you do not wish this to happen, but 
  230.  remember that this will disable the context switch
  231.  facilities for that particular application.
  232.  
  233. à Save strip: there are two ways of saving
  234.  keystrips, which you must choose from the submenu
  235.  (clicking on 'Save strip' alone will do nothing).
  236.  Firstly, 'Replace old' will overwrite the existing
  237.  definition with your edited version, so you can
  238.  easily add to a strip or correct it. (This option
  239.  is unavailable if you have used 'Clear strip'.)
  240.  Secondly, 'Create new' will save a totally new
  241.  keystrip and add it to the 'Applications' menu.
  242.  
  243. Notes on saving new strips
  244. --------------------------
  245.  
  246. When saving a new strip, the data is saved into a
  247. text file within the 'Data' directory in the
  248. !KeyWindow application directory. If you use the
  249. 'Create new' save option, Key Window will save the
  250. file with a numeric filename, starting at number
  251. '0'. If '0' exists, then it uses '1', and so on. If
  252. there are 32 files in the directory, then Key Window
  253. will not allow you to save a new strip, only
  254. overwrite existing ones. When Key Window starts up,
  255. it reads in the contents of all the files in the
  256. 'Data' directory, in the order in which they appear
  257. in the directory viewer; this is also the order they
  258. will appear in the 'Applications' menu. If you want
  259. a particular strip to always be first on the
  260. 'Applications' list (and therefore be the default
  261. one to use when you click on the icon-bar icon) you
  262. should make sure it is the first to appear in the
  263. directory viewer; using the name '!' should ensure
  264. this. It doesn't actually matter what you call the
  265. files; the program just uses numerics for the sake
  266. of simplicity.
  267.  
  268. If you wish to create your function key files in
  269. DeskEdit, say, and not with Key Window itself, the
  270. file format is as follows:
  271.  
  272. à The first line is the title of the application
  273.  (max. 20 characters) to appear in the window title
  274.  and 'Applications' menu.
  275.  
  276. à The second line is either blank or a taskname
  277.  (max. 19 characters) for the strip to open
  278.  automatically.
  279.  
  280. à The remainder of the file has up to 12 lines, one
  281.  for each key. If a line is blank, that key will
  282.  have no labels. Not all 12 keys need to be defined:
  283.  you use only as many lines as the keystrip
  284.  requires.
  285.  
  286.  Each line has up to four entries, separated by
  287.  commas: for the key alone, and in conjunction with
  288.  Shift, Ctrl and Ctrl-Shift. You need only enter as
  289.  many labels as necessary, so you can finish a line
  290.  before Ctrl-Shift, for example. Each line should
  291.  therefore contain 0 to 3 commas. Note that if, say,
  292.  a particular key has no function alone, but has a
  293.  function in conjunction with Shift, the definition
  294.  line should start with a comma.
  295.  
  296. Note also that although spurious commas are not
  297. necessary, they do not matter, and indeed if you
  298. save a definition file from the program, every line
  299. it produces will contain three commas.
  300.  
  301. Setting options with <KeyWindow$Flags>
  302. --------------------------------------
  303.  
  304. Key Window can be made to start up every time with a
  305. certain combination of options already in effect.
  306. You must edit the !Run file in the application
  307. directory to achieve this. Alter the number in the
  308. line 'Set KeyWindow$Flags 51' (The value of 51 is
  309. the default if you omit this line or enter an
  310. illegal value). The variable sets the default state
  311. for the six settings which can be temporarily
  312. toggled on and off in the 'Options' submenu.
  313.  
  314. The <KeyWindow$Flags> variable is a decimal number
  315. in the range 0 to 63, which is calculated from the
  316. following set of bits, which mean, when they are 
  317. set:
  318.  
  319.    Bit 0: Always open keystrip at top of screen.
  320.    Bit 1: Scroll strip when pointer reaches edges.
  321.    Bit 2: Show horizontal scroll bar, along with a
  322.           resize icon and a toggle size icon.
  323.    Bit 3: Always compress keystrip to fit screen.
  324.    Bit 4: Context sensitive: applications gaining
  325.           the caret will open new strips.
  326.    Bit 5: Load sensitive: applications starting up
  327.           and quitting will open and close strips.
  328.  
  329. So, for example, if you wanted just 'Open at top' &
  330. 'Compress' on by default, you would use the value 9,
  331. since you would be setting bits 0 and 6, and 9 is
  332. the decimal equivalent of binary 1001.
  333.  
  334. Do note that the bits are in descending order:
  335. namely, bit 0 is the one on the right.
  336.  
  337. Note also that any values with bits one and two both
  338. set to zero are invalid, since they would mean that
  339. both the 'Auto scroll' and the 'Scroll bar' options
  340. were off, and the program will not allow this. The
  341. smallest value you may use is 2, and if you try to
  342. use an illegal value the program will automatically
  343. turn on 'Auto scroll' for you.
  344.  
  345. If you examine the !Run file further, you will find
  346. another variable, <KeyWindow$DummyMessage>. This is
  347. a message number for internal use. It should always
  348. be an unassigned message; if at some point in the
  349. future this message is assigned a use, it will be
  350. necessary to amend this variable to avoid conflicts.
  351. This is very unlikely, though.
  352.  
  353. Finally
  354. -------
  355.  
  356. So there you have it - what I hope is a useful
  357. program! This is PUBLIC DOMAIN SOFTWARE and as such
  358. may be distributed quite freely, just as long as it
  359. is not modified or tampered with in any way, and all
  360. the associated files are kept together unmodified.
  361.  
  362. The !KeyWindow directory should contain the
  363. following files:
  364.   
  365. !Boot
  366. !Help  (This file)
  367. !Run
  368. !RunImage
  369. !Sprites
  370. Data
  371. Source
  372. Sprites
  373. Templates
  374.  
  375. The Data sub-directory should contain at least the
  376. files numbered '100'-'110' for DeskEdit,
  377. Impression II, Draw Plus, Vector, Poster, Edit,
  378. Notate, Rhapsody, Acorn DTP, DisAssem, the BASIC
  379. Editor and the Charm Editor. These files may be
  380. modified if necessary, and added to as required.
  381.  
  382. (Note: The default keystrips provided are all for
  383. commercial applications, except for two public
  384. domain items: Draw Plus by Jonathan Marten and
  385. DisAssem by Henrik Pedersen. Both these applications
  386. are excellent pieces of software, and are readily
  387. available through public domain libraries.)
  388.  
  389. I hope you like this program and find it useful. If
  390. you do, send me a disc with some PD software on it,
  391. and I'll return your disc with the other PD things
  392. I've written on it, and the latest version of this
  393. program if it has been updated. Remember to let me
  394. know which version number you have, and if you find
  395. any bugs, please TELL ME! I try to support all my
  396. programs, and will correct any bugs I know about.
  397. So please send letters, discs, bug reports and
  398. suggestions (none too rude, please!) to the
  399. following address:
  400.  
  401. Richard G. Hallas,
  402. 31 Skelton Crescent,
  403. Crosland Moor,
  404. Huddersfield,
  405. West Yorkshire,
  406. HD4 5PN
  407. ENGLAND
  408.  
  409. Version revisions:
  410. -=-=-=-=-=-=-=-=-=-
  411.  
  412. The following versions have been made available in
  413. the public domain:
  414.  
  415. Version 1.00: First release version, sent to APDL.
  416. This was only sensitive to applications loading and
  417. quitting, not to the movement of the caret between
  418. windows. Its only option was 'Open at top'.
  419.  
  420. Version 1.06: this provides the additional hot-key
  421. <CTRL-SHIFT-INSERT> (duplicating <CTRL-SHIFT-TAB>),
  422. since DeskEdit 1.20 now uses <CTRL-SHIFT-TAB> for
  423. one of its own features. The hot-key now toggles the
  424. window between front and back, rather than just
  425. bringing it to the front as in version 1.00.
  426.  
  427. Version 1.06 also corrects a small bug which caused
  428. the window to reopen upon a mode change or return to
  429. the desktop, when it had previously been closed by
  430. the user.
  431.  
  432. Clicking on the icon with Adjust does the same as
  433. Select, but also provides a little animation! (This
  434. has always happened, but was undocumented for
  435. version 1.00.) I like these little touches!
  436.  
  437. Version 1.07: Small cosmetic changes have been made
  438. to the Keystrip menu to bring it in line with normal
  439. RISC OS standards. The two Edit submenus used to
  440. have red borders and no titles, and the Save strip
  441. submenu also used to have no title bar. Thanks to
  442. Mark Moxon of RISC Developments for his comments.
  443.  
  444. Version 1.12: There are numerous modifications in
  445. this version: the system variable <KeyWindow$Flags>
  446. replaces <KeyWindow$Top> in previous versions, and
  447. provides two more options, 'Auto scroll' and 'Scroll
  448. bar'. The 'Open at top' option on the main icon-bar
  449. menu has been replaced by, and moved onto, a new
  450. 'Options' submenu, which also contains the two other
  451. options provided by the <KeyWindow$Flags> variable.
  452.  
  453. (All the menu items are now at the correct 44 OS
  454. units height, whereas they were previously only 40
  455. units high.)
  456.  
  457. The Keystrip window itself now behaves more sensibly
  458. in that it can scroll itself when the pointer pushes
  459. up to its edges, in the same way as the icon-bar. It
  460. is meant to mimic the icon-bar, and will 'sense' the
  461. pointer at a similar horizontal position.
  462.  
  463. For this reason, the horizontal scroll bar is much
  464. less necessary, and can now be toggled on and off.
  465. In the default state, the program leaves it switched
  466. off, which looks neater and saves a little space on
  467. the desktop.
  468.  
  469. Key-combination labels have been added to the right
  470. hand edge of the window, and are identical to the
  471. ones at the left.
  472.  
  473. My thanks must go to Henrik Pedersen for his very
  474. useful and helpful suggestions, some of which are
  475. implemented in version 1.12, notably the 'Auto
  476. scroll' feature. I can't imagine why I didn't think
  477. of this myself! Other suggestions will have to wait
  478. for a later version, when I have time to think about
  479. them.
  480.  
  481. Version 1.25: Credit must once again go to Henrik
  482. Pedersen, this time for showing me how to read the
  483. taskname of the application owning the caret. It's
  484. actually very easy to do, but I had managed to miss
  485. it every time I had consulted the PRM! Version 1.25
  486. represents a completely new way of operating for Key
  487. Window, and this is the way I wanted it to work in
  488. the first instance. The facility to read the caret
  489. owner's taskname enables it to be wholly context
  490. sensitive, whereas previous versions simply opened
  491. and closed strips as applications were loaded and
  492. quit.
  493.  
  494. The <KeyWindow$Flags> system variable and the
  495. 'Options' submenu have both been extended to take
  496. account of the new context options. Also, a very
  497. small but perfectly formed bug which has been around
  498. since the first version, and which meant that the
  499. strip didn't resize upon a mode change if it was
  500. closed, has finally been killed, and a very minor
  501. deficiency (not exactly a bug) concerning reopening
  502. the same strip has been corrected from previous
  503. versions.
  504.  
  505. Version 1.32: This is the first version to sport the
  506. 'Compress' option. Such a feature was suggested by
  507. Rob Sherratt and David Pilling; my thanks to them
  508. for their helpful comments. Minor modifications have
  509. been made to the Templates file in order to avoid
  510. scaling problems in certain modes, and Key Window
  511. will now also justify the text intelligently within
  512. the key labels.
  513.  
  514. A small bug in the Templates file has also now been
  515. fixed: all the key label icons previously had a
  516. button-type of Click/Drag, and these have now been
  517. changed to just Click, because I found that holding
  518. a mouse button down could cause a click to register
  519. twice, which was quite undesirable. The button-type
  520. Click ensures one click only being registered.
  521. The single exception to this modification is the key
  522. label for <CTRL-SHIFT-F12>, which requires the
  523. Double/Click/Drag button type for its safety
  524. precaution feature to work. This safety feature has
  525. also been changed slightly in this version, from a
  526. sort of double-drag-click within the icon to a click
  527. with both SELECT and ADJUST together. This is safer,
  528. more reliable and less temperamental.
  529.  
  530. The save routine has been slightly modified in this
  531. version to ensure that if automatic F12 labels are
  532. being used, the full label is saved, rather than the
  533. shorter version used in the Compress mode display.
  534.  
  535. - R.G.H.