Programming Guide



sm_ungetkey

Pushes a translated key onto the input queue

#include <smkeys.h>
int sm_ungetkey(int key);

key
The key to push onto the input stack.

Returns

Description

sm_ungetkey saves the translated key given by key so it can be retrieved by the next call to sm_getkey. Multiple calls are allowed. The key values are pushed onto a stack in last-in/first-out order.

When sm_getkey reads a key from the keyboard, it flushes the display first so the user sees a fully updated display before typing on. This is not the case for keys pushed back by sm_ungetkey.

Example

#include <smkeys.h>

/* Force tab to next field */
sm_ungetkey(TAB);

See Also

sm_getkey