www.delorie.com/djgpp/doc/libc-2.01/libc_334.html   search  
Go to the first, previous, next, last section, table of contents.


getkey

Syntax

#include <pc.h>
#include <keys.h>

int getkey(void);

Description

Waits for the user to press one key, then returns that key. Alt-key combinations have 0x100 added to them. Extended keys return their non-extended codes.

The file `keys.h' has symbolic names for many of the keys.

See section getxkey.

Return Value

The key pressed.

Example

while (getkey() != K_Alt_3)
  do_something();


Go to the first, previous, next, last section, table of contents.

  prev next   webmaster     delorie software   privacy  
  Copyright © 1997     Updated Apr 1997