home *** CD-ROM | disk | FTP | other *** search
/ Acorn User 4 / AUCD4.iso / acornuser / 1997 / dec1997 / pd / Hotkeys / !Hotkeys / !Help next >
Text File  |  1997-05-22  |  13KB  |  322 lines

  1.  
  2.       20 : REM **************************************************************
  3.       30 : REM ** Module Generation For RPCUtils (Hotkeys)                 **
  4.       40 : REM ** Written by Phillip Camp                                  **
  5.       50 : REM ** Version: 0.25                                            **
  6.       60 : REM ** Date: 21March97                                          **
  7.       70 : REM **************************************************************
  8.       80 : REM ** Version Revision:                                        **
  9.       90 : REM **                                                          **
  10.      100 : REM **  0.01  First attempts                                    **
  11.      110 : REM **  0.02  O' dear this is more tricky than i first thought  **
  12.      120 : REM **  0.03  It did somthing, now it just sits there :-(       **
  13.      130 : REM **  0.04  It sort of works all i need is to get it to do    **
  14.      140 : REM **        somthing useful                                   **
  15.      150 : REM **  0.05  Mem read write usage problems investigated        **
  16.      160 : REM **  0.06  Its slove the weird errors time and rewrite       **
  17.      170 : REM **  0.07  Ok lets get it do somthing usefull                **
  18.      180 : REM **  0.08  Ok lets get rid of that keyboard repeat           **
  19.      190 : REM **  0.09  OK lets have a total rewrite                      **
  20.      200 : REM **  0.10  CD works now lets try out proper hotkeys in this  **
  21.      210 : REM **  0.11  CD track detection added & code tidied            **
  22.      220 : REM **  0.12  More tweeking                                     **
  23.      230 : REM **  0.13  add seconard trigeer & firmkey & trigger config   **
  24.      240 : REM **        (I really should comment my code better it would  **
  25.      250 : REM **        have made this bit a lot less painful.            **
  26.      260 : REM **  0.14  cd dives config now actually works                **
  27.      270 : REM **        (well with  two ide cd-drives anyway)             **
  28.      280 : REM **  0.15  tidycode & error handling in init code            **
  29.      290 : REM **  0.16  Experimental bug fix using sys vars               **
  30.      300 : REM **  0.17  Bug which some times disbaled kybd fixed          **
  31.      310 : REM **  0.18  Fixbug introduced in 0.17 which caused all        **
  32.      320 : REM **        machines runing 3.11 or less to crash.  Bug due   **
  33.      330 : REM **        failure to preserve R14_SVC in event handler.     **
  34.      340 : REM **  0.19  Tidy code replace keydis varval with internal fix **
  35.      350 : REM **  0.20  Init code fixed from 0.19 logic reworked in       **
  36.      360 : REM **        event handler.                                    **
  37.      370 : REM **  0.21  Minor Changes to cd pause function now works      **
  38.      380 : REM **  0.22  Esc Now pauses and unpauses cds                   **
  39.      390 : REM **  0.23  Finally Located bug that was introduced in v0.18  **
  40.      400 : REM **        onwards that caused hotkeys to think it still had **
  41.      410 : REM **        a trigger key pressed on very rare occasions.     **
  42.      420 : REM **        After finding a way of replicating the fault      **
  43.      430 : REM **        accurately.                                       **
  44.      440 : REM **  0.24  trig1 trig2 scroll lock now ejects experimental   **
  45.      450 : REM **        for some people having trouble with play next     **
  46.      460 : REM **        track.                                            **
  47.      470 : REM **  0.25  Gstrans Support added. Leading char as flag       **
  48.      471 : REM **        * oscli                                           **
  49.      472 : REM **        # oscli + gstrans                                 **
  50.      473 : REM **        / firmkey                                         **
  51.      474 : REM **        \ firmkey + gstrans                               **
  52.      475 : REM **                                                          **
  53.      480 : REM **************************************************************
  54.  
  55.                 HotKeys
  56.                 -------
  57.  
  58.   The Hotkeys Utillity is (C) Phillip Camp 1996/7, but is released as freeware.
  59.   This means that you may copy and distribute it, subject to certain
  60.   conditions.  Hotkeys should only be distributed with the whole contents of 
  61.   the original archive, with all files unmodified.
  62.  
  63.   Specifically, as an individual, you may only charge to cover the cost
  64.   of distributing it, and you may not use it to make money directly or
  65.   indirectly.
  66.  
  67.   The author does not accept any responsibility for any loss,damage or
  68.   whatever resulting from the use of Hotkeys. It is supplied "as is.".
  69.  
  70.  
  71.  
  72.  
  73. This is not much of a help file so far details of how to use hotkeys are detailed
  74. in earlier verion histories 0.12-0.17.
  75.  
  76. Beta Test Hotkeys v0.25
  77. ----------------------- 
  78.  
  79. Nothing really new. Fist char now action identifier.
  80.  
  81.      * oscli                                           
  82.      # oscli + gstrans                                 
  83.      / firmkey                                         
  84.      \ firmkey + gstrans                                 
  85.  
  86.  
  87. Beta Test Hotkeys v0.24
  88. -----------------------
  89.  
  90. trig1 trig2 scroll lock now ejects.  Experimental for some people having trouble 
  91. with play next track.  Minor Changes to all CDfunctions to do with CDBlock.
  92.  
  93. Beta Test Hotkeys v0.23
  94. -----------------------
  95.  
  96. Last major bug fixed in triger detection code.  Minior changes to finalisation
  97. code to use the altered disabled keyboard routine.
  98.  
  99. Beta Test Hotkeys v0.22
  100. -----------------------
  101.  
  102. Pause / Unpause function added to triger-escape key
  103.     
  104. Beta Test Hotkeys v0.21
  105. -----------------------
  106.  
  107. Problem with pause being called with uninit cdblock fixed.
  108.  
  109. Beta Test Hotkeys v0.20
  110. -----------------------
  111.  
  112. Minior Internal Changes. Init code fixed from 0.19, logic reworked in event handler.
  113. Show be a bit faster.
  114.  
  115. Beta test Hotkeys v0.19
  116. -----------------------
  117.  
  118. Removed Use of hotkeys$disablekybd var val and tidied code.  Event routine now 
  119. quicker could be considerably slower somtimes on v0.15-18.
  120.  
  121.  
  122. Beta test Hotkeys v0.18
  123. -----------------------
  124.  
  125. New detection routine added in 0.17 was added to event handler before R14_SVC
  126. had been preserved causing R14_SVC to be corrputed by swi call causing,
  127. machines running Risc OS 3.11 or earlier to crash.  Fixed in 0.18
  128.  
  129. Beta test Hotkeys v0.15 - v0.17
  130. -------------------------------
  131.  
  132. Improved version of processHK should not fail on archived versions using arcfs
  133. with RMA memory management.  Module should know longer disable kybd if module is 
  134. replaced halfway, though the hotkey cycle. On the fly cddrive config enabled with 
  135. hotkeys$cddrive sys var.
  136.  
  137. use:
  138.  
  139. *SetEval  hotkeys$cddrive 1
  140.  
  141. Also:
  142.  
  143. *IF <hotkeys$cdDrive> = 1 THEN cdfs:play 11 1 ELSE cdfs:play 11 0
  144.  
  145. Use cdfs drive 1 for internal cd calls.
  146.  
  147. Note: Sys Var  hotkeys$disablekybd
  148. Is for internal use winthin the progarm only DO NOT ALTER IT....
  149. If you do you do so at your own risc...... 
  150.  
  151.  
  152. Beta test Hotkeys v0.14
  153. -----------------------
  154.  
  155. Mutliple cd drive config now fixed (after finding error in acorns example cd code) 
  156. and tested by myself to some extent.
  157.  
  158. And add that the last key in each sequence is now no longer inserted into the kybd
  159. buffer. (was in 0.13 but forgot to document it). :-)
  160.  
  161.  
  162. Beta test Hotkeys v0.13
  163. -----------------------
  164.  
  165. No charcaters are inserted in kybd buffer when using a hotkey.
  166.  
  167. Firmkey support added (all strings not starting with * are fed into the kybd buffer.
  168.  
  169. Added cd drive config for hardwired keys.
  170.  
  171. Added secondary trigger key.
  172. Different keydata files for trigger keys.
  173. just primary = keydata1
  174. primary and secondary = keydata2
  175.  
  176. eg 
  177.  
  178. trigkey hotkey and trigkey trigkey2 hotkey.
  179.  
  180. say prime trig == LALT and sec  trig == RALT
  181. c in keydata1 =*cache OFF
  182. c in keydata2 =*cache ON
  183.  
  184. so LALT c will turn the cache off and LALT RALT c will turn the cache on.
  185.  
  186. keyconfig format
  187.  
  188. cddriveno<NL>
  189. primary trigger key nemonic<NL>
  190. secondary trigger key nemonic<NL>
  191.  
  192. Beta test Hotkeys v0.12
  193. -----------------------
  194.  
  195. Ok this is rather primitive at the moment.  Just put the key you wish to add a hotkey for and an nl followed by the oscli command and a nl.  Like in the
  196. Hotkeys file included.
  197.  
  198. Hard wired hotkeys
  199.  
  200. Alt escape pause cd  
  201. Alt F1 - F12 play cd track
  202. Alt Print play current track + 1
  203. Alt Scroll Lock eject cd
  204.  
  205.  
  206.  
  207. Current key mappings 
  208.  
  209. data keycodes[MAX_KEYCODES+1] = {
  210.                                {"`",0x10},
  211.                                {"1",0x11},
  212.                                {"2",0x12},
  213.                                {"3",0x13},
  214.                                {"4",0x14},
  215.                                {"5",0x15},
  216.                                {"6",0x16},
  217.                                {"7",0x17},
  218.                                {"8",0x18},
  219.                                {"9",0x19},
  220.                                {"0",0x1a},
  221.                                {"-",0x1b},
  222.                                {"=",0x1c},
  223.                                {"BackSpace",0x1e},
  224.                                {"v1",0x1f},
  225.                                {"Insert",0x1f},
  226.                                {"Home",0x20},
  227.                                {"PageUp",0x21},
  228.                                {"NumLock",0x22},
  229.                                {"n/",0x23},
  230.                                {"n*",0x24},
  231.                                {"n-",0x25},
  232.                                {"Tab",0x26},
  233.                                {"q",0x27},
  234.                                {"w",0x28},
  235.                                {"e",0x29},
  236.                                {"r",0x2a},
  237.                                {"t",0x2b},
  238.                                {"y",0x2c},
  239.                                {"u",0x2d},
  240.                                {"i",0x2e},
  241.                                {"o",0x2f},
  242.                                {"p",0x30},
  243.                                {"[",0x31},
  244.                                {"]",0x32},
  245.                                {"v2",0x33},
  246.                                {"Delete",0x34},
  247.                                {"Copy",0x35},
  248.                                {"PageDown",0x36},
  249.                                {"n7",0x37},
  250.                                {"n8",0x38},
  251.                                {"n9",0x39},
  252.                                {"v3",0x3a},
  253.                                {"RightControl",0x3b},
  254.                                {"a",0x3c},
  255.                                {"s",0x3d},
  256.                                {"d",0x3e},
  257.                                {"f",0x3f},
  258.                                {"g",0x40},
  259.                                {"h",0x41},
  260.                                {"j",0x42},
  261.                                {"k",0x43},
  262.                                {"l",0x44},
  263.                                {";",0x45},
  264.                                {"'",0x46},
  265.                                {"Return",0x47},
  266.                                {"n4",0x48},
  267.                                {"n5",0x49},
  268.                                {"n6",0x4a},
  269.                                {"n+",0x4b},
  270.                                {"LeftShift",0x4c},
  271.                                {"\\",0x4d},
  272.                                {"z",0x4e},
  273.                                {"x",0x4f},
  274.                                {"c",0x50},
  275.                                {"v",0x51},
  276.                                {"b",0x52},
  277.                                {"n",0x53},
  278.                                {"m",0x54},
  279.                                {",",0x55},
  280.                                {".",0x56},
  281.                                {"/",0x57},
  282.                                {"RightShift",0x58},
  283.                                {"Up",0x59},
  284.                                {"n1",0x5a},
  285.                                {"n2",0x5b},
  286.                                {"n3",0x5c},
  287.                                {"CapsLock",0x5d},
  288.                                {"LeftAlt",0x5e},
  289.                                {"Space",0x5f},
  290.                                {"RightAlt",0x60},
  291.                                {"RightControl",0x61},
  292.                                {"Left",0x62},
  293.                                {"Down",0x63},
  294.                                {"Right",0x64},
  295.                                {"n0",0x65},
  296.                                {"n.",0x66},
  297.                                {"Enter",0x67},
  298.                                {"",BYTE_TERM}
  299.                                };
  300.  
  301.  
  302. Wish list
  303. ---------
  304.  
  305. A nice gui to go with the module.
  306. Run helpfile though spell checker
  307. This program reaching no. 1 on hensas download list. :-)
  308.  
  309.  
  310. by
  311.  
  312. +-------------------------------------------------------------------------+
  313. |                -=>>Phillip Camp pssc1@ukc.ac.uk<<=-                     |
  314. +-------------------------------------------------------------------------+
  315. |   "It's what I do," he muttered to himself.                             |
  316. |   "Any time there's somthing so rediculously dangerous that no rational |
  317. |    human being would even consider trying it, they send for me."        |
  318. |               -- Belgarion                                              |
  319. |               (David Eddings, King Of The Murgos)                       |
  320. +-------------------------------------------------------------------------+
  321.  
  322.