=============================================================================== Markus F.X.J. Oberhumer =============================================================================== libkb is a free, advanced and portable low-level keyboard library for MSDOS and Linux. - Allows access to ALL keys and ALL key combinations. - Also handles Pause key and Control-Break. - Ideal for games and all applications that want total control over the keyboard. - Supports virtual terminal switching under Linux. - Practical kbhit()/getkey() like interface for textual input. - Intelligent signal handling and emergency-exit feature to achieve a maximum of robustness. - Easy to use. Written entirely in C without assembler code. - Comes with full source, example programs and documentation. - Works with Borland C/Watcom C/djgpp v1+v2/Linux gcc. Take a look at the end of this file if you have been using libkb before. Have fun, Markus Important note for all ftp maintainers and distributors ------------------------------------------------------- Please don't repack the archive because the Makefiles depend on the directory structure and names. This distribution ----------------- After unpacking you should have the following 53 files in the libkb-1.00 directory: README.1ST this file KB.DOC library documentation CHANGE.LOG ChangeLog for libkb COPYING.KB copying policy for libkb DESC.SDI description file FILE_ID.DIZ description file libkb.lsm Linux Software Map data entry Makefile ready-to-run makefile for Linux and djgpp v2 Makefile.lnx Linux makefile stuff Makefile.inc common makefile stuff Makefile.mfx this is my dmake MSDOS Makefile - won't work for you... make_bcc.bat simple MSDOS make driver for Borland C make_dj1.bat simple MSDOS make driver for djgpp v1 + gcc make_dj2.bat simple MSDOS make driver for djgpp v2 + gcc make_emx.bat simple MSDOS make driver for emx + gcc make_wcc.bat simple MSDOS make driver for Watcom C32 include/ include files (2) kb.h public interface for libkb kbmlock.h public include file - memory locking src/ library source (14) _kb.h library source - private include file _kblinux.h library source - private include file for kbhandle.c _kbmsdos.h library source - private include file for kbhandle.c _handler.h library source - private include file for kbhandle.c kbhandle.c library source - keyboard handler kblinux.c library source - Linux stuff kbmlock.c library source - memory locking kbos.c library source - OS and BIOS routines kbsignal.c library source - signal handling kbtables.c library source - tables and high level access functions mkkbname.pl library source utility - Perl script mktables.c library source utility _kbname.hh library source - automatically generated by mkkbname.pl _kbtable.hh library source - automatically generated by mktables.c samples/ example and test programs (8) intro.h test program - include file myconio.h test program - include file kbtst.c test program keycodes.c test program to examine the keycodes simple.c very simple usage example program sigalrm.c test of the emergency alarm feature tube.c nice demo to test libkb with graphics and sound tube.h demo - include file config/ configuration (6) dos/ makefile.bcc simple MSDOS Makefile for Borland C and Borland make makefile.dj1 simple MSDOS Makefile for djgpp v1 and GNU make makefile.dj2 simple MSDOS Makefile for djgpp v2 and GNU make makefile.wcc simple MSDOS Makefile for Watcom C and Watcom make linux/ aout_so.mk Linux a.out shared library makefile include elf_so.mk Linux ELF shared library makefile include util/ utility section (7) 8.c Linux emergency keyboard restorer 8.bat simple MSDOS textmode restorer hardware.doc some documentation about keyboard controller hardware keys.h keycodes (from the djgpp v2 distribution) makefile Makefile vt.c Linux VT ioctl internal test program mkdist.pl utility - Perl script Running the test programs ------------------------- Usage: kbtst [123456] [optional-second-argument] Description: test various functions of the libkb library Commands: 1 install keyboard handler, use kb_inkey() 2 install keyboard handler, use kb_getkey() 3 use kb_os_getkey() 4 use kb_bios_getkey() 5 use getch() 6 install keyboard handler, user interface (DEFAULT) If you pass a second argument, command 1-5 will run a simple benchmark whereas command 6 will start up with some possibly dangerous features enabled (like emergency exit). Usage: tube [options] If tube doesn't work properly, try the 'nosound' option. There are some other options as well, see source code. Availability ------------ The latest version of libkb should always be available at the following sites (and their mirrors): ftp://x2ftp.oulu.fi/pub/msdos/programming/libs (primary MSDOS site) ftp://ftp.simtel.net/pub/simtelnet/msdos/c (alternate MSDOS site) ftp://ftp.coast.net/Coast/msdos/c (alternate MSDOS site) ftp://sunsite.unc.edu/pub/Linux/libs (primary Linux site) ftp://tsx-11.mit.edu/pub/linux/sources/libs (alternate Linux site) Note that all distributions contain the same files. They are just packed with different archivers, zip and tar+gzip respectively. Important changes from v0.90 to v1.00 ------------------------------------- Some KB_FLAG_ constants changed their value, some were added. _kb_iswin() return value changed. You have to adapt and recompile your applications, sorry. Important changes from v0.49 to v0.90 ------------------------------------- The access-macros for all variables have been changed so that they produce no valid lvalue any more. The memory locking prototypes have changed. Now there is an extra include file for memory locking services. Memory locking is now also implemented for Watcom C32. Important changes from v0.36 to v0.49 ------------------------------------- This version introduces some incompatibilities with previous versions. You have to adapt and recompile your applications, sorry. Incompatibilities in the interface: - install functions now return 0 for ok and -1 for error !!! - KB_SCAN_PRINT split into 2 scancodes (KB_SCAN_LAST_CONSOLE) - name of some KB_SCAN_ macros changed, 3 new Microsoft keys added - some KB_FLAG_ constants removed, some changed their value, some added - _kb_flags now is an unsigned long, kb_install() also expects this - _kb_last_key now is an unsigned short and includes the shift flags - declaration of kb_signal_handler changed (should be no problem) Incompatibilities in the implementation: - kb_inkey and kb_getkey: keycode value may differ - kb_os_getkey and kb_bios_getkey: keycode value may differ, now return 0 if no key is available - additional signals are catched