
Series 30i/ 31i/ 32i-A
C executor library for conversion
Programming manual
01 04.05.06
S. Hasegawa
New registration
B-64183EN/01
EDIT
DATE
DESIG.
DESCRIPTION
57/226
DRAW.NO.
3.4.4
Read Key Status
[Name]
pl_keysts
[Syntax]
#include <pmclib.h>
short pl_keysts(short * code);
[Arguments]
Input
---
Output
*code: Key code
code[0] Code1
code[1] Code2
code[0]: When a key is pressed, the key code of the key is returned once
instantly If the key is then held down, 0 is returned. If no key is
pressed, 0 is returned.
code[1]: The value 0 is returned at all times.
[Return]
0: Normal completion.
[Description]
When a key is pressed, this function reads the key code once. The read
key code is stored in the "code[0]". If you keep pressing the key and call
this function repeatedly, zero will be returned to the "code[0]". If the no
key is pressed, zero will be returned to the "code[0]". If you press two
keys simultaneously, the corresponding key codes are returned by the
order of pressing of the keys. Zero is stored always in the "code[1]".
Note that the behavior of this function differs from one in the "C library
for C language board".
[Related Function]
kbhit(), getch(), getchar()