Cyningstan DOS Games

Games for Early PCs

KEYLIB: A Simple Keyboard Library

Detail of an HP100LX keyboard
Detail of an HP100LX keyboard

Tuesday, 6th September 2022

Another library used in the development of Team Droid has been released. The KEYLIB Keyboard Library is a simple C library for reading the keyboard in DOS. Now that it has had a thorough test as part of Team Droid, it is ready for release.

The KEYLIB Keyboard Library allows you to read the keyboard in two different ways. Firstly, you can wait or poll of ASCII codes, like the built-in C library routines. Secondly, you can check by scancode to see if a key is held down at any particular time. In this way you can check for as many keys simultaneously as your keyboard supports.

The library is available in binary and in source code form, complete with documentation. You can get it on its web page and on its github page.


New Comment

Yes No