home *** CD-ROM | disk | FTP | other *** search
/ PDA Software Library / pdasoftwarelib.iso / HP95_100 / UTILITY / REMKEY / REMKEY.DOC < prev    next >
Encoding:
Text File  |  1994-01-10  |  20.0 KB  |  459 lines

  1.            RemKey - Remote Keyboard for the HP 100LX and other PCs
  2.                                     V1.00
  3.                                January 7, 1994
  4.                                  Craig Payne
  5.                             CompuServe: 72672,3706
  6.                      Internet: 72672.3706@compuserve.com
  7.  
  8. RemKey is a small program (about 4 KBytes, 2 KBytes resident) which allows
  9. the keyboard of one PC to act as the keyboard of another PC via a serial
  10. link. RemKey was specifically written for the HP 100LX palmtop (hereafter
  11. referred to as "the LX") to allow using a full-size keyboard with the LX
  12. while it is connected to a desktop PC. Although RemKey has some features
  13. specific to the LX it should work between any two PCs connected by a serial
  14. cable.
  15.  
  16. RemKey operates in two distinct modes: as a sender of key strokes or as a
  17. receiver. As a receiver RemKey always installs as a resident (TSR) program.
  18. As a sender RemKey may be used as a conventional program or as a TSR. By
  19. default RemKey acts as a sender when run on a conventional PC and as a
  20. receiver when run on a LX. These defaults can be overridden by command line
  21. options. 
  22.  
  23. QUICK START: On the LX terminate the SysMgr (<More><Menu>AT<Enter>). Change
  24. to the directory where you copied REMKEY.COM and type "remkey" at the DOS
  25. prompt. On your PC type "remkey" or "remkey /t" to use RemKey as a TSR.
  26. "remkey /2" for COM2, "remkey /3/t" to use as a TSR with COM3, etc. With
  27. RemKey active on the PC anything you type should appear on the LX. On the
  28. PC press Alt and "8" to exit RemKey. On the LX Alt plus "8" will toggle
  29. RemKey off and on. The high-pitched "warble" indicates that RemKey is
  30. active, the low-pitched warble indicates it is inactive or disabled. Follow
  31. the key guide displayed on the sending PC for which key combinations map to
  32. the special keys on the LX. If you like how RemKey works you might want to
  33. add it to your AUTOEXEC.BAT. Adding the line "remkey /d" will cause RemKey
  34. to start disabled.
  35.  
  36. Detailed Instructions:
  37.  
  38. Assuming that your PC is connected to the LX via COM1 with the standard HP
  39. F1015A serial cable you can install RemKey as follows:
  40.  
  41.  - Transfer REMKEY.COM to the LX in any way you can: Filer, DataComm,   
  42.    InterLink, LapLink, Zip, etc.
  43.  - On the 100LX exit SysMgr by pressing the blue "&.." key followed by
  44.    MENU, "A", "T" and <ENTER>.
  45.  - At the DOS prompt on the LX run RemKey by typing "remkey". You should
  46.    see the message:
  47.  
  48.     RemKey V1.00 - Remote Keyboard Via Serial Port.
  49.     Using serial port COM1.
  50.     RemKey has been installed, press Alt 8 to toggle enable.
  51.     Type "REMKEY /U" to uninstall.
  52.   
  53.  - on your other PC run RemKey ("remkey /2" for COM2, "/3" for COM3, "/4"
  54.    for COM4). This message will be displayed:
  55.  
  56.     RemKey V0.61 - Remote Keyboard Via Serial Port.
  57.     Using serial port COM1.
  58.  
  59.     Ctrl+Alt: Setup  Data   Stop   Data   Note    DOS   World  System
  60.     │                Comm   watch  base   Taker         Time   Macros
  61.     │
  62.     │    Alt: Filer   cc:   Appt   Phone   Memo  Lotus   HP     App
  63.     │    │           Mail                         123   Calc    Mgr
  64.     │    │
  65.     │    │      !      @      #      $      ^      &      (      )
  66.     └────┴───── 1      2      3      4      6      7      9      0
  67.  
  68.     Press Shift+Alt+[12346790] for Alt+Blue keys.
  69.  
  70.                Zoom   Date   Time    Cut  Copy  Paste
  71.     Press Alt+ Space  Comma  Period  Del  BSpc  Ins
  72.  
  73.     Press Ctrl+Alt+F1..F10 to play back macro, 
  74.           Shift+Ctrl+Alt+F1..F10 to record.
  75.  
  76.     Tap either Alt key for the Menu key, press Alt+8 to exit.
  77.  
  78. RemKey is enable by default on the LX. So now any keys you type at the PC
  79. will appear on the LX and NOT be echoed on the other PC. Both keyboards
  80. remain active. On the LX type "100" <Enter> to return control to SysMgr. By
  81. placing the command to run RemKey in your AUTOEXEC.BAT on the LX you could
  82. automate this installation. To regain control of the sending PC hold down
  83. the Alt-key and press "8". You should be returned to the DOS prompt.
  84.  
  85. A standard PC keyboard does not have many of the special keys found on the
  86. LX's keyboard. When RemKey starts in send mode it displays the short
  87. summary listed above showing how the special keys are mapped to a
  88. conventional keyboard.
  89.  
  90. For the blue keys on the LX the mapping is fairly straight-forward. Each
  91. blue key can be remotely pressed by holding down an "Alt" key and pressing
  92. the key whose label is found above the desired blue key in yellow. For
  93. example if you wished to run the MEMO application you would note that the
  94. yellow symbol above the blue MEMO key is "^". On the remote keyboard hold
  95. down either "Alt" key and press the "^" (or "6") key. The MEMO application
  96. should run just as if you had pressed the actual blue MEMO key. The other
  97. blue keys are mapped in the same way.
  98.  
  99. On the 100LX Another set of applications are reached by holding down the
  100. Ctrl key and pressing a blue key. Ctrl-Filer launches Setup, Ctrl-cc:Mail
  101. launches Data Comm, etc. With RemKey you would push Ctrl+Alt+"1" and
  102. Ctrl+Alt+"2" on the full-sized keyboard to reach the same applications.
  103.  
  104. The 100LX Application Manager (reached via the "&..." key) allows any key
  105. to be assigned to third-party "EXM" applications. Commonly these
  106. applications are assigned to mnemonic combinations of the Alt and blue
  107. keys. For example a "clock" program might have Alt+<Appt> assigned as its
  108. "hot" key. To press these "Alt blue" key combinations on a full-sized
  109. keyboard via RemKey use Shift+Alt and the appropriate key "12346790". For
  110. example if a programmer's hex calculator had a hot-key on the 100LX
  111. keyboard of Alt+<HP Calc> it could be run via RemKey with Shift+Alt+"(".
  112.  
  113. The MENU key can be produced by just taping either "Alt" key. Just press
  114. and release the key to pop-up the menu of the LX built-in applications. Of
  115. course you can also jump directly to menus such as the "File" menu by
  116. holding down either "Alt" key and pressing the underlined letter.
  117.  
  118. For the 100LX-only green keys ZOOM, DATE and TIME press Alt space, comma
  119. and period respectively. The assignment of the CUT, COPY and PASTE keys on
  120. the remote keyboard does not directly follow that on the 100LX. Instead a
  121. more mnemonic mapping is used: Alt-DEL to CUT, Alt-backspace to COPY and
  122. Alt-Insert to PASTE. You can also use the standard short-cut keys: Ctrl-X
  123. for CUT, Ctrl-C for COPY and Ctrl-V for PASTE.
  124.  
  125. 100LX system macros can be played back or recorded. On a normal 100LX you
  126. can playback macro "n" by pressing the green "Fn" key and then function key
  127. "n". A macro can be recorded by pressing Shift, "Fn" and the function key.
  128. RemKey uses similar keystrokes on the remote keyboard but Ctrl and Alt
  129. replace the "Fn" key. So Ctrl Alt F3 plays back macro 3 while Shift Ctrl
  130. Alt F1 would start recording a new macro 1.
  131.  
  132. The receiving copy of RemKey can be disabled or enabled without being
  133. uninstalled by pressing Alt "8". When the enable or disable key is
  134. recognized you will hear a multi-tone beep or "warble". Enable yields a
  135. different, higher-pitched warble than disable.
  136.  
  137. Disabling and enabling RemKey is important if you wish to use the serial
  138. port for other programs such as Filer, DataComm, etc. When enabled RemKey
  139. is constantly fighting to keep the serial port turned on and configured the
  140. way it wants it to be. So you should disable RemKey first with Alt "8" and
  141. then run the program which uses the serial port. Also you should disable
  142. RemKey when you are running on batteries and it is not needed.
  143.  To completely uninstall RemKey exit from the SysMgr to the DOS prompt and
  144. type "remkey /u". You should see the message:
  145.  
  146.     RemKey V1.00 - Remote Keyboard Via Serial Port.
  147.     Remkey is already installed.
  148.     Uninstalled.
  149.  
  150. If you do not see this message then you probably did not exit the SysMgr
  151. but instead reached the DOS prompt via <Ctrl>-123 or the Filer. You MUST
  152. exit the SysMgr with "&...", MENU, "A" "T" <Enter> to uninstall RemKey.
  153.  
  154. RemKey supports a number of command line options. It will list a short
  155. summary if you run it like "remkey ?" or "remkey H". Actually any
  156. unrecognized option will cause this summary to be displayed:
  157.  
  158.     RemKey V1.00 - Remote Keyboard Via Serial Port.
  159.  
  160.     Usage: RemKey /[1,2,3,4] /[S,R,T] /[E,D] /C /U
  161.       /1,2,3,4: Comm Port, default is configured as 1
  162.  
  163.       /S Send keys to remote computer (default on PC).
  164.       /R Receive keys, install as TSR (default on 100LX).
  165.       /T TSR sender, the hot-key is Alt+8.
  166.  
  167.       /E Enable this or already installed program (default for receive).
  168.       /D Disable this or already installed program (default for send).
  169.  
  170.       /C Configure specified serial port as default and exit.
  171.       /U Unload a previously loaded copy and exit.
  172.  
  173.     Example - RemKey receiving on COM3, start disabled:
  174.       remkey /r/3/d
  175.  
  176. Choosing a serial port other than 1 is only useful on a non-LX. The default
  177. roles of receiver for a LX and sender for a non-100LX can be changed with
  178. the "/S" and "/R" options. If you wish to install RemKey as the receiving
  179. TSR but not be initially enabled then use the "/D" option.
  180.  
  181. If you wish to be able to send keys to the 100LX while in other programs on
  182. the sending PC then use the "/T" option to install RemKey as a TSR. Alt "8"
  183. will divert all key strokes to the 100LX while a second press of Alt "8"
  184. will return the keyboard to normal. When the sending TSR is active and your
  185. screen is in a "text" mode the message:
  186.  
  187.     <<< RemKey Active, Alt+8 to exit >>>
  188.  
  189. will flash on the screen. Otherwise you will here the "warble" sound when
  190. RemKey is enabled or disabled. Like the receiving TSR the sending TSR is
  191. uninstalled by typing "remkey /u".
  192.  
  193. If either the receiving or sending TSR is resident you can adjust its
  194. parameters by running RemKey again. Most often you will use this to disable
  195. the receiving TSR from a batch file before running another program that
  196. uses the serial port. You can also alter the serial port of the sending
  197. TSR. This would be useful in the rare case when you have more than on PC
  198. connected to multiple serial ports. In any case RemKey will display this
  199. message when updating a resident copy:
  200.  
  201.     RemKey V1.00 - Remote Keyboard Via Serial Port.
  202.     RemKey is currently installed.
  203.     Using serial port COM1.
  204.     The parameters have been updated.
  205.  
  206.  
  207. If one version of RemKey tries to interact with a resident copy of a
  208. different version then you will get this message:
  209.  
  210.     RemKey V1.00 - Remote Keyboard Via Serial Port.
  211.     Remkey is currently installed.
  212.     Incompatible versions.
  213.  
  214. If you wish you can alter the default parameters in a given copy of 
  215. RemKey. Just add the "C" option to the command line. For now the only
  216. default that it make sense to alter is the serial port. Typing "remkey
  217. /3/c" gets you the message:
  218.  
  219.     RemKey V1.00 - Remote Keyboard Via Serial Port.
  220.     RemKey is currently installed.
  221.     Using serial port COM3.
  222.     Configuring C:\REMKEY.COM
  223.  
  224.  
  225. Batch File Use Of RemKey:
  226.  
  227. When enabled remKey constantly fights for control of the serial port. This
  228. will give any other program that is trying to use the serial port at the
  229. same time much trouble. As described above you can manually disable RemKey
  230. with Alt+"8". But with DOS communications programs it is often more
  231. convenient to do the needed steps in a batch file. For example to
  232. automatically disable RemKey, run LapLink III and then re-enable RemKey you
  233. could use the following batch file:
  234.  
  235.     remkey /d
  236.     ll3
  237.     remkey /e
  238.  
  239. For other programs like ZIP or InterLnk just replace "ll3" with the name of
  240. your program.
  241.  
  242.  
  243. Messages In RemKey And What They Mean:
  244.  
  245. "<<< RemKey Active, Alt-8 to exit >>>"
  246.  
  247. RemKey is installed as a resident (TSR) program and is configured to send
  248. keys to another PC via the serial port. RemKey has been activated or
  249. triggered by pressing its hot-key combination Alt+"8". In other words
  250. either Alt key was held down and the "*"/"8" key in the top row of keys was
  251. pressed. Your PC may appear to be locked because every key you press while
  252. remKey is active is be diverted to the serial port. By pressing Alt+"8"
  253. again you can clear the flashing message and return your keyboard to its
  254. normal operation.
  255.  
  256.  
  257. "RemKey has been uninstalled."
  258.  
  259. RemKey was installed as a resident (TSR) program but has been removed from
  260. memory by the command "remkey /u".
  261.  
  262.  
  263. "Multiplex error."
  264.  
  265. This indicates some internal error in RemKey or a conflict with some other
  266. resident (TSR) program. Try removing the other resident programs one at a
  267. time and re-running RemKey. If you can not solve the problem contact me at
  268. one of the e-mail addresses listed at the top of this document.
  269.  
  270.  
  271. "RemKey only works on a standard PC or the HP 100LX palmtop."
  272.  
  273. You are probably trying to run RemKey on an HP 95LX palmtop. This version
  274. of RemKey will not work on a 95LX. I am working on a version that does,
  275. please send me an e-mail message indicating your interest in a 95LX
  276. version.
  277.  
  278.  
  279. "RemKey is not already installed, it can not be uninstalled."
  280.  
  281. The command "remkey /u" was issued to remove a resident copy of RemKey from
  282. memory but RemKey is not installed.
  283.  
  284.  
  285. "RemKey has been installed, press Alt 8 to toggle enable."
  286. "Type "REMKEY /U" to uninstall."
  287.  
  288. RemKey is now installed in memory as a resident (TSR) program. This message
  289. is used when remKey is acting as a sender or receiver of key-strokes.
  290. Either configuration is enable or disabled by the same "hot key" - Alt+"8".
  291. Typing the command "remkey /u" at the DOS prompt will uninstall RemKey and
  292. remove it from memory.
  293.  
  294.  
  295. "Using serial port COMn"
  296.  
  297. RemKey is configured to send or receive key-strokes on serial port "n"
  298. where n is 1 through 4. On the 100LX this should almost always be "1"
  299.  
  300.  
  301. "RemKey is currently installed."
  302.  
  303. RemKey was just run and discovered that another copy of RemKey is already
  304. resident in memory.
  305.  
  306.  
  307. "The parameters have been updated."
  308.  
  309. The parameters of the copy of RemKey that was just run have been passed to
  310. the already-resident copy of RemKey. For version 1.0 the only parameters
  311. that can be passed are the enable/disable state and the serial port number.
  312.  
  313.  
  314. "Incompatible versions."
  315.  
  316. RemKey was just run and discovered that another copy of RemKey of a
  317. different version is already resident in memory. The only two ways to
  318. remove the resident copy from memory is to find its matching REMKEY.COM
  319. file or reboot the computer.
  320.  
  321.  
  322. "Can't uninstall RemKey, try exiting AppMgr completely." or
  323. "Can't install RemKey, try exiting AppMgr completely."
  324.  
  325. You probably reached DOS on the 100LX by pressing <Ctrl><123>, the DOS icon
  326. in the Application Manager screen, the DOS option in Filer, pointing to
  327. REMKEY.COM in Filer, or the "system" option in 123. RemKey can not be
  328. installed or uninstalled from DOS when it has been reached in any of these
  329. ways. You must completely exit from the System Manager to install or
  330. uninstall RemKey. To do this press the blue "&..." key, then the black
  331. "MENU" key, then the "A" key and the "T" key. Read the displayed note
  332. entitled "Terminate System Manager" and if you understand it press the
  333. "ENTER" key. Otherwise press the "ESC" key and find an expert. Now you can
  334. install or uninstall RemKey. The easiest way to install RemKey is by adding
  335. it to your AUTOEXEC.BAT file.
  336.  
  337. You can also get the "Can't uninstall..." message if you have loaded other
  338. resident (TSR) programs after RemKey and then tried to uninstall RemKey
  339. without first uninstalling these other resident programs.
  340.  
  341.  
  342. "Configuring" <file path>
  343.  
  344. You ran RemKey with the "/C" option. It has modified the default serial
  345. port number in the specified copy of REMKEY.COM.
  346.  
  347.  
  348. "Error updating file."
  349.  
  350. RemKey was not able to read or write the file named in the "Configuring"
  351. line. Perhaps it is stored on write-protected media or has a read-only file
  352. attribute.
  353.  
  354.  
  355. Debugging:
  356.  
  357. RemKey is the worst of all worlds - it is two TSRs, a serial communications
  358. program and uses 100lX-specific code. It has been exercised by a number of
  359. testers but it may not work for you on your specific configuration. To aid
  360. me in identifying problems I have included a version of RemKey which
  361. included special debugging support. This version is in a file called 
  362. REMKEYDB.COM and functions just like REMKEY.COM. But it also shows on the
  363. screen what is sent or received on the serial port and the key-codes that
  364. are processed. If certain keys don't work or if RemKey doesn't function at
  365. all then try running REMKEYDB.COM in place of REMKEY.COM.
  366.  
  367. REMKEYDB.COM is the debug version of Remkey that is produced if you
  368. assemble REMKEY.ASM with "debug equ 0" changed to "debug equ 1". The debug
  369. version will display scan codes of keys typed on the sender and stuffed
  370. into the type-ahead buffer on the receiver. It will also display the actual
  371. bytes sent over the serial cable. With all this extra output it is best to
  372. only run REMKEYDB.COM at the DOS prompt on the sender and receiver. If you
  373. execute REMKEYDB.COM on both sides and press the "1" below the "!" on the
  374. sending PC you will see this on the sending side:
  375.  
  376.  K0231 S31 S02 S6F
  377.  
  378. and this on the receiving side:
  379.  
  380.  R31 R02 R6F W0231
  381.  
  382. On the sending side the letter "K" tags the scancode/ASCII pair of the
  383. pressed key. The letter "S" tags any byte sent out the serial port. On the
  384. receiving side the letter "R" tags any byte received on the serial port. 
  385. The letter "W" tags the scan-code/ASCII pair that was written to the
  386. keyboard buffer.
  387.  
  388. In the example above "0231" is the scancode and ASCII code for the "1" key.
  389. "S31" and "S02" show the ASCII code and scancode, respectively. "S6F" shows
  390. the sending of a synchronization byte. Every pressed key causes three bytes
  391. to be sent: the ASCII code, the scan code and the sync byte. The sync byte
  392. allows the receiver to detect lost bytes. It is calculated like this:
  393.  
  394.  ASCII XOR rol(scan code) XOR 5a
  395.  
  396. or in English "rotate the bits of the scan code left and exclusive OR this
  397. with the ASCII code and 5ah".
  398.  
  399. RemKey sends three bytes for each key and runs the serial port at 1200
  400. baud, 8 data bits, no parity, 1 stop bit. To be able to poll fast enough to
  401. catch 120 bytes per second RemKey increases the timer interrupt 0 from 18.2
  402. interrupts per second by a factor of seven to 127.4 interrupts per second.
  403. By intercepting these interrupts and only passing on every seventh one
  404. RemKey keeps the rest of the LX's software happy.
  405.  
  406. Not every "triple" of bytes received ("R") results in a key being written
  407. ("W"). Keys like Shift, Ctrl and Caps Lock are sent as special codes but
  408. don't turn into actual scancode/ASCII pairs.
  409.  
  410. Hopefully the above explanation will help you to interpret the debugging
  411. output. But you don't have to. If a certain key does not work as you expect
  412. via RemKey then temporarily load REMKEYDB.COM on both sides of the
  413. connection. Press the troublesome key and carefully record what is
  414. displayed on both screens. Then send me an e-mail at either of the
  415. addresses at the top of this document describing what key you are pressing
  416. and the recorded debugging output.
  417.  
  418.  
  419. Credits:
  420.  
  421. Some of the logic in this program was lifted from KEY100.ASM by Andy Gryc
  422. and PUSHKEYS.COM by Raan Young and Dave Suvak, all of HP Corvallis. Special
  423. thanks to Gilles Kohl who created the supplied Windows icon for RemKey (in
  424. REMKEY.ICO) and Jorge M. Trevino who designed the included 100LX AppMgr
  425. icon (in REMKEY.ICN). As the receiving side of RemKey always runs as a TSR
  426. either icon is only really useful when RemKey is used as a non-TSR sender
  427. of keystrokes.
  428.  
  429.  
  430. Many thanks to the beta-test team for testing and suggesting improvements:
  431.  
  432.    Siroos Afshar
  433.    Conrad D. Cox
  434.    Ron Crain
  435.    James Dean
  436.    Stanley Dobrowski
  437.    Bruce Holmen
  438.    Ed Keefe
  439.    Gilles Kohl
  440.    David J. Marsh
  441.    Thomas Rundel
  442.    Mark Scardina
  443.    David N. Smith
  444.    Jorge M. Trevino
  445.    Steve Zweibel
  446.  
  447. Known bugs/flaws in RemKey 1.00:
  448.  
  449.  - When the hot-key is used in Lotus 123 a garbage character of "`" is
  450.    entered.
  451.  
  452. This covers version 1.00 of RemKey, the first public release. RemKey
  453. contains bugs, use it at your own risk. RemKey is FreeWare and includes the
  454. source code. Do what you want with it but try and keep it in the original
  455. .ZIP file with this documentation file. Send me your feedback and ideas.
  456.  
  457. Craig Payne
  458.  
  459.