home *** CD-ROM | disk | FTP | other *** search
- RemKey - Remote Keyboard for the HP 100LX and other PCs
- V1.00
- January 7, 1994
- Craig Payne
- CompuServe: 72672,3706
- Internet: 72672.3706@compuserve.com
-
- RemKey is a small program (about 4 KBytes, 2 KBytes resident) which allows
- the keyboard of one PC to act as the keyboard of another PC via a serial
- link. RemKey was specifically written for the HP 100LX palmtop (hereafter
- referred to as "the LX") to allow using a full-size keyboard with the LX
- while it is connected to a desktop PC. Although RemKey has some features
- specific to the LX it should work between any two PCs connected by a serial
- cable.
-
- RemKey operates in two distinct modes: as a sender of key strokes or as a
- receiver. As a receiver RemKey always installs as a resident (TSR) program.
- As a sender RemKey may be used as a conventional program or as a TSR. By
- default RemKey acts as a sender when run on a conventional PC and as a
- receiver when run on a LX. These defaults can be overridden by command line
- options.
-
- QUICK START: On the LX terminate the SysMgr (<More><Menu>AT<Enter>). Change
- to the directory where you copied REMKEY.COM and type "remkey" at the DOS
- prompt. On your PC type "remkey" or "remkey /t" to use RemKey as a TSR.
- "remkey /2" for COM2, "remkey /3/t" to use as a TSR with COM3, etc. With
- RemKey active on the PC anything you type should appear on the LX. On the
- PC press Alt and "8" to exit RemKey. On the LX Alt plus "8" will toggle
- RemKey off and on. The high-pitched "warble" indicates that RemKey is
- active, the low-pitched warble indicates it is inactive or disabled. Follow
- the key guide displayed on the sending PC for which key combinations map to
- the special keys on the LX. If you like how RemKey works you might want to
- add it to your AUTOEXEC.BAT. Adding the line "remkey /d" will cause RemKey
- to start disabled.
-
- Detailed Instructions:
-
- Assuming that your PC is connected to the LX via COM1 with the standard HP
- F1015A serial cable you can install RemKey as follows:
-
- - Transfer REMKEY.COM to the LX in any way you can: Filer, DataComm,
- InterLink, LapLink, Zip, etc.
- - On the 100LX exit SysMgr by pressing the blue "&.." key followed by
- MENU, "A", "T" and <ENTER>.
- - At the DOS prompt on the LX run RemKey by typing "remkey". You should
- see the message:
-
- RemKey V1.00 - Remote Keyboard Via Serial Port.
- Using serial port COM1.
- RemKey has been installed, press Alt 8 to toggle enable.
- Type "REMKEY /U" to uninstall.
-
- - on your other PC run RemKey ("remkey /2" for COM2, "/3" for COM3, "/4"
- for COM4). This message will be displayed:
-
- RemKey V0.61 - Remote Keyboard Via Serial Port.
- Using serial port COM1.
-
- Ctrl+Alt: Setup Data Stop Data Note DOS World System
- │ Comm watch base Taker Time Macros
- │
- │ Alt: Filer cc: Appt Phone Memo Lotus HP App
- │ │ Mail 123 Calc Mgr
- │ │
- │ │ ! @ # $ ^ & ( )
- └────┴───── 1 2 3 4 6 7 9 0
-
- Press Shift+Alt+[12346790] for Alt+Blue keys.
-
- Zoom Date Time Cut Copy Paste
- Press Alt+ Space Comma Period Del BSpc Ins
-
- Press Ctrl+Alt+F1..F10 to play back macro,
- Shift+Ctrl+Alt+F1..F10 to record.
-
- Tap either Alt key for the Menu key, press Alt+8 to exit.
-
- RemKey is enable by default on the LX. So now any keys you type at the PC
- will appear on the LX and NOT be echoed on the other PC. Both keyboards
- remain active. On the LX type "100" <Enter> to return control to SysMgr. By
- placing the command to run RemKey in your AUTOEXEC.BAT on the LX you could
- automate this installation. To regain control of the sending PC hold down
- the Alt-key and press "8". You should be returned to the DOS prompt.
-
- A standard PC keyboard does not have many of the special keys found on the
- LX's keyboard. When RemKey starts in send mode it displays the short
- summary listed above showing how the special keys are mapped to a
- conventional keyboard.
-
- For the blue keys on the LX the mapping is fairly straight-forward. Each
- blue key can be remotely pressed by holding down an "Alt" key and pressing
- the key whose label is found above the desired blue key in yellow. For
- example if you wished to run the MEMO application you would note that the
- yellow symbol above the blue MEMO key is "^". On the remote keyboard hold
- down either "Alt" key and press the "^" (or "6") key. The MEMO application
- should run just as if you had pressed the actual blue MEMO key. The other
- blue keys are mapped in the same way.
-
- On the 100LX Another set of applications are reached by holding down the
- Ctrl key and pressing a blue key. Ctrl-Filer launches Setup, Ctrl-cc:Mail
- launches Data Comm, etc. With RemKey you would push Ctrl+Alt+"1" and
- Ctrl+Alt+"2" on the full-sized keyboard to reach the same applications.
-
- The 100LX Application Manager (reached via the "&..." key) allows any key
- to be assigned to third-party "EXM" applications. Commonly these
- applications are assigned to mnemonic combinations of the Alt and blue
- keys. For example a "clock" program might have Alt+<Appt> assigned as its
- "hot" key. To press these "Alt blue" key combinations on a full-sized
- keyboard via RemKey use Shift+Alt and the appropriate key "12346790". For
- example if a programmer's hex calculator had a hot-key on the 100LX
- keyboard of Alt+<HP Calc> it could be run via RemKey with Shift+Alt+"(".
-
- The MENU key can be produced by just taping either "Alt" key. Just press
- and release the key to pop-up the menu of the LX built-in applications. Of
- course you can also jump directly to menus such as the "File" menu by
- holding down either "Alt" key and pressing the underlined letter.
-
- For the 100LX-only green keys ZOOM, DATE and TIME press Alt space, comma
- and period respectively. The assignment of the CUT, COPY and PASTE keys on
- the remote keyboard does not directly follow that on the 100LX. Instead a
- more mnemonic mapping is used: Alt-DEL to CUT, Alt-backspace to COPY and
- Alt-Insert to PASTE. You can also use the standard short-cut keys: Ctrl-X
- for CUT, Ctrl-C for COPY and Ctrl-V for PASTE.
-
- 100LX system macros can be played back or recorded. On a normal 100LX you
- can playback macro "n" by pressing the green "Fn" key and then function key
- "n". A macro can be recorded by pressing Shift, "Fn" and the function key.
- RemKey uses similar keystrokes on the remote keyboard but Ctrl and Alt
- replace the "Fn" key. So Ctrl Alt F3 plays back macro 3 while Shift Ctrl
- Alt F1 would start recording a new macro 1.
-
- The receiving copy of RemKey can be disabled or enabled without being
- uninstalled by pressing Alt "8". When the enable or disable key is
- recognized you will hear a multi-tone beep or "warble". Enable yields a
- different, higher-pitched warble than disable.
-
- Disabling and enabling RemKey is important if you wish to use the serial
- port for other programs such as Filer, DataComm, etc. When enabled RemKey
- is constantly fighting to keep the serial port turned on and configured the
- way it wants it to be. So you should disable RemKey first with Alt "8" and
- then run the program which uses the serial port. Also you should disable
- RemKey when you are running on batteries and it is not needed.
- To completely uninstall RemKey exit from the SysMgr to the DOS prompt and
- type "remkey /u". You should see the message:
-
- RemKey V1.00 - Remote Keyboard Via Serial Port.
- Remkey is already installed.
- Uninstalled.
-
- If you do not see this message then you probably did not exit the SysMgr
- but instead reached the DOS prompt via <Ctrl>-123 or the Filer. You MUST
- exit the SysMgr with "&...", MENU, "A" "T" <Enter> to uninstall RemKey.
-
- RemKey supports a number of command line options. It will list a short
- summary if you run it like "remkey ?" or "remkey H". Actually any
- unrecognized option will cause this summary to be displayed:
-
- RemKey V1.00 - Remote Keyboard Via Serial Port.
-
- Usage: RemKey /[1,2,3,4] /[S,R,T] /[E,D] /C /U
- /1,2,3,4: Comm Port, default is configured as 1
-
- /S Send keys to remote computer (default on PC).
- /R Receive keys, install as TSR (default on 100LX).
- /T TSR sender, the hot-key is Alt+8.
-
- /E Enable this or already installed program (default for receive).
- /D Disable this or already installed program (default for send).
-
- /C Configure specified serial port as default and exit.
- /U Unload a previously loaded copy and exit.
-
- Example - RemKey receiving on COM3, start disabled:
- remkey /r/3/d
-
- Choosing a serial port other than 1 is only useful on a non-LX. The default
- roles of receiver for a LX and sender for a non-100LX can be changed with
- the "/S" and "/R" options. If you wish to install RemKey as the receiving
- TSR but not be initially enabled then use the "/D" option.
-
- If you wish to be able to send keys to the 100LX while in other programs on
- the sending PC then use the "/T" option to install RemKey as a TSR. Alt "8"
- will divert all key strokes to the 100LX while a second press of Alt "8"
- will return the keyboard to normal. When the sending TSR is active and your
- screen is in a "text" mode the message:
-
- <<< RemKey Active, Alt+8 to exit >>>
-
- will flash on the screen. Otherwise you will here the "warble" sound when
- RemKey is enabled or disabled. Like the receiving TSR the sending TSR is
- uninstalled by typing "remkey /u".
-
- If either the receiving or sending TSR is resident you can adjust its
- parameters by running RemKey again. Most often you will use this to disable
- the receiving TSR from a batch file before running another program that
- uses the serial port. You can also alter the serial port of the sending
- TSR. This would be useful in the rare case when you have more than on PC
- connected to multiple serial ports. In any case RemKey will display this
- message when updating a resident copy:
-
- RemKey V1.00 - Remote Keyboard Via Serial Port.
- RemKey is currently installed.
- Using serial port COM1.
- The parameters have been updated.
-
-
- If one version of RemKey tries to interact with a resident copy of a
- different version then you will get this message:
-
- RemKey V1.00 - Remote Keyboard Via Serial Port.
- Remkey is currently installed.
- Incompatible versions.
-
- If you wish you can alter the default parameters in a given copy of
- RemKey. Just add the "C" option to the command line. For now the only
- default that it make sense to alter is the serial port. Typing "remkey
- /3/c" gets you the message:
-
- RemKey V1.00 - Remote Keyboard Via Serial Port.
- RemKey is currently installed.
- Using serial port COM3.
- Configuring C:\REMKEY.COM
-
-
- Batch File Use Of RemKey:
-
- When enabled remKey constantly fights for control of the serial port. This
- will give any other program that is trying to use the serial port at the
- same time much trouble. As described above you can manually disable RemKey
- with Alt+"8". But with DOS communications programs it is often more
- convenient to do the needed steps in a batch file. For example to
- automatically disable RemKey, run LapLink III and then re-enable RemKey you
- could use the following batch file:
-
- remkey /d
- ll3
- remkey /e
-
- For other programs like ZIP or InterLnk just replace "ll3" with the name of
- your program.
-
-
- Messages In RemKey And What They Mean:
-
- "<<< RemKey Active, Alt-8 to exit >>>"
-
- RemKey is installed as a resident (TSR) program and is configured to send
- keys to another PC via the serial port. RemKey has been activated or
- triggered by pressing its hot-key combination Alt+"8". In other words
- either Alt key was held down and the "*"/"8" key in the top row of keys was
- pressed. Your PC may appear to be locked because every key you press while
- remKey is active is be diverted to the serial port. By pressing Alt+"8"
- again you can clear the flashing message and return your keyboard to its
- normal operation.
-
-
- "RemKey has been uninstalled."
-
- RemKey was installed as a resident (TSR) program but has been removed from
- memory by the command "remkey /u".
-
-
- "Multiplex error."
-
- This indicates some internal error in RemKey or a conflict with some other
- resident (TSR) program. Try removing the other resident programs one at a
- time and re-running RemKey. If you can not solve the problem contact me at
- one of the e-mail addresses listed at the top of this document.
-
-
- "RemKey only works on a standard PC or the HP 100LX palmtop."
-
- You are probably trying to run RemKey on an HP 95LX palmtop. This version
- of RemKey will not work on a 95LX. I am working on a version that does,
- please send me an e-mail message indicating your interest in a 95LX
- version.
-
-
- "RemKey is not already installed, it can not be uninstalled."
-
- The command "remkey /u" was issued to remove a resident copy of RemKey from
- memory but RemKey is not installed.
-
-
- "RemKey has been installed, press Alt 8 to toggle enable."
- "Type "REMKEY /U" to uninstall."
-
- RemKey is now installed in memory as a resident (TSR) program. This message
- is used when remKey is acting as a sender or receiver of key-strokes.
- Either configuration is enable or disabled by the same "hot key" - Alt+"8".
- Typing the command "remkey /u" at the DOS prompt will uninstall RemKey and
- remove it from memory.
-
-
- "Using serial port COMn"
-
- RemKey is configured to send or receive key-strokes on serial port "n"
- where n is 1 through 4. On the 100LX this should almost always be "1"
-
-
- "RemKey is currently installed."
-
- RemKey was just run and discovered that another copy of RemKey is already
- resident in memory.
-
-
- "The parameters have been updated."
-
- The parameters of the copy of RemKey that was just run have been passed to
- the already-resident copy of RemKey. For version 1.0 the only parameters
- that can be passed are the enable/disable state and the serial port number.
-
-
- "Incompatible versions."
-
- RemKey was just run and discovered that another copy of RemKey of a
- different version is already resident in memory. The only two ways to
- remove the resident copy from memory is to find its matching REMKEY.COM
- file or reboot the computer.
-
-
- "Can't uninstall RemKey, try exiting AppMgr completely." or
- "Can't install RemKey, try exiting AppMgr completely."
-
- You probably reached DOS on the 100LX by pressing <Ctrl><123>, the DOS icon
- in the Application Manager screen, the DOS option in Filer, pointing to
- REMKEY.COM in Filer, or the "system" option in 123. RemKey can not be
- installed or uninstalled from DOS when it has been reached in any of these
- ways. You must completely exit from the System Manager to install or
- uninstall RemKey. To do this press the blue "&..." key, then the black
- "MENU" key, then the "A" key and the "T" key. Read the displayed note
- entitled "Terminate System Manager" and if you understand it press the
- "ENTER" key. Otherwise press the "ESC" key and find an expert. Now you can
- install or uninstall RemKey. The easiest way to install RemKey is by adding
- it to your AUTOEXEC.BAT file.
-
- You can also get the "Can't uninstall..." message if you have loaded other
- resident (TSR) programs after RemKey and then tried to uninstall RemKey
- without first uninstalling these other resident programs.
-
-
- "Configuring" <file path>
-
- You ran RemKey with the "/C" option. It has modified the default serial
- port number in the specified copy of REMKEY.COM.
-
-
- "Error updating file."
-
- RemKey was not able to read or write the file named in the "Configuring"
- line. Perhaps it is stored on write-protected media or has a read-only file
- attribute.
-
-
- Debugging:
-
- RemKey is the worst of all worlds - it is two TSRs, a serial communications
- program and uses 100lX-specific code. It has been exercised by a number of
- testers but it may not work for you on your specific configuration. To aid
- me in identifying problems I have included a version of RemKey which
- included special debugging support. This version is in a file called
- REMKEYDB.COM and functions just like REMKEY.COM. But it also shows on the
- screen what is sent or received on the serial port and the key-codes that
- are processed. If certain keys don't work or if RemKey doesn't function at
- all then try running REMKEYDB.COM in place of REMKEY.COM.
-
- REMKEYDB.COM is the debug version of Remkey that is produced if you
- assemble REMKEY.ASM with "debug equ 0" changed to "debug equ 1". The debug
- version will display scan codes of keys typed on the sender and stuffed
- into the type-ahead buffer on the receiver. It will also display the actual
- bytes sent over the serial cable. With all this extra output it is best to
- only run REMKEYDB.COM at the DOS prompt on the sender and receiver. If you
- execute REMKEYDB.COM on both sides and press the "1" below the "!" on the
- sending PC you will see this on the sending side:
-
- K0231 S31 S02 S6F
-
- and this on the receiving side:
-
- R31 R02 R6F W0231
-
- On the sending side the letter "K" tags the scancode/ASCII pair of the
- pressed key. The letter "S" tags any byte sent out the serial port. On the
- receiving side the letter "R" tags any byte received on the serial port.
- The letter "W" tags the scan-code/ASCII pair that was written to the
- keyboard buffer.
-
- In the example above "0231" is the scancode and ASCII code for the "1" key.
- "S31" and "S02" show the ASCII code and scancode, respectively. "S6F" shows
- the sending of a synchronization byte. Every pressed key causes three bytes
- to be sent: the ASCII code, the scan code and the sync byte. The sync byte
- allows the receiver to detect lost bytes. It is calculated like this:
-
- ASCII XOR rol(scan code) XOR 5a
-
- or in English "rotate the bits of the scan code left and exclusive OR this
- with the ASCII code and 5ah".
-
- RemKey sends three bytes for each key and runs the serial port at 1200
- baud, 8 data bits, no parity, 1 stop bit. To be able to poll fast enough to
- catch 120 bytes per second RemKey increases the timer interrupt 0 from 18.2
- interrupts per second by a factor of seven to 127.4 interrupts per second.
- By intercepting these interrupts and only passing on every seventh one
- RemKey keeps the rest of the LX's software happy.
-
- Not every "triple" of bytes received ("R") results in a key being written
- ("W"). Keys like Shift, Ctrl and Caps Lock are sent as special codes but
- don't turn into actual scancode/ASCII pairs.
-
- Hopefully the above explanation will help you to interpret the debugging
- output. But you don't have to. If a certain key does not work as you expect
- via RemKey then temporarily load REMKEYDB.COM on both sides of the
- connection. Press the troublesome key and carefully record what is
- displayed on both screens. Then send me an e-mail at either of the
- addresses at the top of this document describing what key you are pressing
- and the recorded debugging output.
-
-
- Credits:
-
- Some of the logic in this program was lifted from KEY100.ASM by Andy Gryc
- and PUSHKEYS.COM by Raan Young and Dave Suvak, all of HP Corvallis. Special
- thanks to Gilles Kohl who created the supplied Windows icon for RemKey (in
- REMKEY.ICO) and Jorge M. Trevino who designed the included 100LX AppMgr
- icon (in REMKEY.ICN). As the receiving side of RemKey always runs as a TSR
- either icon is only really useful when RemKey is used as a non-TSR sender
- of keystrokes.
-
-
- Many thanks to the beta-test team for testing and suggesting improvements:
-
- Siroos Afshar
- Conrad D. Cox
- Ron Crain
- James Dean
- Stanley Dobrowski
- Bruce Holmen
- Ed Keefe
- Gilles Kohl
- David J. Marsh
- Thomas Rundel
- Mark Scardina
- David N. Smith
- Jorge M. Trevino
- Steve Zweibel
-
- Known bugs/flaws in RemKey 1.00:
-
- - When the hot-key is used in Lotus 123 a garbage character of "`" is
- entered.
-
- This covers version 1.00 of RemKey, the first public release. RemKey
- contains bugs, use it at your own risk. RemKey is FreeWare and includes the
- source code. Do what you want with it but try and keep it in the original
- .ZIP file with this documentation file. Send me your feedback and ideas.
-
- Craig Payne
-
-