Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- libc - <b>bioskey</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
bioskey
=======

Syntax
------

     #include <bios.h>
     
     int bioskey(int command)

Description
-----------

COMMAND = 0
     Returns the next key pressed

COMMAND = 1
     Checks the keyboard, returns zero if no key pressed, else the key.
     Does not dequeue the key.

COMMAND = 2
     Returns the shift state:

          7654 3210  Meaning
          
          ---- ---X  Right shift key down
          ---- --X-  Left shift key down
          ---- -X--  Ctrl key down
          ---- X---  Alt key down
          ---X ----  Scroll lock on
          --X- ----  Num lock on
          -X-- ----  Caps lock on
          X--- ----  Insert on

Return Value
------------

Depends on COMMAND.

Example
-------

     while (!bioskey(1))
       do_stuff();


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson