ungetkey

Pushes a keystroke to the push-back buffer of the application screen.

Library:LibC
Classification:Novell
Service:Screen Support

Syntax

  #include <screen.h> 
   
  int ungetkey (
     int   keytype,
     int   modifier,
     int   scancode);
  

Parameters

keytype

(IN) Specifies the type of key. For a list, see Section 23.2, Key Types.

modifier

(IN) Specifies whether the key includes a modifier. For a list, see Section 23.3, Key Status.

scancode

(IN) Specifies the codes emitted by the keyboard when a key is pressed.

Return Values

If successful, returns 0. Otherwise, returns -1 and sets errno to one of the following:

Decimal

Constant

Description

19

EWRNGKND

The wrong kind of operation is being attempted on the wrong kind of object.

23

ENO_SCRNS

Screen I/O is being attempted when no screen is available.

105

ENOCONTEXT

No thread context is present.

Remarks

The pushed-back keystroke is the next key read during a call to such functions as getkey.

See Also

getkey