home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pmos2002.zip / DEF / KBDRIVER.DEF < prev    next >
Text File  |  1996-09-04  |  2KB  |  58 lines

  1. DEFINITION MODULE KBdriver;
  2.  
  3.         (********************************************************)
  4.         (*                                                      *)
  5.         (*      Device driver for the keyboard.                 *)
  6.         (*                                                      *)
  7.         (*      Author:         P. Moylan                       *)
  8.         (*      Last edited:    4 September 1996                *)
  9.         (*      Status:                                         *)
  10.         (*           This version (for OS/2) is effectively     *)
  11.         (*           a dummy module; its only purpose is to     *)
  12.         (*           define the LED codes.  I haven't yet       *)
  13.         (*           decided whether it should be expanded      *)
  14.         (*           in future to give the ability to get       *)
  15.         (*           scan codes; I don't at present have any    *)
  16.         (*           software that needs that capability.       *)
  17.         (*           In any case, full keyboard functionality   *)
  18.         (*           will have to wait until XDS includes       *)
  19.         (*           the VIO keyboard API.                      *)
  20.         (*                                                      *)
  21.         (********************************************************)
  22.  
  23. CONST
  24.  
  25.     (* Codes to specify the keyboard indicator lights.  *)
  26.  
  27.     ScrollLockLED = 1;
  28.     NumLockLED = 2;
  29.     CapsLockLED = 4;
  30.  
  31. (*
  32. PROCEDURE GetScanCode () : BYTE;
  33.  
  34.     (* Gets one scan code from the keyboard. *)
  35.  
  36. PROCEDURE CheckScanCode () : BYTE;
  37.  
  38.     (* Like GetScanCode, but returns 0 immediately if no scan code is   *)
  39.     (* available - i.e. does not wait for a keyboard press.             *)
  40.  
  41. PROCEDURE PutLEDs (LEDcode: BYTE);
  42.  
  43.     (* Sets the keyboard lock indicator lights, as specified by         *)
  44.     (* LEDcode.  Unlike the following two procedures, which can affect  *)
  45.     (* one LED without disturbing the others, this procedure alters all *)
  46.     (* three LEDs as a group.                                           *)
  47.  
  48. PROCEDURE ClearLED (LEDcode: BYTE);
  49.  
  50.     (* Clears one or more of the keyboard lock indicator lights.        *)
  51.  
  52. PROCEDURE ToggleLED (LEDcode: BYTE);
  53.  
  54.     (* Toggles one or more of the keyboard lock indicator lights.       *)
  55. *)
  56.  
  57. END KBdriver.
  58.