I have written several programs that allow a SAM Coupé with the Comms interface to be used as the keyboard (and mouse) for any machine running Linux with an RS232 port. These programs are:
event.cde’ is on the disk (in SC_Assembler format),
but this has no comments. You can download it (with comments!) as a text file, though.Warning: the userevent module has possible security
implications. If a user is given permissions for the
/dev/userevent device, this is equivalent to handing the
machine’s keyboard and mouse to that user. The user may be able to
perform reboots, kill processes, etc. without the need to log in.
The drivers (and DOS) on the event.dsk are not my own work. They were Copyright © M.G.T. and SAMCo respectively. The Coupé programs (event.asm and event.bas) are in the public domain. The GNU/Linux programs (userevent, usertype and samevent) are distributed under the terms of the GNU General Public License (GPL).
To create the relay, perform the following (as root):
mknod.userevent script.samevent < /dev/ttyS0’ root),
and load and run ‘event’ on the Coupé. It should now be
possible to type text, using the Coupé as a keyboard. If your
Coupé has a mouse attached, it should also be possible to use the
Coupé’s mouse with GPM or X.KEY_RIGHTALT) sends
KEY_ESC.2005-08-07 22:09:14 BST: 1.2 Renamed to "samevent" (was "samkbd"). Added mouse support. Now using "/dev/userevent". Updated to the userevent-1.2 protocol. Added "userevent.h". 2005-08-05 19:49:28 BST: 1.1 Made the EDIT key send KEY_RIGHTALT (instead of KEY_META). Made the CNTRL key send KEY_LEFTALT (instead of KEY_LEFTCTRL). Made the SYMBOL keys send KEY_LEFTCTRL (instead of KEY_LEFTALT). 2005-08-02 00:47:13 BST: 1.0 Initial release.
2005-08-07 22:09:14 BST: 1.2 Renamed to "userevent" (was "usrkbd"). Added key repeat support. Added mouse support. Now using "/dev/userevent" (was "/dev/usrkbd"). Added "userevent.h". 2005-08-05 19:49:28 BST: 1.1 The build script now determines the build directory using "uname -r". 2005-08-02 00:47:13 BST: 1.0 Initial release.
2005-08-02 22:09:14: 1.1 Renamed to "usertype" (was "kbdtype"). Now using "/dev/userevent". Updated to the userevent-1.2 protocol. Added "userevent.h". 2005-08-02 00:47:13: 1.0 Initial release. Appears to miss keys ocassionally.
2005-08-07 22:09:14 BST: 1.2 Renamed to "event" (was "keyb"). Added mouse support. 2005-08-05 19:49:28 BST: 1.1 Minor cleanups. 2005-08-03 23:37:14 BST: 1.0 Initial Release.
Stuart Brady